From cba1f9395aa1d6353e694176d16a941ea6ac23fc Mon Sep 17 00:00:00 2001 From: Gregorius Techneticies Date: Mon, 19 Jun 2023 20:09:07 +0200 Subject: [PATCH] Fixed Server Crash --- CHANGELOG.md | 1 + src/main/java/gregapi/lang/LanguageHandler.java | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index dd10eae03..6c0c45498 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ Nothing (I tend to only add finished Stuff to the Changelog). 6.16.01: (Not released yet) +[FIXED] a Serverside Only Crash because the Lang File does not exist on Servers. Happened while I made Books localizable, lol. But it's fixed now. [FIXED] Electric Wires and cables did not connect properly to other Mods Blocks, especially IC2, but only when Funky Locomotion was NOT installed. diff --git a/src/main/java/gregapi/lang/LanguageHandler.java b/src/main/java/gregapi/lang/LanguageHandler.java index 2b592af7a..6300765c9 100644 --- a/src/main/java/gregapi/lang/LanguageHandler.java +++ b/src/main/java/gregapi/lang/LanguageHandler.java @@ -100,6 +100,7 @@ public static String get(String aKey, String aDefault) { } public static String langfile(String aKey, String aEnglish) { + if (sLangFile == null) return aEnglish; Property tProperty = sLangFile.get("LanguageFile", aKey, aEnglish); if (tProperty.wasRead() && mWritingEnabled) sLangFile.save(); return tProperty.getString();