mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-11-27 04:55:37 +01:00
Don't check player inventories for protection.
Fixes WORLDGUARD-3309, WORLDGUARD-3310.
This commit is contained in:
parent
159de771bf
commit
372155b5c3
@ -702,9 +702,11 @@ public void onInventoryOpen(InventoryOpenEvent event) {
|
||||
if (holder instanceof BlockState) {
|
||||
Events.fireToCancel(event, new UseBlockEvent(event, create(event.getPlayer()), ((BlockState) holder).getBlock()));
|
||||
} else if (holder instanceof Entity) {
|
||||
if (!(holder instanceof Player)) {
|
||||
Events.fireToCancel(event, new UseEntityEvent(event, create(event.getPlayer()), (Entity) holder));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler(ignoreCancelled = true)
|
||||
public void onInventoryMoveItem(InventoryMoveItemEvent event) {
|
||||
|
Loading…
Reference in New Issue
Block a user