mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 13:16:45 +01:00
chore: de-duplicate check
This commit is contained in:
parent
62fac61c4d
commit
98ee2d162b
@ -126,26 +126,20 @@ public class EntitySpawnListener implements Listener {
|
||||
Plot plot = location.getOwnedPlotAbs();
|
||||
EntityType type = entity.getType();
|
||||
if (plot == null) {
|
||||
if (!area.isMobSpawning()) {
|
||||
if (type == EntityType.PLAYER) {
|
||||
return;
|
||||
}
|
||||
if (type == EntityType.DROPPED_ITEM) {
|
||||
if (Settings.Enabled_Components.KILL_ROAD_ITEMS) {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (type.isAlive()) {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
if (type == EntityType.DROPPED_ITEM) {
|
||||
if (Settings.Enabled_Components.KILL_ROAD_ITEMS) {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (!area.isMobSpawning()) {
|
||||
if (type == EntityType.PLAYER) {
|
||||
return;
|
||||
}
|
||||
if (type.isAlive()) {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
if (!area.isMiscSpawnUnowned() && !type.isAlive()) {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user