Add setActualDifficulty; Fixes #382

I also changed the difficulty properties to use setActualDifficulty.
This commit is contained in:
Eric Stokes 2012-01-10 19:29:55 -07:00
parent b006a458db
commit 91c9e175d0
2 changed files with 11 additions and 2 deletions

View File

@ -236,7 +236,16 @@ public class MVWorld implements MultiverseWorld {
*/
public boolean setActualKeepSpawnInMemory() {
// Ensure the memory setting is correct
this.world.setKeepSpawnInMemory(this.getKnownProperty("memory", Boolean.class).getValue());
this.getCBWorld().setKeepSpawnInMemory(this.getKnownProperty("memory", Boolean.class).getValue());
return true;
}
/**
* Used by the active difficulty-property to set the "actual" property.
* @return True if the property was successfully set.
*/
public boolean setActualDifficulty() {
this.getCBWorld().setDifficulty(this.getKnownProperty("difficulty", Difficulty.class).getValue());
return true;
}

View File

@ -106,7 +106,7 @@ public class DifficultyConfigProperty implements MVActiveConfigProperty<Difficul
*/
@Override
public String getMethod() {
return "setDifficulty";
return "setActualDifficulty";
}
/**