mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-25 22:56: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();
|
Plot plot = location.getOwnedPlotAbs();
|
||||||
EntityType type = entity.getType();
|
EntityType type = entity.getType();
|
||||||
if (plot == null) {
|
if (plot == null) {
|
||||||
if (!area.isMobSpawning()) {
|
|
||||||
if (type == EntityType.PLAYER) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (type == EntityType.DROPPED_ITEM) {
|
if (type == EntityType.DROPPED_ITEM) {
|
||||||
if (Settings.Enabled_Components.KILL_ROAD_ITEMS) {
|
if (Settings.Enabled_Components.KILL_ROAD_ITEMS) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (!area.isMobSpawning()) {
|
||||||
|
if (type == EntityType.PLAYER) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (type.isAlive()) {
|
if (type.isAlive()) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (type == EntityType.DROPPED_ITEM) {
|
|
||||||
if (Settings.Enabled_Components.KILL_ROAD_ITEMS) {
|
|
||||||
event.setCancelled(true);
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!area.isMiscSpawnUnowned() && !type.isAlive()) {
|
if (!area.isMiscSpawnUnowned() && !type.isAlive()) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user