Added regions.use-creature-spawn-event configuration setting.

This commit is contained in:
sk89q 2012-07-23 13:43:44 -07:00
parent 6c8d13690e
commit ba5be6071f
2 changed files with 4 additions and 1 deletions

View File

@ -94,6 +94,7 @@ public class ConfigurationManager {
private boolean hasCommandBookGodMode = false;
public boolean useRegionsScheduler;
public boolean useRegionsCreatureSpawnEvent;
public boolean activityHaltToggle = false;
public boolean autoGodMode;
public boolean usePlayerMove;
@ -137,6 +138,8 @@ public void load() {
config.removeProperty("suppress-tick-sync-warnings");
useRegionsScheduler = config.getBoolean(
"regions.use-scheduler", true);
useRegionsCreatureSpawnEvent = config.getBoolean(
"regions.use-creature-spawn-event", true);
autoGodMode = config.getBoolean(
"auto-invincible", config.getBoolean("auto-invincible-permission", false));
config.removeProperty("auto-invincible-permission");

View File

@ -624,7 +624,7 @@ public void onCreatureSpawn(CreatureSpawnEvent event) {
Location eventLoc = event.getLocation();
if (wcfg.useRegions) {
if (wcfg.useRegions && cfg.useRegionsCreatureSpawnEvent) {
Vector pt = toVector(eventLoc);
RegionManager mgr = plugin.getGlobalRegionManager().get(eventLoc.getWorld());
// @TODO get victims' stacktraces and find out why it's null anyway