diff options
author | ementalo <ementalodev@gmx.co.uk> | 2012-04-23 23:46:53 +0100 |
---|---|---|
committer | ementalo <ementalodev@gmx.co.uk> | 2012-04-23 23:51:10 +0100 |
commit | 7fc0d08ffc2dfedbb730de40d36d680e47eb4a01 (patch) | |
tree | c2249fc57567b9916eb1080fe17ef2d039da5f4c | |
parent | 03ea9d3563da8a33777259124cd7a5b9fa250f16 (diff) | |
download | Essentials-7fc0d08ffc2dfedbb730de40d36d680e47eb4a01.tar Essentials-7fc0d08ffc2dfedbb730de40d36d680e47eb4a01.tar.gz Essentials-7fc0d08ffc2dfedbb730de40d36d680e47eb4a01.tar.lz Essentials-7fc0d08ffc2dfedbb730de40d36d680e47eb4a01.tar.xz Essentials-7fc0d08ffc2dfedbb730de40d36d680e47eb4a01.zip |
New permission essentials.invsee.preventmodify. People with this permission cannot have their inventories modified by invsee
-rw-r--r-- | Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java index f48138e4d..ef2be0f33 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java @@ -421,7 +421,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); } |