mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 13:16:45 +01:00
Bring v5 entity spawn changes to v6
This commit is contained in:
parent
ec8bdc9af6
commit
98e8476a88
@ -131,21 +131,24 @@ public class EntitySpawnListener implements Listener {
|
|||||||
}
|
}
|
||||||
Plot plot = location.getOwnedPlotAbs();
|
Plot plot = location.getOwnedPlotAbs();
|
||||||
if (plot == null) {
|
if (plot == null) {
|
||||||
if (!area.isMobSpawning()) {
|
|
||||||
EntityType type = entity.getType();
|
EntityType type = entity.getType();
|
||||||
|
if (!area.isMobSpawning()) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case DROPPED_ITEM:
|
case DROPPED_ITEM:
|
||||||
if (Settings.Enabled_Components.KILL_ROAD_ITEMS) {
|
if (Settings.Enabled_Components.KILL_ROAD_ITEMS) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
break;
|
return;
|
||||||
}
|
}
|
||||||
case PLAYER:
|
case PLAYER:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (type.isAlive() || !area.isMiscSpawnUnowned()) {
|
if (type.isAlive()) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!area.isMiscSpawnUnowned() && !type.isAlive()) {
|
||||||
|
event.setCancelled(true);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (Settings.Done.RESTRICT_BUILDING && DoneFlag.isDone(plot)) {
|
if (Settings.Done.RESTRICT_BUILDING && DoneFlag.isDone(plot)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user