mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-28 20:17:49 +01:00
Revert "/me crashes ementalo's face for making the client crash."
This reverts commit 6d1e2dd10e
.
And fix the original bug.
This commit is contained in:
parent
0fbe2da9cb
commit
d9e15729fd
@ -417,7 +417,9 @@ public class EssentialsPlayerListener implements Listener
|
|||||||
if (event.getView().getTopInventory().getType() == InventoryType.PLAYER)
|
if (event.getView().getTopInventory().getType() == InventoryType.PLAYER)
|
||||||
{
|
{
|
||||||
final User user = ess.getUser(event.getWhoClicked());
|
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);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user