mirror of
https://github.com/TotalFreedomMC/TF-PlotSquared.git
synced 2025-02-15 13:26:00 +00:00
Fixes #1453
This commit is contained in:
parent
5642fd3899
commit
93414d54c1
1 changed files with 3 additions and 6 deletions
|
@ -23,6 +23,9 @@ public class EntitySpawnListener implements Listener {
|
||||||
}
|
}
|
||||||
Plot plot = area.getOwnedPlotAbs(location);
|
Plot plot = area.getOwnedPlotAbs(location);
|
||||||
if (plot == null) {
|
if (plot == null) {
|
||||||
|
if (!area.MOB_SPAWNING) {
|
||||||
|
event.setCancelled(true);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (Settings.Done.RESTRICT_BUILDING && plot.hasFlag(Flags.DONE)) {
|
if (Settings.Done.RESTRICT_BUILDING && plot.hasFlag(Flags.DONE)) {
|
||||||
|
@ -30,12 +33,6 @@ public class EntitySpawnListener implements Listener {
|
||||||
}
|
}
|
||||||
switch (entity.getType()) {
|
switch (entity.getType()) {
|
||||||
case ENDER_CRYSTAL:
|
case ENDER_CRYSTAL:
|
||||||
if (plot == null) {
|
|
||||||
if (!area.MOB_SPAWNING) {
|
|
||||||
event.setCancelled(true);
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (PlayerEvents.checkEntity(entity, plot)) {
|
if (PlayerEvents.checkEntity(entity, plot)) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue