From b974410dd9aab4ddf4098857c48b4088b599eb93 Mon Sep 17 00:00:00 2001 From: ementalo Date: Sat, 11 Jun 2011 08:37:05 +0100 Subject: Protect: Get block owners on right click block only --- .../earth2me/essentials/protect/EssentialsProtectPlayerListener.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'EssentialsProtect/src/com/earth2me/essentials/protect') diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectPlayerListener.java b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectPlayerListener.java index 4d69fb31f..9f26b619f 100644 --- a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectPlayerListener.java +++ b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectPlayerListener.java @@ -7,6 +7,7 @@ import org.bukkit.event.player.PlayerListener; import org.bukkit.inventory.ItemStack; import com.earth2me.essentials.User; import com.earth2me.essentials.Util; +import org.bukkit.event.block.Action; public class EssentialsProtectPlayerListener extends PlayerListener @@ -45,7 +46,7 @@ public class EssentialsProtectPlayerListener extends PlayerListener return; } - if (user.isAuthorized("essentials.protect.admin")) + if (user.isAuthorized("essentials.protect.admin") && event.getAction() == Action.RIGHT_CLICK_BLOCK) { final StringBuilder stringBuilder = new StringBuilder(); boolean first = true; -- cgit v1.2.3