From 0acb1ed7d4e21a793a0ef583e6102c6f3a36d88c Mon Sep 17 00:00:00 2001 From: Andrew Steinborn Date: Mon, 29 Jul 2019 14:27:40 -0400 Subject: [PATCH] Send disconnect message on getting kicked from the server --- .../proxy/connection/client/ConnectedPlayer.java | 2 +- .../java/com/velocitypowered/proxy/util/VelocityMessages.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ConnectedPlayer.java b/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ConnectedPlayer.java index 4d37cd324..97140e06e 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ConnectedPlayer.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ConnectedPlayer.java @@ -452,7 +452,7 @@ public class ConnectedPlayer implements MinecraftConnectionAssociation, Player { if (newResult == null || !newResult) { disconnect(friendlyReason); } else { - sendMessage(VelocityMessages.MOVED_TO_NEW_SERVER); + sendMessage(VelocityMessages.MOVED_TO_NEW_SERVER.append(friendlyReason)); } }, minecraftConnection.eventLoop()); } else if (event.getResult() instanceof Notify) { diff --git a/proxy/src/main/java/com/velocitypowered/proxy/util/VelocityMessages.java b/proxy/src/main/java/com/velocitypowered/proxy/util/VelocityMessages.java index 1a4d29337..4acf5889f 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/util/VelocityMessages.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/util/VelocityMessages.java @@ -21,7 +21,7 @@ public class VelocityMessages { public static final Component ALREADY_CONNECTED = TextComponent .of("You are already connected to this proxy!", TextColor.RED); public static final Component MOVED_TO_NEW_SERVER = TextComponent - .of("You were moved from the server you were on because you were kicked", TextColor.RED); + .of("The server you were on kicked you: ", TextColor.RED); private VelocityMessages() { throw new AssertionError();