LOOHP / InteractionVisualizer

Visualize Function Blocks like Crafting Tables with Animations client-side!
https://www.spigotmc.org/resources/77050/
GNU General Public License v3.0
78 stars 11 forks source link

Unable to setup languages and then item translation not work #76

Closed Cnzw closed 2 years ago

Cnzw commented 2 years ago

I'm in China, the terrible network block any request to most foreign website.

Plugin version: 1.17.0.3 (Lastest) Server: Paper 1.12.2 Config: Updater and DownloadLanguageFiles is FALSE

  1. I start server with VPN, that make network clear, plugin download language file and show item translation well.
  2. Stop server and disconnect VPN.
  3. Start again, show below log, and item show like "tile.dirt.default.name [4:59]".
[23:33:38] [Server thread/INFO]: [InteractionVisualizer] Enabling InteractionVisualizer v1.17.0.3
[23:33:38] [Server thread/INFO]: [InteractionVisualizer] LightAPI is recommended to be installed on servers with Minecraft version 1.16.5 or below!
[23:33:38] [Server thread/INFO]: [InteractionVisualizer] Loading languages...
[23:33:39] [Server thread/INFO]: [InteractionVisualizer] Opened Sqlite database successfully
[23:33:39] [Server thread/INFO]: [InteractiveChat] Legacy Bungeecord Chat API detected, using legacy methods...
[23:33:39] [Server thread/INFO]: [InteractionVisualizer] InteractionVisualizer has been enabled!
[23:33:39] [Server thread/INFO]: Done (1.752s)! For help, type "help" or "?"
[23:33:39] [Server thread/INFO]: Timings Reset
[23:33:39] [InteractionVisualizer Async Processing Thread #0/INFO]: [InteractionVisualizer] Unable to setup languages
[23:33:39] [InteractionVisualizer Async Processing Thread #0/WARN]: java.lang.NullPointerException
[23:33:39] [InteractionVisualizer Async Processing Thread #0/WARN]:     at java.io.StringReader.<init>(Unknown Source)
[23:33:39] [InteractionVisualizer Async Processing Thread #0/WARN]:     at org.json.simple.parser.JSONParser.parse(JSONParser.java:79)
[23:33:39] [InteractionVisualizer Async Processing Thread #0/WARN]:     at org.json.simple.parser.JSONParser.parse(JSONParser.java:75)
[23:33:39] [InteractionVisualizer Async Processing Thread #0/WARN]:     at com.loohp.interactionvisualizer.utils.HTTPRequestUtils.getJSONResponse(HTTPRequestUtils.java:25)
[23:33:39] [InteractionVisualizer Async Processing Thread #0/WARN]:     at com.loohp.interactionvisualizer.utils.LanguageUtils.lambda$loadTranslations$3(LanguageUtils.java:92)
[23:33:39] [InteractionVisualizer Async Processing Thread #0/WARN]:     at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
[23:33:39] [InteractionVisualizer Async Processing Thread #0/WARN]:     at java.util.concurrent.FutureTask.run(Unknown Source)
[23:33:39] [InteractionVisualizer Async Processing Thread #0/WARN]:     at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
[23:33:39] [InteractionVisualizer Async Processing Thread #0/WARN]:     at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
[23:33:39] [InteractionVisualizer Async Processing Thread #0/WARN]:     at java.lang.Thread.run(Unknown Source)
LOOHP commented 2 years ago

Unfortunately, the plugin needs an internet connection to check for updates and most importantly download the latest language files from Mojang. I guess I can change it so that it will still attempt to load the language files if exist on system even if connections cannot be made to download the latest ones. Edited: Added in 1.17.0.4

Cnzw commented 2 years ago

The problem fixed and work well, thanks a lot!