mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2025-02-09 09:01:31 +01:00
Add setActualDifficulty; Fixes #382
I also changed the difficulty properties to use setActualDifficulty.
This commit is contained in:
parent
b006a458db
commit
91c9e175d0
@ -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;
|
||||
}
|
||||
|
||||
|
@ -106,7 +106,7 @@ public class DifficultyConfigProperty implements MVActiveConfigProperty<Difficul
|
||||
*/
|
||||
@Override
|
||||
public String getMethod() {
|
||||
return "setDifficulty";
|
||||
return "setActualDifficulty";
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user