mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-11-23 11:06:13 +01:00
Don't check player inventories for protection.
Fixes WORLDGUARD-3309, WORLDGUARD-3310.
This commit is contained in:
parent
159de771bf
commit
372155b5c3
@ -702,7 +702,9 @@ 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) {
|
||||
Events.fireToCancel(event, new UseEntityEvent(event, create(event.getPlayer()), (Entity) holder));
|
||||
if (!(holder instanceof Player)) {
|
||||
Events.fireToCancel(event, new UseEntityEvent(event, create(event.getPlayer()), (Entity) holder));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user