From 5051bcb3835519bfcd258e58cea6bc97f3087ce7 Mon Sep 17 00:00:00 2001 From: ementalo Date: Thu, 5 May 2011 00:05:22 +0000 Subject: [PATCH] [trunk] EssentialsProtect :- fix owner spam on arm swing, will only show on right-click now git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1346 e251c2fe-e539-e718-e476-b85c1f46cddb --- .../essentials/protect/EssentialsProtectPlayerListener.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectPlayerListener.java b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectPlayerListener.java index 8b3a32aa5..b0381640e 100644 --- a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectPlayerListener.java +++ b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectPlayerListener.java @@ -4,6 +4,7 @@ import com.earth2me.essentials.Essentials; import com.earth2me.essentials.User; import org.bukkit.ChatColor; import org.bukkit.block.Block; +import org.bukkit.event.block.Action; import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.event.player.PlayerListener; import org.bukkit.inventory.ItemStack; @@ -51,7 +52,7 @@ public class EssentialsProtectPlayerListener extends PlayerListener return; } - if (user.isAuthorized("essentials.protect.ownerinfo")) + if (event.getAction() == Action.RIGHT_CLICK_BLOCK && user.isAuthorized("essentials.protect.ownerinfo")) { String ownerName = spData.getBlockOwner(user.getWorld().getName(), user.getName(), blockClicked);