Allow Geyser to boot if it cannot download en_US file (#1907)

This commit allows Geyser to start if it is unable to download Minecraft's English locale file, instead of throwing an exception that stops it.
This commit is contained in:
Camotoy 2021-02-07 22:57:44 -05:00 committed by GitHub
parent 66fcd87ce6
commit 3140d3ced7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -101,7 +101,7 @@ public class LocaleUtils {
ASSET_MAP.put(entry.getKey(), asset);
}
} catch (Exception e) {
GeyserConnector.getInstance().getLogger().info(LanguageUtils.getLocaleStringLog("geyser.locale.fail.asset_cache", (!e.getMessage().isEmpty() ? e.getMessage() : e.getStackTrace())));
GeyserConnector.getInstance().getLogger().error(LanguageUtils.getLocaleStringLog("geyser.locale.fail.asset_cache", (!e.getMessage().isEmpty() ? e.getMessage() : e.getStackTrace())));
}
}
@ -260,7 +260,7 @@ public class LocaleUtils {
// Delete the nolonger needed client/server jar
Files.delete(tmpFilePath);
} catch (Exception e) {
throw new AssertionError(LanguageUtils.getLocaleStringLog("geyser.locale.fail.en_us"), e);
GeyserConnector.getInstance().getLogger().error(LanguageUtils.getLocaleStringLog("geyser.locale.fail.en_us"), e);
}
}