(fix) Check if the returned textmap is null

This commit is contained in:
KingRainbow44
2023-11-25 23:08:18 -05:00
parent e39d244aae
commit 5930270e55

View File

@@ -27,7 +27,11 @@ public class Handbook {
try {
textMap = JsonUtils.loadToMap(LunarCore.getConfig().getResourceDir() + "/TextMap/TextMap" + language + ".json", Long.class, String.class);
} catch (Exception e) {
e.printStackTrace();
LunarCore.getLogger().error("Error loading text map: " + language, e);
return;
}
if (textMap == null) {
return;
}