Describe the bug
Certain chat messages are not being displayed because there is an error in the AntiSpamListener#accept() function. It's weird cause this only occurs from very few messages sent via a plugin.
Kind of hard to explain exactly what the actual issue is, but I do have an easy way to replicate it.
You'll see no response in chat. At first I thought it was an issue with the plugin. But after further debugging... it's something with the ChatUtils mod, as you're able to see the chat message without the mod.
Error from client logs:
[10:35:19] [Render thread/ERROR]:
Error executing task on Client
net.minecraft.class_148: Main thread packet handler
at net.minecraft.class_2600.method_11072(class_2600.java:33) ~[client-intermediary.jar:?]
at net.minecraft.class_1255.method_18859(class_1255.java:156) ~[client-intermediary.jar:?]
at net.minecraft.class_4093.method_18859(class_4093.java:23) ~[client-intermediary.jar:?]
at net.minecraft.class_1255.method_16075(class_1255.java:130) ~[client-intermediary.jar:?]
at net.minecraft.class_1255.method_5383(class_1255.java:115) ~[client-intermediary.jar:?]
at net.minecraft.class_310.method_1523(class_310.java:1283) ~[client-intermediary.jar:?]
at net.minecraft.class_310.method_1514(class_310.java:888) ~[client-intermediary.jar:?]
at net.minecraft.client.main.Main.main(Main.java:265) ~[1.20.4-0.15.6.jar:?]
at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:470) ~[fabric-loader-0.15.6.jar:?]
at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74) ~[fabric-loader-0.15.6.jar:?]
at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23) ~[fabric-loader-0.15.6.jar:?]
Caused by: java.lang.NullPointerException: likes[0]
at net.kyori.adventure.text.ComponentLike.asComponents(ComponentLike.java:76) ~[net_kyori_adventure-api-4.15.0-dda99c57db8c2b82.jar:?]
at net.kyori.adventure.text.TextComponentImpl.create(TextComponentImpl.java:49) ~[net_kyori_adventure-api-4.15.0-dda99c57db8c2b82.jar:?]
at net.kyori.adventure.text.Component.textOfChildren(Component.java:780) ~[net_kyori_adventure-api-4.15.0-dda99c57db8c2b82.jar:?]
at io.github.hotlava03.chatutils.listeners.AntiSpamListener.accept(AntiSpamListener.java:50) ~[chat-utils-1.10.3+1.20.4.jar:?]
at io.github.hotlava03.chatutils.events.ReceiveMessageCallback.lambda$static$0(ReceiveMessageCallback.java:15) ~[chat-utils-1.10.3+1.20.4.jar:?]
at net.minecraft.class_338.handler$zbc000$chat-utils$addMessage(class_338.java:1573) ~[client-intermediary.jar:?]
at net.minecraft.class_338.method_44811(class_338.java) ~[client-intermediary.jar:?]
at net.minecraft.class_338.method_1812(class_338.java:206) ~[client-intermediary.jar:?]
at net.minecraft.class_7594.method_44736(class_7594.java:196) ~[client-intermediary.jar:?]
at net.minecraft.class_634.method_43596(class_634.java:869) ~[client-intermediary.jar:?]
at net.minecraft.class_7439.method_43631(class_7439.java:20) ~[client-intermediary.jar:?]
at net.minecraft.class_7439.method_11054(class_7439.java:7) ~[client-intermediary.jar:?]
at net.minecraft.class_2600.method_11072(class_2600.java:24) ~[client-intermediary.jar:?]
... 10 more
Describe the bug Certain chat messages are not being displayed because there is an error in the
AntiSpamListener#accept()
function. It's weird cause this only occurs from very few messages sent via a plugin.Kind of hard to explain exactly what the actual issue is, but I do have an easy way to replicate it.
To Reproduce Steps to reproduce the behavior:
/ticket help
You'll see no response in chat. At first I thought it was an issue with the plugin. But after further debugging... it's something with the ChatUtils mod, as you're able to see the chat message without the mod.
Error from client logs:
For context, here are the full client logs