This commit is contained in:
Jake Potrebic
2024-06-13 16:32:45 -07:00
parent e0f5e2a1d5
commit dfa326fc2f
45 changed files with 148 additions and 229 deletions

View File

@@ -2819,7 +2819,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
}
+ // Paper start - adventure
+ public void disconnect(@Nullable final net.kyori.adventure.text.Component reason) {
+ public void disconnect(final net.kyori.adventure.text.Component reason) {
+ this.disconnect(io.papermc.paper.adventure.PaperAdventure.asVanilla(reason));
+ }
+ // Paper end - adventure
@@ -3082,7 +3082,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
// CraftBukkit start - disconnect safely
for (ServerPlayer player : this.players) {
- player.connection.disconnect(CraftChatMessage.fromStringOrEmpty(this.server.server.getShutdownMessage())); // CraftBukkit - add custom shutdown message
+ player.connection.disconnect(this.server.server.shutdownMessage()); // CraftBukkit - add custom shutdown message // Paper - Adventure
+ player.connection.disconnect(java.util.Objects.requireNonNullElseGet(this.server.server.shutdownMessage(), net.kyori.adventure.text.Component::empty)); // CraftBukkit - add custom shutdown message // Paper - Adventure
}
// CraftBukkit end