From bacbbe471fb9798f2fb1a7d06dd48639be23649c Mon Sep 17 00:00:00 2001 From: Daniel Saukel Date: Sat, 3 Dec 2016 13:31:07 +0100 Subject: [PATCH] Fix /dxl invite NPE; resolves #186 --- .../java/io/github/dre2n/dungeonsxl/config/WorldConfig.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/io/github/dre2n/dungeonsxl/config/WorldConfig.java b/core/src/main/java/io/github/dre2n/dungeonsxl/config/WorldConfig.java index 5ec33a7d..ee588409 100644 --- a/core/src/main/java/io/github/dre2n/dungeonsxl/config/WorldConfig.java +++ b/core/src/main/java/io/github/dre2n/dungeonsxl/config/WorldConfig.java @@ -302,8 +302,10 @@ public class WorldConfig extends GameRules { FileConfiguration configFile = YamlConfiguration.loadConfiguration(file); // Messages - for (int msgs : this.msgs.keySet()) { - configFile.set("message." + msgs, this.msgs.get(msgs)); + if (msgs != null) { + for (int msgs : this.msgs.keySet()) { + configFile.set("message." + msgs, this.msgs.get(msgs)); + } } List secureObjectIds = new ArrayList<>();