Mc2Discord

Mc2Discord

50.4k Downloads

[1.12.2] Server crashing on wrong `/tellraw` command

Krutoy242 opened this issue ยท 2 comments

commented

Describe the bug

I testing /tellraw commands on my 1.12.2 MC server.

Command:

/tellraw @a {}

Expected behavior

This how it works without Mc2Discord. Server just typing in chat Invalid json: , with this line in debug.log file:

[Server thread/INFO] [net.minecraft.server.dedicated.DedicatedServer]: Invalid json: 

debug.log without crash

Actual behavior

Tested on mc2discord-forge-1.12.2-3.3.0.

Server crashing with log:

Description: Exception in server tick loop

com.google.gson.JsonParseException: Don't know how to turn {} into a Component
    at net.minecraft.util.text.ITextComponent$Serializer.deserialize(ITextComponent.java:145)
    at net.minecraft.util.text.ITextComponent$Serializer.deserialize(ITextComponent.java:43)
    at com.google.gson.internal.bind.TreeTypeAdapter.read(TreeTypeAdapter.java:69)
    at net.minecraft.util.JsonUtils.gsonDeserialize(SourceFile:492)
    at net.minecraft.util.JsonUtils.gsonDeserialize(SourceFile:517)
    at net.minecraft.util.text.ITextComponent$Serializer.jsonToComponent(ITextComponent.java:271)
    at ml.denisd3d.mc2discord.forge.Events.onCommandEvent(Events.java:109)
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_912_Events_onCommandEvent_CommandEvent.invoke(.dynamic)
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
    at com.github.terminatornl.laggoggles.tickcentral.EventBusTransformer.redirectEvent(EventBusTransformer.java:67)
    at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182)

crash-2023-08-13_10.14.52-server.txt

Your config file

No response

commented

Hi,
Looks like a missing error handling
Thanks for reporting, I will fix that as soon as possible

commented

Fixed in 3.3.1