Advertisement
Guest User

Untitled

a guest
May 28th, 2017
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. package com.hibba.plugin;
  2.  
  3.  
  4. import org.bukkit.event.Listener;
  5. import org.bukkit.plugin.PluginManager;
  6. import org.bukkit.plugin.java.JavaPlugin;
  7.  
  8. import commands.captcha;
  9. import commands.clear;
  10. import commands.adminsword;
  11. import commands.menu;
  12. import commands.spawn;
  13. import commands.staff;
  14. import event.block.BlockBreak;
  15. import event.inventory.InventoryClick;
  16. import event.player.PlayerChat;
  17. import event.player.PlayerJoin;
  18.  
  19. public class Plugin extends JavaPlugin implements Listener {
  20.  
  21. public void onEnable() {
  22. registerCommands();
  23. registerEvents();
  24. registerConfig();
  25.  
  26. }
  27.  
  28. public void onDisable() {
  29.  
  30. }
  31.  
  32. public void registerCommands() {
  33. this.getCommand("adminsword").setExecutor(new adminsword());
  34. this.getCommand("captcha").setExecutor(new captcha());
  35. this.getCommand("clear").setExecutor(new clear());
  36. this.getCommand("menu").setExecutor(new menu());
  37. this.getCommand("spawn").setExecutor(new spawn());
  38. this.getCommand("staff").setExecutor(new staff(this));
  39. }
  40.  
  41. public void registerEvents() {
  42. PluginManager pm = getServer().getPluginManager();
  43.  
  44. pm.registerEvents(new BlockBreak(), this);
  45. pm.registerEvents(new PlayerChat(), this);
  46. pm.registerEvents(new PlayerJoin(this), this);
  47. pm.registerEvents(new InventoryClick(), this);
  48. }
  49.  
  50. private void registerConfig() {
  51. getConfig().options().copyDefaults(true);
  52. saveConfig();
  53. }
  54.  
  55. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement