mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-11-27 13:07:29 +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) {
|
if (holder instanceof BlockState) {
|
||||||
Events.fireToCancel(event, new UseBlockEvent(event, create(event.getPlayer()), ((BlockState) holder).getBlock()));
|
Events.fireToCancel(event, new UseBlockEvent(event, create(event.getPlayer()), ((BlockState) holder).getBlock()));
|
||||||
} else if (holder instanceof Entity) {
|
} else if (holder instanceof Entity) {
|
||||||
|
if (!(holder instanceof Player)) {
|
||||||
Events.fireToCancel(event, new UseEntityEvent(event, create(event.getPlayer()), (Entity) holder));
|
Events.fireToCancel(event, new UseEntityEvent(event, create(event.getPlayer()), (Entity) holder));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@EventHandler(ignoreCancelled = true)
|
@EventHandler(ignoreCancelled = true)
|
||||||
public void onInventoryMoveItem(InventoryMoveItemEvent event) {
|
public void onInventoryMoveItem(InventoryMoveItemEvent event) {
|
||||||
|
Loading…
Reference in New Issue
Block a user