Guest User

Untitled

a guest
Oct 25th, 2015
102
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package me.iamcion.vcommands;
  2.  
  3. import me.iamcion.EventListeners.SuicideBomber;
  4. import me.iamcion.guardcommands.AxeCommand;
  5. import me.iamcion.guardcommands.BowCommand;
  6. import me.iamcion.guardcommands.GuardCommands;
  7. import me.iamcion.guardcommands.KoSCommand;
  8. import me.iamcion.guardcommands.OutCommand;
  9. import me.iamcion.guardcommands.PotionCommand;
  10. import me.iamcion.guardcommands.SwordCommand;
  11.  
  12. import org.bukkit.Bukkit;
  13. import org.bukkit.ChatColor;
  14. import org.bukkit.command.CommandExecutor;
  15. import org.bukkit.event.Listener;
  16. import org.bukkit.plugin.PluginManager;
  17. import org.bukkit.plugin.java.JavaPlugin;
  18.  
  19. public class Main extends JavaPlugin
  20. implements Listener {
  21.  
  22. private static Main instance; // Bottom of this class
  23. private SuicideBomber suicideBomber;
  24. //on enable settings
  25. @Override
  26. public void onEnable() {
  27. instance = this;
  28.  
  29. registerCommands();
  30. Bukkit.getConsoleSender().sendMessage("Vanquish>" + ChatColor.GREEN + "Has been activated!");
  31. PluginManager manager = getServer().getPluginManager();
  32. //Colors
  33. manager.registerEvents(this, this);
  34. //NoDrop_Mining ADD IT ONCE WORLDGUARD PROBLEM IS FIXED - manager.registerEvents(new me.iamcion.EventListeners.NoDrop_Mining(), this);
  35. manager.registerEvents((suicideBomber = new me.iamcion.EventListeners.SuicideBomber()), this);
  36. }
  37.  
  38. @Override
  39. public void onDisable() {
  40. Bukkit.getConsoleSender().sendMessage("Vanquish>" + ChatColor.RED + "Has been deactivated!");
  41. }
  42.  
  43. public void registerCommands() {
  44. registerComand(new Fireworks(), "fw", "fwr", "fwq");
  45. registerComand(new Nightvision(), "nightvision");
  46. registerComand(new Commandlist(), "vc");
  47. registerComand(new Ghost(), "ghost");
  48. registerComand(new Lores(), "addlore", "removelore");
  49. registerComand(new ColorList(), "colors", "formats");
  50. registerComand(new Slap(), "slap");
  51. registerComand(new FakeOp(), "fakeop", "fakedeop");
  52. registerComand(new Freeze(), "freeze");
  53. registerComand(suicideBomber, "suicide");
  54. registerComand(new Throw(), "egg", "snowball");
  55. registerComand(new Settings(), "settings");
  56. registerComand(new AxeCommand(), "axe");
  57. registerComand(new BowCommand(), "bow");
  58. registerComand(new GuardCommands(), "guardcommands");
  59. registerComand(new KoSCommand(), "kos");
  60. registerComand(new OutCommand(), "out");
  61. registerComand(new PotionCommand(), "pot");
  62. registerComand(new SwordCommand(), "sword");
  63. registerComand(new Hunt(), "hunt");
  64. registerComand(new Scare(), "scare");
  65. registerComand(new Chat(), "chat");
  66. }
  67.  
  68. public static Main getInstance() {
  69. return instance;
  70. }
  71.  
  72. public void registerComand(CommandExecutor executor, String... aliases) {
  73. for (String alias : aliases) {
  74. getServer().getPluginCommand(alias).setExecutor(executor);
  75. }
  76. }
  77. }
RAW Paste Data