mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-26 07:06:44 +01:00
Add new switch conditions to entity spawning
This commit is contained in:
parent
267dea4693
commit
fa8b18f3d5
@ -2162,8 +2162,16 @@ import java.util.regex.Pattern;
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case REINFORCEMENTS:
|
case REINFORCEMENTS:
|
||||||
|
case VILLAGE_DEFENSE:
|
||||||
|
case VILLAGE_INVASION:
|
||||||
case NATURAL:
|
case NATURAL:
|
||||||
case CHUNK_GEN:
|
case CHUNK_GEN:
|
||||||
|
case SILVERFISH_BLOCK:
|
||||||
|
case ENDER_PEARL:
|
||||||
|
case DROWNED:
|
||||||
|
case CURED:
|
||||||
|
case DEFAULT:
|
||||||
|
case LIGHTNING:
|
||||||
if (!area.MOB_SPAWNING) {
|
if (!area.MOB_SPAWNING) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
return;
|
return;
|
||||||
@ -2268,16 +2276,7 @@ import java.util.regex.Pattern;
|
|||||||
Entity ignitingEntity = event.getIgnitingEntity();
|
Entity ignitingEntity = event.getIgnitingEntity();
|
||||||
Block block = event.getBlock();
|
Block block = event.getBlock();
|
||||||
BlockIgniteEvent.IgniteCause igniteCause = event.getCause();
|
BlockIgniteEvent.IgniteCause igniteCause = event.getCause();
|
||||||
Location location1;
|
Location location1 = BukkitUtil.getLocation(block.getLocation());
|
||||||
if (block != null) {
|
|
||||||
location1 = BukkitUtil.getLocation(block.getLocation());
|
|
||||||
} else if (ignitingEntity != null) {
|
|
||||||
location1 = BukkitUtil.getLocation(ignitingEntity);
|
|
||||||
} else if (player != null) {
|
|
||||||
location1 = BukkitUtil.getLocation(player);
|
|
||||||
} else {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
PlotArea area = location1.getPlotArea();
|
PlotArea area = location1.getPlotArea();
|
||||||
if (area == null) {
|
if (area == null) {
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user