! Fix using throwable / spawn egg on container (e.g. enderchest) can bypass use permission node check

This commit is contained in:
PikachuEXE 2015-02-20 23:06:55 +08:00
parent fa508d8a31
commit 6b9fb400c0

View File

@ -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
}
}