mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 12:27:59 +01:00
Remove unneeded component conversion for kick msg (#5626)
This commit is contained in:
parent
94473dbc55
commit
e1a160ad32
@ -1513,7 +1513,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
// CraftBukkit start - disconnect safely
|
||||
for (EntityPlayer player : this.players) {
|
||||
- player.playerConnection.disconnect(this.server.server.getShutdownMessage()); // CraftBukkit - add custom shutdown message
|
||||
+ player.playerConnection.disconnect(PaperAdventure.asVanilla(this.server.server.shutdownMessage())); // CraftBukkit - add custom shutdown message // Paper - Adventure
|
||||
+ player.playerConnection.disconnect(this.server.server.shutdownMessage()); // CraftBukkit - add custom shutdown message // Paper - Adventure
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
@ -2186,9 +2186,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ org.spigotmc.AsyncCatcher.catchOp("player kick");
|
||||
+ final PlayerConnection connection = this.getHandle().playerConnection;
|
||||
+ if (connection != null) {
|
||||
+ connection.disconnect(io.papermc.paper.adventure.PaperAdventure.asVanilla(
|
||||
+ message == null ? net.kyori.adventure.text.Component.empty() : message
|
||||
+ ));
|
||||
+ connection.disconnect(message == null ? net.kyori.adventure.text.Component.empty() : message);
|
||||
+ }
|
||||
+ }
|
||||
+ // Paper end
|
||||
|
@ -89,7 +89,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
// CraftBukkit start - disconnect safely
|
||||
for (EntityPlayer player : this.players) {
|
||||
+ if (isRestarting) player.playerConnection.disconnect(org.spigotmc.SpigotConfig.restartMessage); else // Paper
|
||||
player.playerConnection.disconnect(PaperAdventure.asVanilla(this.server.server.shutdownMessage())); // CraftBukkit - add custom shutdown message // Paper - Adventure
|
||||
player.playerConnection.disconnect(this.server.server.shutdownMessage()); // CraftBukkit - add custom shutdown message // Paper - Adventure
|
||||
}
|
||||
// CraftBukkit end
|
||||
@@ -0,0 +0,0 @@ public abstract class PlayerList {
|
||||
|
Loading…
Reference in New Issue
Block a user