diff options
author | ementalo <ementalo@gmx.co.uk> | 2011-06-11 08:37:05 +0100 |
---|---|---|
committer | ementalo <ementalo@gmx.co.uk> | 2011-06-11 08:37:05 +0100 |
commit | 3f736d97133753df4fb36bc024f90d58445fffb2 (patch) | |
tree | fc731e11a1ebb8609947ea56c62a8b3fb02f8a36 /EssentialsProtect/src/com/earth2me/essentials | |
parent | 7caef4feba7f848be90895517f203095581f0d17 (diff) | |
download | Essentials-3f736d97133753df4fb36bc024f90d58445fffb2.tar Essentials-3f736d97133753df4fb36bc024f90d58445fffb2.tar.gz Essentials-3f736d97133753df4fb36bc024f90d58445fffb2.tar.lz Essentials-3f736d97133753df4fb36bc024f90d58445fffb2.tar.xz Essentials-3f736d97133753df4fb36bc024f90d58445fffb2.zip |
Protect: Get block owners on right click block only
Diffstat (limited to 'EssentialsProtect/src/com/earth2me/essentials')
-rw-r--r-- | EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectPlayerListener.java | 3 |
1 files changed, 2 insertions, 1 deletions
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; |