mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2024-11-02 16:59:56 +01:00
Fix null environments for worlds
This commit is contained in:
parent
19da230723
commit
be8ff3ad6d
@ -50,6 +50,7 @@ public class MVWorld {
|
||||
this.generator = world.getGenerator();
|
||||
this.generatorString = generatorString;
|
||||
this.seed = seed;
|
||||
this.environment = world.getEnvironment();
|
||||
|
||||
this.initLists();
|
||||
|
||||
@ -78,7 +79,7 @@ public class MVWorld {
|
||||
|
||||
this.setRealMobBehaviors();
|
||||
|
||||
config.setProperty("worlds." + this.name + ".environment", world.getEnvironment());
|
||||
config.setProperty("worlds." + this.name + ".environment", this.environment);
|
||||
config.setProperty("worlds." + this.name + ".generatorString",generatorString);
|
||||
if (seed != null) {
|
||||
config.setProperty("worlds." + this.name + ".seed", this.seed);
|
||||
|
@ -393,7 +393,7 @@ public class MultiverseCore extends JavaPlugin {
|
||||
public boolean addWorld(String name, Environment env, String seedString, String generator) {
|
||||
|
||||
Long seed = null;
|
||||
if (seedString.length() > 0) {
|
||||
if (seedString != null && seedString.length() > 0) {
|
||||
try {
|
||||
seed = Long.parseLong(seedString);
|
||||
} catch (NumberFormatException numberformatexception) {
|
||||
|
Loading…
Reference in New Issue
Block a user