LOOHP / InteractiveChat-DiscordSRV-Addon

Add InteractiveChat functionalities to DiscordSRV as an addon
https://www.spigotmc.org/resources/83917/
GNU General Public License v3.0
38 stars 15 forks source link

[ERROR] Unable to load language #62

Open WaxenSs opened 2 months ago

WaxenSs commented 2 months ago

Hello, the texture pack of my Minecraft 1.21.1 server under Paper doesn't want to be downloaded by the plugin. It is integrated in the server.properties file with resource-pack=,resource-pack-id=andresource-pack-sha1=configured. In the config fileIncludeServerResourcePack:is set totrue` but I still get this error message:

com.loohp.interactivechatdiscordsrvaddon.resources.ResourceLoadingException: Unable to load language X/plugins/InteractiveChatDiscordSrvAddon/server-resource-packs/X/assets/minecraft/lang/en_us.json
 at InteractiveChatDiscordSrvAddon-4.2.12.0.jar//com.loohp.interactivechatdiscordsrvaddon.resources.languages.LanguageManager.loadDirectory(LanguageManager.java:111)
LOOHP commented 2 months ago

Can you post the whole stacktrace?

WaxenSs commented 2 months ago

Yes !

[16:52:26 WARN]: com.loohp.interactivechatdiscordsrvaddon.resources.ResourceLoadingException: Unable to load language /Users/X/Developer/Repositories/Minecraft-SMP/plugins/InteractiveChatDiscordSrvAddon/server-resource-packs/C338CA488ACAB5D4ACD6CD462B0C1331AA956F19/assets/minecraft/lang/en_us.json
[16:52:26 WARN]:        at InteractiveChatDiscordSrvAddon-4.2.12.0.jar//com.loohp.interactivechatdiscordsrvaddon.resources.languages.LanguageManager.loadDirectory(LanguageManager.java:111)
[16:52:26 WARN]:        at InteractiveChatDiscordSrvAddon-4.2.12.0.jar//com.loohp.interactivechatdiscordsrvaddon.resources.ResourceManager.loadAssets(ResourceManager.java:404)
[16:52:26 WARN]:        at InteractiveChatDiscordSrvAddon-4.2.12.0.jar//com.loohp.interactivechatdiscordsrvaddon.resources.ResourceManager.loadResources(ResourceManager.java:305)
[16:52:26 WARN]:        at InteractiveChatDiscordSrvAddon-4.2.12.0.jar//com.loohp.interactivechatdiscordsrvaddon.resources.ResourceManager.loadResources(ResourceManager.java:119)
[16:52:26 WARN]:        at InteractiveChatDiscordSrvAddon-4.2.12.0.jar//com.loohp.interactivechatdiscordsrvaddon.InteractiveChatDiscordSrvAddon.lambda$reloadTextures$17(InteractiveChatDiscordSrvAddon.java:783)
[16:52:26 WARN]:        at org.bukkit.craftbukkit.scheduler.CraftTask.run(CraftTask.java:86)
[16:52:26 WARN]:        at org.bukkit.craftbukkit.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57)
[16:52:26 WARN]:        at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22)
[16:52:26 WARN]:        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
[16:52:26 WARN]:        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
[16:52:26 WARN]:        at java.base/java.lang.Thread.run(Thread.java:1583)
[16:52:26 WARN]: Caused by: com.loohp.interactivechat.libs.com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 172 column 6 path $.Defeat an Evoker
[16:52:26 WARN]:        at InteractiveChat-4.2.12.0.jar//com.loohp.interactivechat.libs.com.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1659)
[16:52:26 WARN]:        at InteractiveChat-4.2.12.0.jar//com.loohp.interactivechat.libs.com.google.gson.stream.JsonReader.checkLenient(JsonReader.java:1465)
[16:52:26 WARN]:        at InteractiveChat-4.2.12.0.jar//com.loohp.interactivechat.libs.com.google.gson.stream.JsonReader.nextNonWhitespace(JsonReader.java:1447)
[16:52:26 WARN]:        at InteractiveChat-4.2.12.0.jar//com.loohp.interactivechat.libs.com.google.gson.stream.JsonReader.doPeek(JsonReader.java:503)
[16:52:26 WARN]:        at InteractiveChat-4.2.12.0.jar//com.loohp.interactivechat.libs.com.google.gson.stream.JsonReader.hasNext(JsonReader.java:422)
[16:52:26 WARN]:        at InteractiveChat-4.2.12.0.jar//com.loohp.interactivechat.libs.com.google.gson.internal.bind.TypeAdapters$28.read(TypeAdapters.java:779)
[16:52:26 WARN]:        at InteractiveChat-4.2.12.0.jar//com.loohp.interactivechat.libs.com.google.gson.internal.bind.TypeAdapters$28.read(TypeAdapters.java:725)
[16:52:26 WARN]:        at InteractiveChat-4.2.12.0.jar//com.loohp.interactivechat.libs.com.google.gson.internal.bind.TypeAdapters$34$1.read(TypeAdapters.java:1007)
[16:52:26 WARN]:        at InteractiveChatDiscordSrvAddon-4.2.12.0.jar//com.loohp.interactivechatdiscordsrvaddon.resources.AbstractManager.readJSONObject(AbstractManager.java:48)
[16:52:26 WARN]:        at InteractiveChatDiscordSrvAddon-4.2.12.0.jar//com.loohp.interactivechatdiscordsrvaddon.resources.languages.LanguageManager.loadDirectory(LanguageManager.java:100)
[16:52:26 WARN]:        ... 10 more
[16:52:26 WARN]: com.loohp.interactivechatdiscordsrvaddon.resources.ResourceLoadingException: Unable to load language /Users/X/Developer/Repositories/Minecraft-SMP/plugins/InteractiveChatDiscordSrvAddon/server-resource-packs/C338CA488ACAB5D4ACD6CD462B0C1331AA956F19/assets/minecraft/lang/fr_fr.json
[16:52:26 WARN]:        at InteractiveChatDiscordSrvAddon-4.2.12.0.jar//com.loohp.interactivechatdiscordsrvaddon.resources.languages.LanguageManager.loadDirectory(LanguageManager.java:111)
[16:52:26 WARN]:        at InteractiveChatDiscordSrvAddon-4.2.12.0.jar//com.loohp.interactivechatdiscordsrvaddon.resources.ResourceManager.loadAssets(ResourceManager.java:404)
[16:52:26 WARN]:        at InteractiveChatDiscordSrvAddon-4.2.12.0.jar//com.loohp.interactivechatdiscordsrvaddon.resources.ResourceManager.loadResources(ResourceManager.java:305)
[16:52:26 WARN]:        at InteractiveChatDiscordSrvAddon-4.2.12.0.jar//com.loohp.interactivechatdiscordsrvaddon.resources.ResourceManager.loadResources(ResourceManager.java:119)
[16:52:26 WARN]:        at InteractiveChatDiscordSrvAddon-4.2.12.0.jar//com.loohp.interactivechatdiscordsrvaddon.InteractiveChatDiscordSrvAddon.lambda$reloadTextures$17(InteractiveChatDiscordSrvAddon.java:783)
[16:52:26 WARN]:        at org.bukkit.craftbukkit.scheduler.CraftTask.run(CraftTask.java:86)
[16:52:26 WARN]:        at org.bukkit.craftbukkit.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57)
[16:52:26 WARN]:        at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22)
[16:52:26 WARN]:        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
[16:52:26 WARN]:        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
[16:52:26 WARN]:        at java.base/java.lang.Thread.run(Thread.java:1583)
[16:52:26 WARN]: Caused by: com.loohp.interactivechat.libs.com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 171 column 6 path $.Defeat an Evoker
[16:52:26 WARN]:        at InteractiveChat-4.2.12.0.jar//com.loohp.interactivechat.libs.com.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1659)
[16:52:26 WARN]:        at InteractiveChat-4.2.12.0.jar//com.loohp.interactivechat.libs.com.google.gson.stream.JsonReader.checkLenient(JsonReader.java:1465)
[16:52:26 WARN]:        at InteractiveChat-4.2.12.0.jar//com.loohp.interactivechat.libs.com.google.gson.stream.JsonReader.nextNonWhitespace(JsonReader.java:1447)
[16:52:26 WARN]:        at InteractiveChat-4.2.12.0.jar//com.loohp.interactivechat.libs.com.google.gson.stream.JsonReader.doPeek(JsonReader.java:503)
[16:52:26 WARN]:        at InteractiveChat-4.2.12.0.jar//com.loohp.interactivechat.libs.com.google.gson.stream.JsonReader.hasNext(JsonReader.java:422)
[16:52:26 WARN]:        at InteractiveChat-4.2.12.0.jar//com.loohp.interactivechat.libs.com.google.gson.internal.bind.TypeAdapters$28.read(TypeAdapters.java:779)
[16:52:26 WARN]:        at InteractiveChat-4.2.12.0.jar//com.loohp.interactivechat.libs.com.google.gson.internal.bind.TypeAdapters$28.read(TypeAdapters.java:725)
[16:52:26 WARN]:        at InteractiveChat-4.2.12.0.jar//com.loohp.interactivechat.libs.com.google.gson.internal.bind.TypeAdapters$34$1.read(TypeAdapters.java:1007)
[16:52:26 WARN]:        at InteractiveChatDiscordSrvAddon-4.2.12.0.jar//com.loohp.interactivechatdiscordsrvaddon.resources.AbstractManager.readJSONObject(AbstractManager.java:48)
[16:52:26 WARN]:        at InteractiveChatDiscordSrvAddon-4.2.12.0.jar//com.loohp.interactivechatdiscordsrvaddon.resources.languages.LanguageManager.loadDirectory(LanguageManager.java:100)
[16:52:26 WARN]:        ... 10 more
LOOHP commented 2 months ago

Does the resource pack still work on discord despite this error?

WaxenSs commented 2 months ago

It’s true that I forgot to tell you but yes it works.

WaxenSs commented 1 month ago

Do you have a solution?

LOOHP commented 1 month ago

If it works then it's probably your language json file has invalid syntax.

WaxenSs commented 1 month ago

I also get the same error when I reset the configs files for the 2 plugins

LOOHP commented 1 month ago

It's about the language json file in your custom resource pack, not the config files.