Bring v5 entity spawn changes to v6

This commit is contained in:
dordsor21 2021-01-06 21:56:26 +00:00
parent ec8bdc9af6
commit 98e8476a88
No known key found for this signature in database
GPG Key ID: 1E53E88969FFCF0B

View File

@ -131,21 +131,24 @@ public class EntitySpawnListener implements Listener {
}
Plot plot = location.getOwnedPlotAbs();
if (plot == null) {
if (!area.isMobSpawning()) {
EntityType type = entity.getType();
if (!area.isMobSpawning()) {
switch (type) {
case DROPPED_ITEM:
if (Settings.Enabled_Components.KILL_ROAD_ITEMS) {
event.setCancelled(true);
break;
return;
}
case PLAYER:
return;
}
if (type.isAlive() || !area.isMiscSpawnUnowned()) {
if (type.isAlive()) {
event.setCancelled(true);
}
}
if (!area.isMiscSpawnUnowned() && !type.isAlive()) {
event.setCancelled(true);
}
return;
}
if (Settings.Done.RESTRICT_BUILDING && DoneFlag.isDone(plot)) {