mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2024-10-03 10:07:34 +02: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);
|
int diff = Integer.parseInt(difficulty);
|
||||||
if (diff >= 0 && diff <= 3) {
|
if (diff >= 0 && diff <= 3) {
|
||||||
worlddiff = Difficulty.getByValue(diff);
|
worlddiff = Difficulty.getByValue(diff);
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
} catch (Exception e2) {
|
} catch (Exception e2) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.getCBWorld().setDifficulty(worlddiff);
|
this.getCBWorld().setDifficulty(worlddiff);
|
||||||
config.setProperty("worlds." + this.name + ".difficulty", worlddiff);
|
config.setProperty("worlds." + this.name + ".difficulty", worlddiff.getValue());
|
||||||
saveConfig();
|
saveConfig();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user