From d9e15729fd9fcce20984ffc64327c944e3c39514 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sun, 6 May 2012 23:30:55 +0100 Subject: [PATCH] Revert "/me crashes ementalo's face for making the client crash." This reverts commit 6d1e2dd10eb38ad4ad582a633f80e1e8443174c9. And fix the original bug. --- .../src/com/earth2me/essentials/EssentialsPlayerListener.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java index 589c1eb38..1b4f461c4 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java @@ -417,7 +417,9 @@ public class EssentialsPlayerListener implements Listener if (event.getView().getTopInventory().getType() == InventoryType.PLAYER) { final User user = ess.getUser(event.getWhoClicked()); - if (user.isInvSee() && !user.isAuthorized("essentials.invsee.modify")) + final User invOwner = ess.getUser(event.getView().getPlayer()); + if (user.isInvSee() && (!user.isAuthorized("essentials.invsee.modify") + || invOwner.isAuthorized("essentials.invsee.preventmodify"))) { event.setCancelled(true); }