diff options
author | KHobbits <rob@khobbits.co.uk> | 2012-04-14 04:54:01 +0100 |
---|---|---|
committer | KHobbits <rob@khobbits.co.uk> | 2012-04-14 04:54:01 +0100 |
commit | 45de85dae257e73dc9a041ffe6a02465692a5ce1 (patch) | |
tree | f53f96a2da977b1dcd36515c9625206159a02bdd | |
parent | 8b9ff2c58a14b9fdaaf03941f3fcaefe8313c38d (diff) | |
download | Essentials-45de85dae257e73dc9a041ffe6a02465692a5ce1.tar Essentials-45de85dae257e73dc9a041ffe6a02465692a5ce1.tar.gz Essentials-45de85dae257e73dc9a041ffe6a02465692a5ce1.tar.lz Essentials-45de85dae257e73dc9a041ffe6a02465692a5ce1.tar.xz Essentials-45de85dae257e73dc9a041ffe6a02465692a5ce1.zip |
Optimize sign interacts.
-rw-r--r-- | Essentials/src/com/earth2me/essentials/signs/SignPlayerListener.java | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/Essentials/src/com/earth2me/essentials/signs/SignPlayerListener.java b/Essentials/src/com/earth2me/essentials/signs/SignPlayerListener.java index 561d8dffc..d415ef6a8 100644 --- a/Essentials/src/com/earth2me/essentials/signs/SignPlayerListener.java +++ b/Essentials/src/com/earth2me/essentials/signs/SignPlayerListener.java @@ -23,11 +23,10 @@ public class SignPlayerListener implements Listener @EventHandler(priority = EventPriority.LOW, ignoreCancelled = true) public void onPlayerInteract(final PlayerInteractEvent event) { - if (ess.getSettings().areSignsDisabled()) + if (ess.getSettings().areSignsDisabled() || event.getAction() != Action.RIGHT_CLICK_BLOCK) { return; } - final Block block = event.getClickedBlock(); if (block == null) { @@ -37,10 +36,6 @@ public class SignPlayerListener implements Listener final int mat = block.getTypeId(); if (mat == Material.SIGN_POST.getId() || mat == Material.WALL_SIGN.getId()) { - if (event.getAction() != Action.RIGHT_CLICK_BLOCK) - { - return; - } final Sign csign = (Sign)block.getState(); for (EssentialsSign sign : ess.getSettings().enabledSigns()) { @@ -61,7 +56,6 @@ public class SignPlayerListener implements Listener { event.setCancelled(true); return; - } } } |