mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-12-03 16:04:26 +01:00
Fix spawn egg blocking.
Closes WORLDGUARD-3254.
This commit is contained in:
parent
41c68664d7
commit
7580583fbf
@ -389,6 +389,7 @@ public void onPlayerInteract(PlayerInteractEvent event) {
|
|||||||
case RIGHT_CLICK_AIR:
|
case RIGHT_CLICK_AIR:
|
||||||
if (item != null && !item.getType().isBlock() && Events.fireAndTestCancel(new UseItemEvent(event, cause, player.getWorld(), item))) {
|
if (item != null && !item.getType().isBlock() && Events.fireAndTestCancel(new UseItemEvent(event, cause, player.getWorld(), item))) {
|
||||||
event.setUseItemInHand(Result.DENY);
|
event.setUseItemInHand(Result.DENY);
|
||||||
|
event.setCancelled(true); // The line above does not appear to work with spawn eggs
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check for items that the administrator has configured to
|
// Check for items that the administrator has configured to
|
||||||
|
Loading…
Reference in New Issue
Block a user