mirror of
https://github.com/Melledy/LunarCore.git
synced 2025-12-16 15:24:44 +01:00
(fix) Check if the returned textmap is null
This commit is contained in:
@@ -27,7 +27,11 @@ public class Handbook {
|
|||||||
try {
|
try {
|
||||||
textMap = JsonUtils.loadToMap(LunarCore.getConfig().getResourceDir() + "/TextMap/TextMap" + language + ".json", Long.class, String.class);
|
textMap = JsonUtils.loadToMap(LunarCore.getConfig().getResourceDir() + "/TextMap/TextMap" + language + ".json", Long.class, String.class);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
LunarCore.getLogger().error("Error loading text map: " + language, e);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (textMap == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user