Open Goinging opened 4 months ago
This is still an issue on the newest version of this plugin and on the newest discordsrv snapshot for me.
Perhaps that player had never joined the game after your server updated to 1.20.6?
No that is not the case this bug occurs with any player who is not on the server. It gives the same error everytime in the console. Could it have something to do with how either plugin is configured?
Perhaps that player had never joined the game after your server updated to 1.20.6?
So I figured out a way to replicate the bug and the reason why you likely are not able to. Basically older playerdata files are having trouble being read by the plugin and I confirmed with fresh files and everything. I have no idea how the plugin reads playerdata, but I have attached my playerdata file which triggers the bug. I will also note that this bug even effects new players on my server so I have to guess that even slightly old playerdata files cause this bug. Here is that playerdata file https://drive.google.com/file/d/1mHqtb786RKay2I3Vte0lQqyIAAE7WYIm/view?usp=sharing
Same problem, server initially on 1.21 purpur, if player is offline then error (-1) and "Can't insert TAG_Int into TAG_Byte_Array"
I FIGURED IT OUT! Okay so my server has paper tweaks which is basically vanilla tweaks but in plugin form. We have the module Armored Elytra turned on which basically allows you to combine a chestplate and a elytra which just gives the elytra boosted stats. It can also carry over enchants from the chestplate, but I have found this bug occurs even without enchants. It is possible that components like this break the plugin or one of its dependencies. But anyway if you have an armored elytra in your inventory this bug will occur. When someone does /playerlist for your account. If I had to guess this is probably an issue with a dependency, but either way this really should be fixed as customized items are common across servers.
Same problem, server initially on 1.21 purpur, if player is offline then error (-1) and "Can't insert TAG_Int into TAG_Byte_Array"
Do you have the armored elytra datapack on your server or the plugin version? If not I would try holding custom items in your inventory and testing which ones causes it.
Do you mind sharing the data components/nbt tag of the item that causes the issue?
Here is the /data of the item I had the same idea just now {count: 1, Slot: 7b, components: {"minecraft:attribute_modifiers": {modifiers: [{type: "minecraft:generic.armor", amount: 8.0d, operation: "add_value", id: "minecraft:armor.chestplate", slot: "chest"}, {type: "minecraft:generic.armor_toughness", amount: 3.0d, operation: "add_value", id: "minecraft:armor.chestplate", slot: "chest"}, {type: "minecraft:generic.knockback_resistance", amount: 0.10000000149011612d, operation: "add_value", id: "minecraft:armor.chestplate", slot: "chest"}]}, "minecraft:lore": ['{"extra":[{"italic":false,"text":"+ Netherite Chestplate"}],"text":""}', '{"extra":["go_ing elytra"],"text":""}'], "minecraft:enchantments": {levels: {"minecraft:mending": 1, "minecraft:unbreaking": 3, "minecraft:protection": 4}}, "minecraft:custom_data": {PublicBukkitValues: {"vanillatweaks:ae.chestplate_item": [B; -84B, -19B, 0B, 5B, 115B, 114B, 0B, 26B, 111B, 114B, 103B, 46B, 98B, 117B, 107B, 107B, 105B, 116B, 46B, 117B, 116B, 105B, 108B, 46B, 105B, 111B, 46B, 87B, 114B, 97B, 112B, 112B, 101B, 114B, -14B, 80B, 71B, -20B, -15B, 18B, 111B, 5B, 2B, 0B, 1B, 76B, 0B, 3B, 109B, 97B, 112B, 116B, 0B, 15B, 76B, 106B, 97B, 118B, 97B, 47B, 117B, 116B, 105B, 108B, 47B, 77B, 97B, 112B, 59B, 120B, 112B, 115B, 114B, 0B, 53B, 99B, 111B, 109B, 46B, 103B, 111B, 111B, 103B, 108B, 101B, 46B, 99B, 111B, 109B, 109B, 111B, 110B, 46B, 99B, 111B, 108B, 108B, 101B, 99B, 116B, 46B, 73B, 109B, 109B, 117B, 116B, 97B, 98B, 108B, 101B, 77B, 97B, 112B, 36B, 83B, 101B, 114B, 105B, 97B, 108B, 105B, 122B, 101B, 100B, 70B, 111B, 114B, 109B,<...>], "vanillatweaks:ae.elytra_item": [B; -84B, -19B, 0B, 5B, 115B, 114B, 0B, 26B, 111B, 114B, 103B, 46B, 98B, 117B, 107B, 107B, 105B, 116B, 46B, 117B, 116B, 105B, 108B, 46B, 105B, 111B, 46B, 87B, 114B, 97B, 112B, 112B, 101B, 114B, -14B, 80B, 71B, -20B, -15B, 18B, 111B, 5B, 2B, 0B, 1B, 76B, 0B, 3B, 109B, 97B, 112B, 116B, 0B, 15B, 76B, 106B, 97B, 118B, 97B, 47B, 117B, 116B, 105B, 108B, 47B, 77B, 97B, 112B, 59B, 120B, 112B, 115B, 114B, 0B, 53B, 99B, 111B, 109B, 46B, 103B, 111B, 111B, 103B, 108B, 101B, 46B, 99B, 111B, 109B, 109B, 111B, 110B, 46B, 99B, 111B, 108B, 108B, 101B, 99B, 116B, 46B, 73B, 109B, 109B, 117B, 116B, 97B, 98B, 108B, 101B, 77B, 97B, 112B, 36B, 83B, 101B, 114B, 105B, 97B, 108B, 105B, 122B, 101B, 100B, 70B, 111B, 114B, 109B,<...>], "vanillatweaks:ae.is_armored_elytra": 1b}}}, id: "minecraft:elytra"}
This is the item I did the data get for it has enchants and stuff which isn't important
Didn't realize before, but basically the same error happens when you do /item in the discord if you have a armored elytra in your inventory. I was also talking to a different dev and they suggested this bug may have something to do with the new Json format past 1.20.6.
[15:59:04 WARN]: java.lang.RuntimeException: com.mojang.brigadier.exceptions.CommandSyntaxException: Can't insert TAG_Int into TAG_Byte_Array at position 587: ..._item":[B;<--[HERE] [15:59:04 WARN]: at InteractiveChat-4.2.12.0.jar//com.loohp.interactivechat.nms.V1_21_1.getItemFromNBTJson(V1_21_1.java:343) [15:59:04 WARN]: at InteractiveChat-4.2.12.0.jar//com.loohp.interactivechat.utils.ItemNBTUtils.getItemFromNBTJson(ItemNBTUtils.java:33) [15:59:04 WARN]: at InteractiveChat-4.2.12.0.jar//com.loohp.interactivechat.objectholders.ICPlayerFactory.getOfflineICPlayer(ICPlayerFactory.java:275) [15:59:04 WARN]: at InteractiveChatDiscordSrvAddon-4.2.12.0.jar//com.loohp.interactivechatdiscordsrvaddon.listeners.DiscordCommands.onSlashCommand(DiscordCommands.java:686) [15:59:04 WARN]: at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) [15:59:04 WARN]: at java.base/java.lang.reflect.Method.invoke(Method.java:580) [15:59:04 WARN]: at DiscordSRV-1.28.1-SNAPSHOT-219834a.jar//github.scarsz.discordsrv.api.ApiManager.invokeMethod(ApiManager.java:344) [15:59:04 WARN]: at DiscordSRV-1.28.1-SNAPSHOT-219834a.jar//github.scarsz.discordsrv.api.ApiManager.handleSlashCommandEvent(ApiManager.java:319) [15:59:04 WARN]: at DiscordSRV-1.28.1-SNAPSHOT-219834a.jar//github.scarsz.discordsrv.api.ApiManager.onSlashCommand(ApiManager.java:293) [15:59:04 WARN]: at DiscordSRV-1.28.1-SNAPSHOT-219834a.jar//github.scarsz.discordsrv.dependencies.jda.api.hooks.ListenerAdapter.onEvent(ListenerAdapter.java:483) [15:59:04 WARN]: at DiscordSRV-1.28.1-SNAPSHOT-219834a.jar//github.scarsz.discordsrv.dependencies.jda.api.hooks.InterfacedEventManager.handle(InterfacedEventManager.java:96) [15:59:04 WARN]: at DiscordSRV-1.28.1-SNAPSHOT-219834a.jar//github.scarsz.discordsrv.dependencies.jda.internal.hooks.EventManagerProxy.handleInternally(EventManagerProxy.java:88) [15:59:04 WARN]: at DiscordSRV-1.28.1-SNAPSHOT-219834a.jar//github.scarsz.discordsrv.dependencies.jda.internal.hooks.EventManagerProxy.handle(EventManagerProxy.java:70) [15:59:04 WARN]: at DiscordSRV-1.28.1-SNAPSHOT-219834a.jar//github.scarsz.discordsrv.dependencies.jda.internal.JDAImpl.handleEvent(JDAImpl.java:159) [15:59:04 WARN]: at DiscordSRV-1.28.1-SNAPSHOT-219834a.jar//github.scarsz.discordsrv.dependencies.jda.internal.handle.InteractionCreateHandler.handleCommand(InteractionCreateHandler.java:75) [15:59:04 WARN]: at DiscordSRV-1.28.1-SNAPSHOT-219834a.jar//github.scarsz.discordsrv.dependencies.jda.internal.handle.InteractionCreateHandler.handleInternally(InteractionCreateHandler.java:59) [15:59:04 WARN]: at DiscordSRV-1.28.1-SNAPSHOT-219834a.jar//github.scarsz.discordsrv.dependencies.jda.internal.handle.SocketHandler.handle(SocketHandler.java:36) [15:59:04 WARN]: at DiscordSRV-1.28.1-SNAPSHOT-219834a.jar//github.scarsz.discordsrv.dependencies.jda.internal.requests.WebSocketClient.onDispatch(WebSocketClient.java:952) [15:59:04 WARN]: at DiscordSRV-1.28.1-SNAPSHOT-219834a.jar//github.scarsz.discordsrv.dependencies.jda.internal.requests.WebSocketClient.onEvent(WebSocketClient.java:839) [15:59:04 WARN]: at DiscordSRV-1.28.1-SNAPSHOT-219834a.jar//github.scarsz.discordsrv.dependencies.jda.internal.requests.WebSocketClient.handleEvent(WebSocketClient.java:817) [15:59:04 WARN]: at DiscordSRV-1.28.1-SNAPSHOT-219834a.jar//github.scarsz.discordsrv.dependencies.jda.internal.requests.WebSocketClient.onBinaryMessage(WebSocketClient.java:991) [15:59:04 WARN]: at DiscordSRV-1.28.1-SNAPSHOT-219834a.jar//github.scarsz.discordsrv.dependencies.ws.client.ListenerManager.callOnBinaryMessage(ListenerManager.java:385) [15:59:04 WARN]: at DiscordSRV-1.28.1-SNAPSHOT-219834a.jar//github.scarsz.discordsrv.dependencies.ws.client.ReadingThread.callOnBinaryMessage(ReadingThread.java:276) [15:59:04 WARN]: at DiscordSRV-1.28.1-SNAPSHOT-219834a.jar//github.scarsz.discordsrv.dependencies.ws.client.ReadingThread.handleBinaryFrame(ReadingThread.java:996) [15:59:04 WARN]: at DiscordSRV-1.28.1-SNAPSHOT-219834a.jar//github.scarsz.discordsrv.dependencies.ws.client.ReadingThread.handleFrame(ReadingThread.java:755) [15:59:04 WARN]: at DiscordSRV-1.28.1-SNAPSHOT-219834a.jar//github.scarsz.discordsrv.dependencies.ws.client.ReadingThread.main(ReadingThread.java:108) [15:59:04 WARN]: at DiscordSRV-1.28.1-SNAPSHOT-219834a.jar//github.scarsz.discordsrv.dependencies.ws.client.ReadingThread.runMain(ReadingThread.java:64) [15:59:04 WARN]: at DiscordSRV-1.28.1-SNAPSHOT-219834a.jar//github.scarsz.discordsrv.dependencies.ws.client.WebSocketThread.run(WebSocketThread.java:45) [15:59:04 WARN]: Caused by: com.mojang.brigadier.exceptions.CommandSyntaxException: Can't insert TAG_Int into TAG_Byte_Array at position 587: ..._item":[B;<--[HERE]
Works fine for online players just not offline. Edit: Updating the error its the same just with the newer versions of everything,