Fix handling message in PlayerHandshakeEvent (#7542)
This commit is contained in:
@@ -24,9 +24,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ if (event.callEvent()) {
|
||||
+ // If we've failed somehow, let the client know so and go no further.
|
||||
+ if (event.isFailed()) {
|
||||
+ TranslatableComponent chatmessage = new TranslatableComponent(event.getFailMessage());
|
||||
+ this.connection.send(new ClientboundLoginDisconnectPacket(chatmessage));
|
||||
+ this.connection.disconnect(chatmessage);
|
||||
+ Component component = io.papermc.paper.adventure.PaperAdventure.asVanilla(event.failMessage());
|
||||
+ this.connection.send(new ClientboundLoginDisconnectPacket(component));
|
||||
+ this.connection.disconnect(component);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
|
||||
Reference in New Issue
Block a user