summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsnowleo <schneeleo@gmail.com>2011-06-30 22:55:00 +0200
committersnowleo <schneeleo@gmail.com>2011-06-30 22:55:00 +0200
commit60235d0da4802f881a753f6d19181dcd4f476a27 (patch)
tree4806ba66f552024b7d00f36fbb24b33ebaed8067
parent995f18bb0f051c24ac7fdbf19a57729f06e48973 (diff)
downloadEssentials-60235d0da4802f881a753f6d19181dcd4f476a27.tar
Essentials-60235d0da4802f881a753f6d19181dcd4f476a27.tar.gz
Essentials-60235d0da4802f881a753f6d19181dcd4f476a27.tar.lz
Essentials-60235d0da4802f881a753f6d19181dcd4f476a27.tar.xz
Essentials-60235d0da4802f881a753f6d19181dcd4f476a27.zip
Only act on right click, otherwise signs can't be destroyed.
-rw-r--r--Essentials/src/com/earth2me/essentials/signs/SignPlayerListener.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/Essentials/src/com/earth2me/essentials/signs/SignPlayerListener.java b/Essentials/src/com/earth2me/essentials/signs/SignPlayerListener.java
index ba94868af..96ff3eace 100644
--- a/Essentials/src/com/earth2me/essentials/signs/SignPlayerListener.java
+++ b/Essentials/src/com/earth2me/essentials/signs/SignPlayerListener.java
@@ -5,6 +5,7 @@ import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.block.Sign;
import org.bukkit.craftbukkit.block.CraftSign;
+import org.bukkit.event.block.Action;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.event.player.PlayerListener;
@@ -30,6 +31,10 @@ public class SignPlayerListener extends PlayerListener
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 = new CraftSign(block);
for (Signs signs : Signs.values())
{