diff --git a/src/main/java/io/github/dre2n/dungeonsxl/world/WorldConfig.java b/src/main/java/io/github/dre2n/dungeonsxl/world/WorldConfig.java index 13dcdc5f..b415cbf4 100644 --- a/src/main/java/io/github/dre2n/dungeonsxl/world/WorldConfig.java +++ b/src/main/java/io/github/dre2n/dungeonsxl/world/WorldConfig.java @@ -324,7 +324,9 @@ public class WorldConfig extends GameRuleProvider { configFile.set("secureObjects", secureObjects); configFile.set("invitedPlayers", invitedPlayers); - configFile.set("worldEnvironment", worldEnvironment.name()); + if (worldEnvironment != null) { + configFile.set("worldEnvironment", worldEnvironment.name()); + } try { configFile.save(file);