Created
July 5, 2016 01:55
-
-
Save tsengia/f0c5ce47835290e8d54967c183b44068 to your computer and use it in GitHub Desktop.
How to extend the LanguageManager class in a plugin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//This is skeleton/prototype code, just to explain how setting a custom LanguageManager would work | |
import net.glowstone.util.lang.LanguageManager; | |
class MyLanguage extends LanguageManager() { | |
/* | |
Methods and etc for the class, however you want it to work. | |
*/ | |
} | |
/* | |
* Now to the plugin | |
*/ | |
import net.glowstone.GlowServer; | |
import io.gist.MyLanguage; | |
class MyPlugin extends /* or implements, idk, skeleton code */ Plugin { | |
public void onStart() { | |
((GlowServer) Bukkit.getServer()).setLanguageManager(new MyLanguage()); //Sets the custom language manager | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment