mirror of
https://github.com/PEXPlugins/Modifyworld.git
synced 2025-01-04 18:28:18 +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();
|
event.getPlayer().updateInventory();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return; // no need to check further
|
break; // NEED to check further
|
||||||
case MONSTER_EGG: // don't add MONSTER_EGGS here
|
case MONSTER_EGG: // don't add MONSTER_EGGS here
|
||||||
if (permissionDenied(player, "modifyworld.spawn", ((SpawnEgg)player.getItemInHand().getData()).getSpawnedType())) {
|
if (permissionDenied(player, "modifyworld.spawn", ((SpawnEgg)player.getItemInHand().getData()).getSpawnedType())) {
|
||||||
event.setUseItemInHand(Result.DENY);
|
event.setUseItemInHand(Result.DENY);
|
||||||
}
|
}
|
||||||
return; // no need to check further
|
break; // NEED to check further
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user