From dd28ccd4bb67b9660b18318092ba4447837fb616 Mon Sep 17 00:00:00 2001 From: ILikePlayingGames <22475143+ILikePlayingGames@users.noreply.github.com> Date: Sat, 9 Dec 2023 02:55:48 -0500 Subject: [PATCH] Disable online resource fetching - Fixes Crowdin CDN error - Online resource fetching disabled as resources are no longer updated --- .../biscuit/skyblockaddons/gui/EnchantmentSettingsGui.java | 2 +- .../java/codes/biscuit/skyblockaddons/gui/SettingsGui.java | 2 +- .../codes/biscuit/skyblockaddons/utils/data/DataUtils.java | 7 ++++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main/java/codes/biscuit/skyblockaddons/gui/EnchantmentSettingsGui.java b/src/main/java/codes/biscuit/skyblockaddons/gui/EnchantmentSettingsGui.java index b8f5bce639..b7162463ef 100644 --- a/src/main/java/codes/biscuit/skyblockaddons/gui/EnchantmentSettingsGui.java +++ b/src/main/java/codes/biscuit/skyblockaddons/gui/EnchantmentSettingsGui.java @@ -141,7 +141,7 @@ protected void actionPerformed(GuiButton abstractButton) { if (abstractButton instanceof ButtonLanguage) { Language language = ((ButtonLanguage) abstractButton).getLanguage(); main.getConfigValues().setLanguage(language); - DataUtils.loadLocalizedStrings(true); + DataUtils.loadLocalizedStrings(false); main.setKeyBindingDescriptions(); returnToGui(); } else if (abstractButton instanceof ButtonSwitchTab) { diff --git a/src/main/java/codes/biscuit/skyblockaddons/gui/SettingsGui.java b/src/main/java/codes/biscuit/skyblockaddons/gui/SettingsGui.java index 8f7dd10350..cd8c89f30f 100644 --- a/src/main/java/codes/biscuit/skyblockaddons/gui/SettingsGui.java +++ b/src/main/java/codes/biscuit/skyblockaddons/gui/SettingsGui.java @@ -178,7 +178,7 @@ public void drawScreen(int mouseX, int mouseY, float partialTicks) { protected void actionPerformed(GuiButton abstractButton) { if (abstractButton instanceof ButtonLanguage) { Language language = ((ButtonLanguage) abstractButton).getLanguage(); - DataUtils.loadLocalizedStrings(language, true); + DataUtils.loadLocalizedStrings(language, false); main.setKeyBindingDescriptions(); returnToGui(); } else if (abstractButton instanceof ButtonSwitchTab) { diff --git a/src/main/java/codes/biscuit/skyblockaddons/utils/data/DataUtils.java b/src/main/java/codes/biscuit/skyblockaddons/utils/data/DataUtils.java index 360c31c9bc..aa19225279 100644 --- a/src/main/java/codes/biscuit/skyblockaddons/utils/data/DataUtils.java +++ b/src/main/java/codes/biscuit/skyblockaddons/utils/data/DataUtils.java @@ -121,7 +121,8 @@ public class DataUtils { } connectionManager.setMaxTotal(5); connectionManager.setDefaultMaxPerRoute(5); - registerRemoteRequests(); + // Disable online fetching due to EOL + // registerRemoteRequests(); } //TODO: Migrate all data file loading to this class @@ -406,9 +407,9 @@ static String getFileNameFromUrlString(String url) { private static void registerRemoteRequests() { remoteRequests.add(new OnlineDataRequest()); - if (SkyblockAddons.getInstance().getConfigValues().getLanguage() != Language.ENGLISH) { +/* if (SkyblockAddons.getInstance().getConfigValues().getLanguage() != Language.ENGLISH) { remoteRequests.add(new LocalizedStringsRequest(SkyblockAddons.getInstance().getConfigValues().getLanguage())); - } + }*/ remoteRequests.add(new EnchantedItemListsRequest()); remoteRequests.add(new ContainersRequest()); remoteRequests.add(new CompactorItemsRequest());