Prevent backpack shrinking if player doesn't have permission to open it

This commit is contained in:
GeorgH93 2018-07-25 18:30:34 +02:00
parent 82c5f3cf2e
commit 2156e0d6b7
No known key found for this signature in database
GPG Key ID: D1630D37F9E4B3C8

View File

@ -101,7 +101,7 @@ public void open(@NotNull Player player, boolean editable, @Nullable String titl
if(owner.isOnline())
{
Player owner = this.owner.getPlayer();
if(owner != null)
if(owner != null && owner.hasPermission("backpack.use"))
{
int size = Minepacks.getInstance().getBackpackPermSize(owner);
if(size != bp.getSize())