From c4dda419455fc97b4260506ca841edd6df5867a9 Mon Sep 17 00:00:00 2001 From: Daniel Saukel Date: Sat, 21 Apr 2018 15:39:52 +0200 Subject: [PATCH] Fix world config saving error --- .../java/io/github/dre2n/dungeonsxl/world/WorldConfig.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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);