vminecraftPlugin.java 1.1 KB

123456789101112131415161718192021222324252627
  1. /**
  2. * vminecraft Plugin
  3. * @author Robert, TrapAlice
  4. */
  5. //This is how we setup the listener
  6. public class vminecraftPlugin extends Plugin {
  7. static final vminecraftListener listener = new vminecraftListener();
  8. public void enable() {
  9. //If we had commands we would add them here.
  10. etc.getInstance().addCommand("/masstp", "Teleports those with lower permissions to you");
  11. etc.getInstance().addCommand("/rules", "Displays the rules");
  12. etc.getInstance().addCommand("/fabulous", "makes text SUUUPER");
  13. etc.getInstance().addCommand("/whois", "/whois [user]");
  14. settings.getInstance().loadSettings(); //Hopefully this will make the plugin load right away
  15. }
  16. public void disable() {
  17. //And remove the commands here.
  18. }
  19. public void initialize() {
  20. //Here we add the hook we're going to use. In this case it's the arm swing event.
  21. etc.getLoader().addListener(PluginLoader.Hook.CHAT, listener, this, PluginListener.Priority.MEDIUM);
  22. etc.getLoader().addListener(PluginLoader.Hook.COMMAND, listener, this, PluginListener.Priority.HIGH);
  23. }
  24. }