chore: check in PaperListener for consistency

This commit is contained in:
Pierre Maurice Schwang 2022-08-09 18:52:33 +02:00
parent 98ee2d162b
commit 10d140b33c

View File

@ -229,17 +229,17 @@ public class PaperListener implements Listener {
Plot plot = location.getOwnedPlotAbs();
if (plot == null) {
EntityType type = event.getType();
if (!area.isMobSpawning()) {
if (type == EntityType.PLAYER) {
return;
}
// PreCreatureSpawnEvent **should** not be called for DROPPED_ITEM, just for the sake of consistency
if (type == EntityType.DROPPED_ITEM) {
if (Settings.Enabled_Components.KILL_ROAD_ITEMS) {
event.setShouldAbortSpawn(true);
event.setCancelled(true);
}
return;
}
if (!area.isMobSpawning()) {
if (type == EntityType.PLAYER) {
return;
}
if (type.isAlive()) {
event.setShouldAbortSpawn(true);
event.setCancelled(true);