mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2024-11-07 03:11:02 +01:00
And this is why we need unit tests...
This commit is contained in:
parent
86d3628b1c
commit
6e7daf4e85
@ -749,13 +749,15 @@ public class MVWorld {
|
||||
int diff = Integer.parseInt(difficulty);
|
||||
if (diff >= 0 && diff <= 3) {
|
||||
worlddiff = Difficulty.getByValue(diff);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
} catch (Exception e2) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
this.getCBWorld().setDifficulty(worlddiff);
|
||||
config.setProperty("worlds." + this.name + ".difficulty", worlddiff);
|
||||
config.setProperty("worlds." + this.name + ".difficulty", worlddiff.getValue());
|
||||
saveConfig();
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user