mirror of
https://github.com/PlayPro/CoreProtect.git
synced 2025-01-02 18:37:41 +01:00
Fix inventory drag event not properly checking if a player is dragging within their own inventory
This commit is contained in:
parent
c67e69755d
commit
4af95632d5
@ -294,11 +294,11 @@ public final class InventoryChangeListener extends Queue implements Listener {
|
||||
boolean enderChest = false;
|
||||
|
||||
Inventory inventory = event.getInventory();
|
||||
if (inventory == null || inventory.equals(event.getWhoClicked().getInventory())) {
|
||||
InventoryHolder inventoryHolder = inventory.getHolder();
|
||||
if (inventory == null || inventoryHolder != null && inventoryHolder.equals(event.getWhoClicked())) {
|
||||
return;
|
||||
}
|
||||
|
||||
InventoryHolder inventoryHolder = inventory.getHolder();
|
||||
enderChest = inventory.equals(event.getWhoClicked().getEnderChest());
|
||||
if ((inventoryHolder != null && (inventoryHolder instanceof BlockInventoryHolder || inventoryHolder instanceof DoubleChest)) || enderChest) {
|
||||
movedItem = true;
|
||||
|
Loading…
Reference in New Issue
Block a user