From 2963f7a61ccd690ee7bc0609b3305481d29b9d6b Mon Sep 17 00:00:00 2001 From: Cheese Date: Mon, 29 Jun 2015 10:13:33 +1000 Subject: [PATCH] stacker wont give too many msgs --- .../mineplex/hub/modules/StackerManager.java | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/modules/StackerManager.java b/Plugins/Mineplex.Hub/src/mineplex/hub/modules/StackerManager.java index 76a74e62a..c7b57d2e4 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/modules/StackerManager.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/modules/StackerManager.java @@ -57,6 +57,22 @@ public class StackerManager extends MiniPlugin implements IThrown if (event.isCancelled()) return; + Entity stackee = event.getRightClicked(); + if (stackee == null) + return; + + if (!(stackee instanceof LivingEntity)) + return; + + if (stackee instanceof Horse) + return; + + if (stackee instanceof EnderDragon) + return; + + if (stackee instanceof Player && ((Player)stackee).getGameMode() != GameMode.SURVIVAL) + return; + Player stacker = event.getPlayer(); if (stacker.getGameMode() != GameMode.SURVIVAL) @@ -89,22 +105,6 @@ public class StackerManager extends MiniPlugin implements IThrown return; } - Entity stackee = event.getRightClicked(); - if (stackee == null) - return; - - if (!(stackee instanceof LivingEntity)) - return; - - if (stackee instanceof Horse) - return; - - if (stackee instanceof EnderDragon) - return; - - if (stackee instanceof Player && ((Player)stackee).getGameMode() != GameMode.SURVIVAL) - return; - stackerEvent = new StackerEvent(stackee); Bukkit.getServer().getPluginManager().callEvent(stackerEvent); if (stackerEvent.isCancelled())