mirror of
https://github.com/PEXPlugins/Modifyworld.git
synced 2025-01-03 18:17:49 +01:00
! Fix using throwable / spawn egg on container (e.g. enderchest) can bypass use
permission node check
This commit is contained in:
parent
fa508d8a31
commit
6b9fb400c0
@ -266,12 +266,12 @@ public class PlayerListener extends ModifyworldListener {
|
||||
event.getPlayer().updateInventory();
|
||||
}
|
||||
}
|
||||
return; // no need to check further
|
||||
break; // NEED to check further
|
||||
case MONSTER_EGG: // don't add MONSTER_EGGS here
|
||||
if (permissionDenied(player, "modifyworld.spawn", ((SpawnEgg)player.getItemInHand().getData()).getSpawnedType())) {
|
||||
event.setUseItemInHand(Result.DENY);
|
||||
}
|
||||
return; // no need to check further
|
||||
break; // NEED to check further
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user