Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-12-24 15:20:35 +01:00
Send disconnect message on getting kicked from the server
Dieser Commit ist enthalten in:
Ursprung
03c9729e63
Commit
0acb1ed7d4
@ -452,7 +452,7 @@ public class ConnectedPlayer implements MinecraftConnectionAssociation, Player {
|
|||||||
if (newResult == null || !newResult) {
|
if (newResult == null || !newResult) {
|
||||||
disconnect(friendlyReason);
|
disconnect(friendlyReason);
|
||||||
} else {
|
} else {
|
||||||
sendMessage(VelocityMessages.MOVED_TO_NEW_SERVER);
|
sendMessage(VelocityMessages.MOVED_TO_NEW_SERVER.append(friendlyReason));
|
||||||
}
|
}
|
||||||
}, minecraftConnection.eventLoop());
|
}, minecraftConnection.eventLoop());
|
||||||
} else if (event.getResult() instanceof Notify) {
|
} else if (event.getResult() instanceof Notify) {
|
||||||
|
@ -21,7 +21,7 @@ public class VelocityMessages {
|
|||||||
public static final Component ALREADY_CONNECTED = TextComponent
|
public static final Component ALREADY_CONNECTED = TextComponent
|
||||||
.of("You are already connected to this proxy!", TextColor.RED);
|
.of("You are already connected to this proxy!", TextColor.RED);
|
||||||
public static final Component MOVED_TO_NEW_SERVER = TextComponent
|
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() {
|
private VelocityMessages() {
|
||||||
throw new AssertionError();
|
throw new AssertionError();
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren