Skip to content

Instantly share code, notes, and snippets.

@tsengia
Created July 5, 2016 01:55
Show Gist options
  • Save tsengia/f0c5ce47835290e8d54967c183b44068 to your computer and use it in GitHub Desktop.
Save tsengia/f0c5ce47835290e8d54967c183b44068 to your computer and use it in GitHub Desktop.
How to extend the LanguageManager class in a plugin
//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