Removed synchronization from setDefaults() due to how SerializationConfig operates.

This commit is contained in:
Jeremy Wood 2012-08-05 00:26:55 -04:00
parent 5335e73707
commit 944f961ee5
2 changed files with 20 additions and 22 deletions

View File

@ -639,27 +639,25 @@ public class MVWorld extends SerializationConfig implements MultiverseWorld {
*/ */
@Override @Override
protected void setDefaults() { protected void setDefaults() {
synchronized (propertyLock) { this.hidden = false;
this.hidden = false; this.alias = new String();
this.alias = new String(); this.color = EnglishChatColor.WHITE;
this.color = EnglishChatColor.WHITE; this.style = EnglishChatStyle.NORMAL;
this.style = EnglishChatStyle.NORMAL; this.scale = getDefaultScale(environment);
this.scale = getDefaultScale(environment); this.respawnWorld = new String();
this.respawnWorld = new String(); this.allowWeather = true;
this.allowWeather = true; this.spawning = new SpawnSettings();
this.spawning = new SpawnSettings(); this.entryfee = new EntryFee();
this.entryfee = new EntryFee(); this.hunger = true;
this.hunger = true; this.autoHeal = true;
this.autoHeal = true; this.adjustSpawn = true;
this.adjustSpawn = true; this.portalForm = AllowedPortalType.ALL;
this.portalForm = AllowedPortalType.ALL; this.gameMode = GameMode.SURVIVAL;
this.gameMode = GameMode.SURVIVAL; this.spawnLocation = (world != null) ? new SpawnLocation(world.get().getSpawnLocation()) : new NullLocation();
this.spawnLocation = (world != null) ? new SpawnLocation(world.get().getSpawnLocation()) : new NullLocation(); this.autoLoad = true;
this.autoLoad = true; this.bedRespawn = true;
this.bedRespawn = true; this.worldBlacklist = new ArrayList<String>();
this.worldBlacklist = new ArrayList<String>(); this.generator = null;
this.generator = null;
}
} }
/** /**

View File

@ -78,7 +78,7 @@ public class MultiverseCoreConfiguration extends SerializationConfig implements
public void setDefaults() { public void setDefaults() {
// BEGIN CHECKSTYLE-SUPPRESSION: MagicNumberCheck // BEGIN CHECKSTYLE-SUPPRESSION: MagicNumberCheck
enforceaccess = false; enforceaccess = false;
setPrefixChat(true); prefixchat = true;
teleportintercept = true; teleportintercept = true;
firstspawnoverride = true; firstspawnoverride = true;
displaypermerrors = true; displaypermerrors = true;