mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-11-18 08:35:44 +01:00
New permission essentials.invsee.preventmodify. People with this permission cannot have their inventories modified by invsee
This commit is contained in:
parent
caeb3279cb
commit
9d398b1d2e
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user