From 53f06832f1de672aac5f28a7018b1676fc551866 Mon Sep 17 00:00:00 2001 From: nossr50 Date: Tue, 26 Feb 2019 20:02:02 -0800 Subject: [PATCH] Locale NPE --- src/main/java/com/gmail/nossr50/config/MainConfig.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/gmail/nossr50/config/MainConfig.java b/src/main/java/com/gmail/nossr50/config/MainConfig.java index 1ee3a490f..a05efbc18 100644 --- a/src/main/java/com/gmail/nossr50/config/MainConfig.java +++ b/src/main/java/com/gmail/nossr50/config/MainConfig.java @@ -454,7 +454,10 @@ public class MainConfig extends ConfigValidated { } public String getLocale() { - return getStringValue(GENERAL, LOCALE, EN_US); + if(hasNode(GENERAL, LOCALE)) + return getStringValue(GENERAL, LOCALE); + else + return "en_US"; } public boolean getMOTDEnabled() {