MCProtocolLib icon indicating copy to clipboard operation
MCProtocolLib copied to clipboard

Disconnect event reason is a string but its textcomponent

Open ghost opened this issue 4 years ago • 1 comments

@Override public void disconnected(DisconnectedEvent event) { System.out.print("Disconnected: " + event.getReason());

event.getReason() returns a string but the above code prints this: Disconnected: TextComponentImpl{content="", style=StyleImpl{color=null, obfuscated=not_set, bold=not_set, strikethrough=not_set, underlined=not_set, italic=not_set, clickEvent=null, hoverEvent=null, insertion=null, font=null}, children=[TextComponentImpl{content="Please...

This event should return a textcomponent from event.getReason or turn the component into legacy string form before putting it into the event.

ghost avatar Nov 28 '21 17:11 ghost

Confirmed from Geyser.

Camotoy avatar Nov 29 '21 21:11 Camotoy

This should now be addressed by making the disconnect events take in a Component.

Camotoy avatar Mar 15 '23 22:03 Camotoy