Advertisement
JoshTEC

Untitled

Apr 13th, 2017
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.02 KB | None | 0 0
  1. package com.surgehcf;
  2.  
  3. import java.text.DecimalFormat;
  4. import java.util.ArrayList;
  5. import java.util.Arrays;
  6. import java.util.Map;
  7. import java.util.Random;
  8. import java.util.concurrent.TimeUnit;
  9.  
  10. import org.apache.commons.lang.time.DurationFormatUtils;
  11. import org.bukkit.Bukkit;
  12. import org.bukkit.ChatColor;
  13. import org.bukkit.command.Command;
  14. import org.bukkit.command.CommandSender;
  15. import org.bukkit.command.PluginCommand;
  16. import org.bukkit.configuration.serialization.ConfigurationSerialization;
  17. import org.bukkit.event.EventHandler;
  18. import org.bukkit.event.Listener;
  19. import org.bukkit.event.player.PlayerCommandPreprocessEvent;
  20. import org.bukkit.plugin.Plugin;
  21. import org.bukkit.plugin.PluginManager;
  22. import org.bukkit.plugin.java.JavaPlugin;
  23. import org.bukkit.scheduler.BukkitRunnable;
  24.  
  25. import com.sk89q.worldedit.bukkit.WorldEditPlugin;
  26. import com.surgehcf.SurgeCore;
  27. import com.surgehcf.cmds.FlightCommand;
  28. import com.surgehcf.cmds.ModeratorMode;
  29. import com.surgehcf.cmds.StaffChat;
  30. import com.surgehcf.cmds.TeamspeakCommand;
  31. import com.surgehcf.cmds.VanishMode;
  32. import com.surgehcf.core.hcf.CooldownTimers;
  33. import com.surgehcf.core.hcf.DateFormatter;
  34. import com.surgehcf.core.hcf.command.BardCommand;
  35. import com.surgehcf.core.hcf.command.CobbleCommand;
  36. import com.surgehcf.core.hcf.command.CrowbarCommand;
  37. import com.surgehcf.core.hcf.command.HelpCommand;
  38. import com.surgehcf.core.hcf.command.LogoutCommand;
  39. import com.surgehcf.core.hcf.command.OresCommand;
  40. import com.surgehcf.core.hcf.command.PlayerStats;
  41. import com.surgehcf.core.hcf.command.PvpTimerCommand;
  42. import com.surgehcf.core.hcf.command.RefundCommand;
  43. import com.surgehcf.core.hcf.command.DonatorReviveCommand;
  44. import com.surgehcf.core.hcf.command.RulesCommand;
  45. import com.surgehcf.core.hcf.command.SOTWCommand;
  46. import com.surgehcf.core.hcf.command.SpawnCommand;
  47. import com.surgehcf.core.hcf.command.SpawnerCommand;
  48. import com.surgehcf.core.hcf.deathban.Deathban;
  49. import com.surgehcf.core.hcf.deathban.DeathbanListener;
  50. import com.surgehcf.core.hcf.deathban.DeathbanManager;
  51. import com.surgehcf.core.hcf.deathban.FlatFileDeathbanManager;
  52. import com.surgehcf.core.hcf.deathban.lives.LivesExecutor;
  53. import com.surgehcf.core.hcf.economy.EconomyCommand;
  54. import com.surgehcf.core.hcf.economy.EconomyManager;
  55. import com.surgehcf.core.hcf.economy.FlatFileEconomyManager;
  56. import com.surgehcf.core.hcf.economy.PayCommand;
  57. import com.surgehcf.core.hcf.economy.ShopSignListener;
  58. import com.surgehcf.core.hcf.eventgame.CaptureZone;
  59. import com.surgehcf.core.hcf.eventgame.EventExecutor;
  60. import com.surgehcf.core.hcf.eventgame.EventScheduler;
  61. import com.surgehcf.core.hcf.eventgame.conquest.ConquestExecutor;
  62. import com.surgehcf.core.hcf.eventgame.eotw.EotwCommand;
  63. import com.surgehcf.core.hcf.eventgame.eotw.EotwHandler;
  64. import com.surgehcf.core.hcf.eventgame.eotw.EotwListener;
  65. import com.surgehcf.core.hcf.eventgame.faction.CapturableFaction;
  66. import com.surgehcf.core.hcf.eventgame.faction.ConquestFaction;
  67. import com.surgehcf.core.hcf.eventgame.faction.KothFaction;
  68. import com.surgehcf.core.hcf.eventgame.koth.KothExecutor;
  69. import com.surgehcf.core.hcf.faction.FactionExecutor;
  70. import com.surgehcf.core.hcf.faction.FactionManager;
  71. import com.surgehcf.core.hcf.faction.FactionMember;
  72. import com.surgehcf.core.hcf.faction.FlatFileFactionManager;
  73. import com.surgehcf.core.hcf.faction.claim.Claim;
  74. import com.surgehcf.core.hcf.faction.claim.ClaimHandler;
  75. import com.surgehcf.core.hcf.faction.claim.ClaimWandListener;
  76. import com.surgehcf.core.hcf.faction.claim.Subclaim;
  77. import com.surgehcf.core.hcf.faction.type.ClaimableFaction;
  78. import com.surgehcf.core.hcf.faction.type.EndPortalFaction;
  79. import com.surgehcf.core.hcf.faction.type.Faction;
  80. import com.surgehcf.core.hcf.faction.type.PlayerFaction;
  81. import com.surgehcf.core.hcf.faction.type.RoadFaction;
  82. import com.surgehcf.core.hcf.faction.type.SpawnFaction;
  83. import com.surgehcf.core.hcf.listener.AutoSmeltOreListener;
  84. import com.surgehcf.core.hcf.listener.BookDeenchantListener;
  85. import com.surgehcf.core.hcf.listener.BorderListener;
  86. import com.surgehcf.core.hcf.listener.ChatListener;
  87. import com.surgehcf.core.hcf.listener.CoreListener;
  88. import com.surgehcf.core.hcf.listener.CrowbarListener;
  89. import com.surgehcf.core.hcf.listener.DeathListener;
  90. import com.surgehcf.core.hcf.listener.DeathMessageListener;
  91. import com.surgehcf.core.hcf.listener.DeathSignListener;
  92. import com.surgehcf.core.hcf.listener.ElevatorListener;
  93. import com.surgehcf.core.hcf.listener.EntityLimitListener;
  94. import com.surgehcf.core.hcf.listener.ExpListener;
  95. import com.surgehcf.core.hcf.listener.ExpMultiplierListener;
  96. import com.surgehcf.core.hcf.listener.FactionListener;
  97. import com.surgehcf.core.hcf.listener.FoundDiamondsListener;
  98. import com.surgehcf.core.hcf.listener.FurnaceSmeltSpeederListener;
  99. import com.surgehcf.core.hcf.listener.ItemStatTrackingListener;
  100. import com.surgehcf.core.hcf.listener.KitListener;
  101. import com.surgehcf.core.hcf.listener.PortalListener;
  102. import com.surgehcf.core.hcf.listener.ProtectionListener;
  103. import com.surgehcf.core.hcf.listener.SignSubclaimListener;
  104. import com.surgehcf.core.hcf.listener.SkullListener;
  105. import com.surgehcf.core.hcf.listener.UnRepairableListener;
  106. import com.surgehcf.core.hcf.listener.WorldListener;
  107. import com.surgehcf.core.hcf.listener.fixes.BeaconStreanthFixListener;
  108. import com.surgehcf.core.hcf.listener.fixes.BlockJumpGlitchFixListener;
  109. import com.surgehcf.core.hcf.listener.fixes.BoatGlitchFixListener;
  110. import com.surgehcf.core.hcf.listener.fixes.EnchantLimitListener;
  111. import com.surgehcf.core.hcf.listener.fixes.EnderChestRemovalListener;
  112. import com.surgehcf.core.hcf.listener.fixes.HungerFixListener;
  113. import com.surgehcf.core.hcf.listener.fixes.InfinityArrowFixListener;
  114. import com.surgehcf.core.hcf.listener.fixes.KeyDupeGlitchListener;
  115. import com.surgehcf.core.hcf.listener.fixes.PearlGlitchListener;
  116. import com.surgehcf.core.hcf.listener.fixes.PexCrashFix;
  117. import com.surgehcf.core.hcf.listener.fixes.PhaseListener;
  118. import com.surgehcf.core.hcf.listener.fixes.PotionLimitListener;
  119. import com.surgehcf.core.hcf.listener.fixes.VoidGlitchFixListener;
  120. import com.surgehcf.core.hcf.pvpclass.PvpClassManager;
  121. import com.surgehcf.core.hcf.pvpclass.archer.ArcherClass;
  122. import com.surgehcf.core.hcf.scoreboard.ScoreboardHandler;
  123. import com.surgehcf.core.hcf.timer.TimerExecutor;
  124. import com.surgehcf.core.hcf.timer.TimerManager;
  125. import com.surgehcf.core.hcf.timer.type.SOTWTimer;
  126. import com.surgehcf.core.hcf.user.FactionUser;
  127. import com.surgehcf.core.hcf.user.UserManager;
  128. import com.surgehcf.core.hcf.visualise.ProtocolLibHook;
  129. import com.surgehcf.core.hcf.visualise.VisualiseHandler;
  130. import com.surgehcf.core.hcf.visualise.WallBorderListener;
  131. import com.surgehcf.core.hcfold.EndListener;
  132. import com.surgehcf.core.hcfold.EventSignListener;
  133. import com.surgehcf.core.hcfold.MapKitCommand;
  134. import com.surgehcf.core.hcfold.combatlog.CombatLogListener;
  135. import com.surgehcf.core.hcfold.combatlog.CustomEntityRegistration;
  136. import com.surgehcf.core.hcfold.crate.KeyListener;
  137. import com.surgehcf.core.hcfold.crate.KeyManager;
  138. import com.surgehcf.core.hcfold.crate.LootExecutor;
  139. import com.surgehcf.essentials.SurgeExtra;
  140. import com.surgehcf.tab.SurgeTab;
  141.  
  142. import me.milksales.base.BasePlugin;
  143. import me.milksales.base.ServerHandler;
  144. import me.milksales.util.BukkitUtils;
  145. import me.milksales.util.chat.ClickAction;
  146. import me.milksales.util.chat.Text;
  147.  
  148. public class SurgeCore extends JavaPlugin implements Listener{
  149. public SurgeCore() {
  150. this.random = new Random();
  151. }
  152.  
  153. public static SurgeCore getPlugin() {
  154. return plugin;
  155. }
  156.  
  157. public static String c(String msg) {
  158. return ChatColor.translateAlternateColorCodes('&', msg);
  159. }
  160.  
  161. public static String getRemaining(long millis, boolean milliseconds) {
  162. return getRemaining(millis, milliseconds, true);
  163. }
  164.  
  165. public static String getRemaining(long duration, boolean milliseconds, boolean trail) {
  166. if ((milliseconds) && (duration < MINUTE)) {
  167. return ((DecimalFormat) (trail ? DateFormatter.REMAINING_SECONDS_TRAILING
  168. : DateFormatter.REMAINING_SECONDS).get()).format(duration * 0.001D) + 's';
  169. }
  170. return DurationFormatUtils.formatDuration(duration, (duration >= HOUR ? "HH:" : "") + "mm:ss");
  171. }
  172.  
  173. public void onEnable() {
  174. instance = this;
  175. plugin = this;
  176. CustomEntityRegistration.registerCustomEntities();
  177. ProtocolLibHook.hook(this);
  178. WorldEditPlugin wep = (WorldEditPlugin) Bukkit.getPluginManager().getPlugin("WorldEdit");
  179. worldEdit = wep;
  180. registerConfiguration();
  181. registerCommands();
  182. registerManagers();
  183. registerListeners();
  184. registerCooldowns();
  185. SurgeExtra.enable();
  186. new BukkitRunnable() {
  187. public void run() {
  188. Bukkit.broadcast(ChatColor.translateAlternateColorCodes('&',
  189. "&eAll factions have been saved to the &d&ldatabase&e."), "staff.mod");
  190. SurgeCore.this.saveData();
  191. }
  192. }
  193.  
  194. .runTaskTimerAsynchronously(plugin, TimeUnit.MINUTES.toMillis(1L), TimeUnit.MINUTES.toMillis(1L));
  195. }
  196.  
  197. private void registerCooldowns() {
  198. CooldownTimers.createCooldown("Faction_cooldown");
  199. CooldownTimers.createCooldown("Assassin_item_cooldown");
  200. CooldownTimers.createCooldown("Archer_item_cooldown");
  201. CooldownTimers.createCooldown("Rogue_cooldown");
  202. CooldownTimers.createCooldown("Flip_cooldown");
  203. }
  204.  
  205. private void saveData() {
  206. this.deathbanManager.saveDeathbanData();
  207. this.economyManager.saveEconomyData();
  208. this.factionManager.saveFactionData();
  209. this.keyManager.saveKeyData();
  210. this.timerManager.saveTimerData();
  211. this.userManager.saveUserData();
  212. }
  213.  
  214. public void onDisable() {
  215. CustomEntityRegistration.unregisterCustomEntities();
  216. CombatLogListener.removeCombatLoggers();
  217. this.pvpClassManager.onDisable();
  218. this.scoreboardHandler.clearBoards();
  219. SurgeExtra.disable();
  220. this.foundDiamondsListener.saveConfig();
  221. saveData();
  222. plugin = null;
  223. }
  224.  
  225. private void registerConfiguration() {
  226. ConfigurationSerialization.registerClass(CaptureZone.class);
  227. ConfigurationSerialization.registerClass(Deathban.class);
  228. ConfigurationSerialization.registerClass(Claim.class);
  229. ConfigurationSerialization.registerClass(Subclaim.class);
  230. ConfigurationSerialization.registerClass(Deathban.class);
  231. ConfigurationSerialization.registerClass(FactionUser.class);
  232. ConfigurationSerialization.registerClass(ClaimableFaction.class);
  233. ConfigurationSerialization.registerClass(ConquestFaction.class);
  234. ConfigurationSerialization.registerClass(CapturableFaction.class);
  235. ConfigurationSerialization.registerClass(KothFaction.class);
  236. ConfigurationSerialization.registerClass(EndPortalFaction.class);
  237. ConfigurationSerialization.registerClass(Faction.class);
  238. ConfigurationSerialization.registerClass(FactionMember.class);
  239. ConfigurationSerialization.registerClass(PlayerFaction.class);
  240. ConfigurationSerialization.registerClass(RoadFaction.class);
  241. ConfigurationSerialization.registerClass(SpawnFaction.class);
  242. ConfigurationSerialization.registerClass(RoadFaction.NorthRoadFaction.class);
  243. ConfigurationSerialization.registerClass(RoadFaction.EastRoadFaction.class);
  244. ConfigurationSerialization.registerClass(RoadFaction.SouthRoadFaction.class);
  245. ConfigurationSerialization.registerClass(RoadFaction.WestRoadFaction.class);
  246. }
  247.  
  248. private void registerListeners() {
  249. PluginManager manager = getServer().getPluginManager();
  250. manager.registerEvents(new ElevatorListener(), this);
  251. manager.registerEvents(new ArcherClass(this), this);
  252. manager.registerEvents(new AutoSmeltOreListener(), this);
  253. manager.registerEvents(new BlockJumpGlitchFixListener(), this);
  254. manager.registerEvents(new KeyDupeGlitchListener(), this);
  255. manager.registerEvents(new BoatGlitchFixListener(), this);
  256. manager.registerEvents(new BookDeenchantListener(), this);
  257. manager.registerEvents(new BorderListener(), this);
  258. manager.registerEvents(new SOTWTimer(), this);
  259. manager.registerEvents(new ChatListener(this), this);
  260. manager.registerEvents(new ClaimWandListener(this), this);
  261. manager.registerEvents(new CombatLogListener(this), this);
  262. manager.registerEvents(new CoreListener(this), this);
  263. manager.registerEvents(new CrowbarListener(this), this);
  264. manager.registerEvents(new DeathListener(this), this);
  265. manager.registerEvents(new DeathMessageListener(this), this);
  266. manager.registerEvents(new DeathSignListener(this), this);
  267. manager.registerEvents(new DeathbanListener(this), this);
  268. manager.registerEvents(new EnchantLimitListener(), this);
  269. manager.registerEvents(new EnderChestRemovalListener(), this);
  270. manager.registerEvents(new EntityLimitListener(), this);
  271. manager.registerEvents(new FlatFileFactionManager(this), this);
  272. manager.registerEvents(new EndListener(), this);
  273. manager.registerEvents(new EotwListener(this), this);
  274. manager.registerEvents(new EventSignListener(), this);
  275. manager.registerEvents(new ExpMultiplierListener(), this);
  276. manager.registerEvents(new FactionListener(this), this);
  277. manager.registerEvents(this.foundDiamondsListener = new FoundDiamondsListener(this), this);
  278. manager.registerEvents(new FurnaceSmeltSpeederListener(), this);
  279. manager.registerEvents(new InfinityArrowFixListener(), this);
  280. manager.registerEvents(new KitListener(this), this);
  281. manager.registerEvents(new ItemStatTrackingListener(), this);
  282. manager.registerEvents(new PhaseListener(), this);
  283. manager.registerEvents(new HungerFixListener(), this);
  284. manager.registerEvents(new PearlGlitchListener(this), this);
  285. manager.registerEvents(new PortalListener(this), this);
  286. manager.registerEvents(new PotionLimitListener(), this);
  287. manager.registerEvents(new ProtectionListener(this), this);
  288. manager.registerEvents(new SignSubclaimListener(this), this);
  289. manager.registerEvents(new ShopSignListener(this), this);
  290. manager.registerEvents(new SkullListener(), this);
  291. manager.registerEvents(new BeaconStreanthFixListener(), this);
  292. manager.registerEvents(new VoidGlitchFixListener(), this);
  293. manager.registerEvents(new WallBorderListener(this), this);
  294. manager.registerEvents(new WorldListener(this), this);
  295. manager.registerEvents(new ExpListener(), this);
  296. manager.registerEvents(new PexCrashFix(), this);
  297. manager.registerEvents(new UnRepairableListener(), this);
  298. manager.registerEvents(new ModeratorMode(), this);
  299. manager.registerEvents(this, this);
  300. manager.registerEvents(new StaffChat(), this);
  301. }
  302.  
  303. private void registerCommands() {
  304. getCommand("ores").setExecutor(new OresCommand());
  305. getCommand("sotw").setExecutor(new SOTWCommand());
  306. getCommand("conquest").setExecutor(new ConquestExecutor(this));
  307. getCommand("crowbar").setExecutor(new CrowbarCommand());
  308. getCommand("economy").setExecutor(new EconomyCommand(this));
  309. getCommand("eotw").setExecutor(new EotwCommand(this));
  310. getCommand("game").setExecutor(new EventExecutor(this));
  311. getCommand("rules").setExecutor(new RulesCommand());
  312. getCommand("help").setExecutor(new HelpCommand());
  313. getCommand("spawner").setExecutor(new SpawnerCommand(this));
  314. getCommand("faction").setExecutor(new FactionExecutor(this));
  315. getCommand("lives").setExecutor(new LivesExecutor(this));
  316. getCommand("logout").setExecutor(new LogoutCommand(this));
  317. getCommand("mapkit").setExecutor(new MapKitCommand(this));
  318. getCommand("pay").setExecutor(new PayCommand(this));
  319. getCommand("pvptimer").setExecutor(new PvpTimerCommand(this));
  320. getCommand("refund").setExecutor(new RefundCommand());
  321. getCommand("spawn").setExecutor(new SpawnCommand(this));
  322. getCommand("donatorrevive").setExecutor(new DonatorReviveCommand(this));
  323. getCommand("stats").setExecutor(new PlayerStats());
  324. getCommand("vanish").setExecutor(new VanishMode());
  325. getCommand("sc").setExecutor(new StaffChat());
  326. getCommand("ts").setExecutor(new TeamspeakCommand());
  327. getCommand("koth").setExecutor(new KothExecutor(this));
  328. getCommand("mod").setExecutor(new ModeratorMode());
  329. getCommand("fly").setExecutor(new FlightCommand());
  330. getCommand("cobble").setExecutor(new CobbleCommand());
  331. getCommand("bard").setExecutor(new BardCommand());
  332. Map<String, Map<String, Object>> map = getDescription().getCommands();
  333. for (Map.Entry<String, Map<String, Object>> entry : map.entrySet()) {
  334. PluginCommand command = getCommand((String) entry.getKey());
  335. command.setPermission("command." + (String) entry.getKey());
  336. command.setPermissionMessage(ChatColor.GOLD + "No permission.");
  337. }
  338. }
  339.  
  340. private void registerManagers() {
  341. this.claimHandler = new ClaimHandler(this);
  342. this.deathbanManager = new FlatFileDeathbanManager(this);
  343. this.economyManager = new FlatFileEconomyManager(this);
  344. this.eotwHandler = new EotwHandler(this);
  345. this.eventScheduler = new EventScheduler(this);
  346. this.factionManager = new FlatFileFactionManager(this);
  347. this.pvpClassManager = new PvpClassManager(this);
  348. this.timerManager = new TimerManager(this);
  349. this.scoreboardHandler = new ScoreboardHandler(this);
  350. this.userManager = new UserManager(this);
  351. this.visualiseHandler = new VisualiseHandler();
  352. this.keyManager = new KeyManager(this);
  353. getServer().getPluginManager().registerEvents(new KeyListener(this), this);
  354. getCommand("eventloot").setExecutor(new LootExecutor(this));
  355. }
  356.  
  357. public Random getRandom() {
  358. return this.random;
  359. }
  360.  
  361. public WorldEditPlugin getWorldEdit() {
  362. return this.worldEdit;
  363. }
  364.  
  365. public KeyManager getKeyManager() {
  366. return this.keyManager;
  367. }
  368.  
  369. public ClaimHandler getClaimHandler() {
  370. return this.claimHandler;
  371. }
  372.  
  373. public DeathbanManager getDeathbanManager() {
  374. return this.deathbanManager;
  375. }
  376.  
  377. public EconomyManager getEconomyManager() {
  378. return this.economyManager;
  379. }
  380.  
  381. public EotwHandler getEotwHandler() {
  382. return this.eotwHandler;
  383. }
  384.  
  385. public FactionManager getFactionManager() {
  386. return this.factionManager;
  387. }
  388.  
  389. public PvpClassManager getPvpClassManager() {
  390. return this.pvpClassManager;
  391. }
  392.  
  393. public static SurgeCore getInstance() {
  394. return instance;
  395. }
  396.  
  397. public ScoreboardHandler getScoreboardHandler() {
  398. return this.scoreboardHandler;
  399. }
  400.  
  401. public TimerManager getTimerManager() {
  402. return this.timerManager;
  403. }
  404.  
  405. public ServerHandler getServerHandler() {
  406. return BasePlugin.getPlugin().getServerHandler();
  407. }
  408.  
  409. public UserManager getUserManager() {
  410. return this.userManager;
  411. }
  412.  
  413. public VisualiseHandler getVisualiseHandler() {
  414. return this.visualiseHandler;
  415. }
  416.  
  417. public ArrayList getStaffModePlayers(){
  418. return this.sataffModePlayers;
  419. }
  420.  
  421. public ArrayList getStaffChatPlayers(){
  422. return this.staffChat;
  423. }
  424.  
  425. public ArrayList getToggledStaffBoardPlayers(){
  426. return this.staffboard;
  427. }
  428.  
  429. public ArrayList getVanishedPlayers(){
  430. return this.vanish;
  431. }
  432.  
  433.  
  434. private static final long MINUTE = TimeUnit.MINUTES.toMillis(1L);
  435. private static final long HOUR = TimeUnit.HOURS.toMillis(1L);
  436. private static SurgeCore plugin;
  437. private static SurgeCore instance;
  438. public EventScheduler eventScheduler;
  439. private Random random;
  440. private WorldEditPlugin worldEdit;
  441. private FoundDiamondsListener foundDiamondsListener;
  442. private ClaimHandler claimHandler;
  443. private KeyManager keyManager;
  444. private DeathbanManager deathbanManager;
  445. private EconomyManager economyManager;
  446. private EotwHandler eotwHandler;
  447. private FactionManager factionManager;
  448. private PvpClassManager pvpClassManager;
  449. private ScoreboardHandler scoreboardHandler;
  450. private TimerManager timerManager;
  451. private UserManager userManager;
  452. private VisualiseHandler visualiseHandler;
  453. private ArrayList<String> sataffModePlayers = new ArrayList<String>();
  454. private ArrayList<String> staffChat = new ArrayList<String>();
  455. private ArrayList<String> staffboard = new ArrayList<String>();
  456. private ArrayList<String> vanish = new ArrayList<String>();
  457.  
  458. @EventHandler
  459. public void antiPl(PlayerCommandPreprocessEvent e){
  460. String[] message = e.getMessage().split(" ");
  461. for(String word : message){
  462. if(word.equalsIgnoreCase("/pl") || word.equalsIgnoreCase("/plugins") || word.equalsIgnoreCase("/ver") || word.equalsIgnoreCase("/version") || word.equalsIgnoreCase("/about") || word.equalsIgnoreCase("/icanhasbukkit")){
  463. e.getPlayer().sendMessage("Unknown command. Type \"/help\" for help.");
  464. e.setCancelled(true);
  465. }
  466. }
  467. }
  468.  
  469. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement