mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-12-28 20:19:00 +01:00
Updated mob spawn control flags
This commit is contained in:
parent
40299eeea4
commit
423f0199d0
@ -313,11 +313,6 @@ public void onCreatureSpawn(CreatureSpawnEvent event) {
|
||||
case CHICKEN: if (plugin.blockCreatureSpawn.contains("chicken")) { cancelEvent = true; } creaName = "chicken"; break;
|
||||
}
|
||||
|
||||
if (cancelEvent) {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
|
||||
if (plugin.useRegions && creaName != "") {
|
||||
Vector pt = toVector(event.getEntity().getLocation());
|
||||
RegionManager mgr = plugin.getGlobalRegionManager().getRegionManager(event.getEntity().getWorld().getName());
|
||||
@ -326,11 +321,17 @@ public void onCreatureSpawn(CreatureSpawnEvent event) {
|
||||
.getBooleanAreaFlag("creaturespawn", creaName, true, null);
|
||||
if (flagValue != null) {
|
||||
if (!flagValue) {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
cancelEvent = true;
|
||||
} else {
|
||||
cancelEvent = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (cancelEvent) {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user