Prevent dropping items into backpack in creative

This commit is contained in:
GeorgH93 2020-02-07 00:35:46 +01:00
parent 5897082f76
commit de89970c49
No known key found for this signature in database
GPG Key ID: D1630D37F9E4B3C8

View File

@ -163,7 +163,7 @@ public void onItemClick(InventoryClickEvent event)
{ {
if(event.getAction() == InventoryAction.SWAP_WITH_CURSOR) if(event.getAction() == InventoryAction.SWAP_WITH_CURSOR)
{ {
if(plugin.isDisabled(player) != WorldBlacklistMode.None || !player.hasPermission("backpack.use")) return; if(plugin.isDisabled(player) != WorldBlacklistMode.None || !player.hasPermission("backpack.use") || !plugin.isPlayerGameModeAllowed(player)) return;
Backpack backpack = plugin.getBackpackCachedOnly(player); Backpack backpack = plugin.getBackpackCachedOnly(player);
if(backpack != null) if(backpack != null)
{ {