diff --git a/patches/server/0052-Ensure-commands-are-not-ran-async.patch b/patches/server/0052-Ensure-commands-are-not-ran-async.patch deleted file mode 100644 index cbf81f326b..0000000000 --- a/patches/server/0052-Ensure-commands-are-not-ran-async.patch +++ /dev/null @@ -1,170 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Aikar -Date: Thu, 3 Mar 2016 01:17:12 -0600 -Subject: [PATCH] Ensure commands are not ran async - -Plugins calling Player.chat("/foo") or Server.dispatchCommand() could -trigger the server to execute a command while on another thread. - -These commands would then process EXPECTING to be on the main thread, leaving to -very hard to trace concurrency issues. - -This change will synchronize the command execution back to the main thread, causing a -big slowdown in execution but throwing an exception at same time to raise awareness -that it is happening so that plugin authors can fix their code to stop executing commands async. - -This also properly splits up the chat and command handling to reflect the server now -having separate packets for both, and the client always using the correct packet. Text -from a chat packet should never be parsed into a command, even if it starts with the `/` -character. - -Co-authored-by: Jake Potrebic - -diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 713cd247615f91fc0f762e59eae35a376ffce754..c69a2da951af082b8dc90baf35b7e020ffda0b5e 100644 ---- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2046,7 +2046,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic - return true; - } - -- private static boolean isChatMessageIllegal(String message) { -+ public static boolean isChatMessageIllegal(String message) { // Paper - private -> public - for (int i = 0; i < message.length(); ++i) { - if (!SharedConstants.isAllowedChatCharacter(message.charAt(i))) { - return true; -@@ -2063,7 +2063,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic - } - OutgoingChatMessage outgoing = OutgoingChatMessage.create(original); - -- if (!async && s.startsWith("/")) { -+ if (false && !async && s.startsWith("/")) { // Paper - don't handle commands in chat logic - this.handleCommand(s); - } else if (this.player.getChatVisibility() == ChatVisiblity.SYSTEM) { - // Do nothing, this is coming from a plugin -@@ -2147,7 +2147,29 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic - } - } - -- private void handleCommand(String s) { -+ public void handleCommand(String s) { // Paper - private -> public -+ // Paper Start -+ if (!org.spigotmc.AsyncCatcher.shuttingDown && !org.bukkit.Bukkit.isPrimaryThread()) { -+ LOGGER.error("Command Dispatched Async: " + s); -+ LOGGER.error("Please notify author of plugin causing this execution to fix this bug! see: http://bit.ly/1oSiM6C", new Throwable()); -+ Waitable wait = new Waitable<>() { -+ @Override -+ protected Void evaluate() { -+ ServerGamePacketListenerImpl.this.handleCommand(s); -+ return null; -+ } -+ }; -+ server.processQueue.add(wait); -+ try { -+ wait.get(); -+ return; -+ } catch (InterruptedException e) { -+ Thread.currentThread().interrupt(); // This is proper habit for java. If we aren't handling it, pass it on! -+ } catch (Exception e) { -+ throw new RuntimeException("Exception processing chat command", e.getCause()); -+ } -+ } -+ // Paper End - co.aikar.timings.MinecraftTimings.playerCommandTimer.startTiming(); // Paper - if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot - this.LOGGER.info(this.player.getScoreboardName() + " issued server command: " + s); -diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 9b725fe12c6f81b02ebea7a12a7c1312a27c6cb1..40c874d8f6a4d281078aadc34602bfbc6389df2a 100644 ---- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java -+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -886,6 +886,28 @@ public final class CraftServer implements Server { - Preconditions.checkArgument(commandLine != null, "commandLine cannot be null"); - org.spigotmc.AsyncCatcher.catchOp("command dispatch"); // Spigot - -+ // Paper Start -+ if (!org.spigotmc.AsyncCatcher.shuttingDown && !Bukkit.isPrimaryThread()) { -+ final CommandSender fSender = sender; -+ final String fCommandLine = commandLine; -+ Bukkit.getLogger().log(Level.SEVERE, "Command Dispatched Async: " + commandLine); -+ Bukkit.getLogger().log(Level.SEVERE, "Please notify author of plugin causing this execution to fix this bug! see: http://bit.ly/1oSiM6C", new Throwable()); -+ org.bukkit.craftbukkit.util.Waitable wait = new org.bukkit.craftbukkit.util.Waitable() { -+ @Override -+ protected Boolean evaluate() { -+ return dispatchCommand(fSender, fCommandLine); -+ } -+ }; -+ net.minecraft.server.MinecraftServer.getServer().processQueue.add(wait); -+ try { -+ return wait.get(); -+ } catch (InterruptedException e) { -+ Thread.currentThread().interrupt(); // This is proper habit for java. If we aren't handling it, pass it on! -+ } catch (Exception e) { -+ throw new RuntimeException("Exception processing dispatch command", e.getCause()); -+ } -+ } -+ // Paper End - if (this.commandMap.dispatch(sender, commandLine)) { - return true; - } -diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index f5e4713bd9f6d0661f4e8d45c0b7cfffcb2bce57..d9031a89cc087fef8c39bcb93c68d07b8b2ab474 100644 ---- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -492,7 +492,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { - - if (this.getHandle().connection == null) return; - -- this.getHandle().connection.chat(msg, PlayerChatMessage.system(msg), false); -+ // Paper start - improve chat handling -+ if (ServerGamePacketListenerImpl.isChatMessageIllegal(msg)) { -+ this.getHandle().connection.disconnect(Component.translatable("multiplayer.disconnect.illegal_characters")); -+ } else { -+ if (msg.startsWith("/")) { -+ this.getHandle().connection.handleCommand(msg); -+ } else { -+ final PlayerChatMessage playerChatMessage = PlayerChatMessage.system(msg).withResult(new net.minecraft.network.chat.ChatDecorator.ModernResult(Component.literal(msg), true, false)); -+ // TODO chat decorating -+ // TODO text filtering -+ this.getHandle().connection.chat(msg, playerChatMessage, false); -+ } -+ } -+ // Paper end - } - - @Override -diff --git a/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java b/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java -index 19c44daaa407b7c1c7a7ffe56fef8c8814c6d5b2..6a073a9dc44d93eba296a0e18a9c7be8a7881725 100644 ---- a/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java -+++ b/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java -@@ -13,6 +13,7 @@ public class ServerShutdownThread extends Thread { - public void run() { - try { - org.spigotmc.AsyncCatcher.enabled = false; // Spigot -+ org.spigotmc.AsyncCatcher.shuttingDown = true; // Paper - this.server.close(); - } finally { - try { -diff --git a/src/main/java/org/spigotmc/AsyncCatcher.java b/src/main/java/org/spigotmc/AsyncCatcher.java -index 05e94702e42b8f5c35d2a112c486d57948a3acba..5409f230fdd53b70fc03c58177438534731ad4e6 100644 ---- a/src/main/java/org/spigotmc/AsyncCatcher.java -+++ b/src/main/java/org/spigotmc/AsyncCatcher.java -@@ -6,6 +6,7 @@ public class AsyncCatcher - { - - public static boolean enabled = true; -+ public static boolean shuttingDown = false; // Paper - - public static void catchOp(String reason) - { -diff --git a/src/main/java/org/spigotmc/RestartCommand.java b/src/main/java/org/spigotmc/RestartCommand.java -index 882e93ad4471e3688f2fcfb1e6f16926786ee5e7..94d8ba376cd1f024b244654cac9bb62bb19e3060 100644 ---- a/src/main/java/org/spigotmc/RestartCommand.java -+++ b/src/main/java/org/spigotmc/RestartCommand.java -@@ -43,6 +43,7 @@ public class RestartCommand extends Command - private static void restart(final String restartScript) - { - AsyncCatcher.enabled = false; // Disable async catcher incase it interferes with us -+ org.spigotmc.AsyncCatcher.shuttingDown = true; // Paper - try - { - String[] split = restartScript.split( " " ); diff --git a/patches/server/0052-Improve-Player-chat-API-handling.patch b/patches/server/0052-Improve-Player-chat-API-handling.patch new file mode 100644 index 0000000000..09f16b4a11 --- /dev/null +++ b/patches/server/0052-Improve-Player-chat-API-handling.patch @@ -0,0 +1,80 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Thu, 3 Mar 2016 01:17:12 -0600 +Subject: [PATCH] Improve Player chat API handling + +Properly split up the chat and command handling to reflect the server now +having separate packets for both, and the client always using the correct packet. Text +from a chat packet should never be parsed into a command, even if it starts with the `/` +character. + +Add a missing async catcher and improve Spigot's async catcher error message. + +== AT == +public net.minecraft.server.network.ServerGamePacketListenerImpl isChatMessageIllegal(Ljava/lang/String;)Z + +Co-authored-by: Jake Potrebic +Co-authored-by: SoSeDiK + +diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +index 2c922afde237ca0e56ee6dc067f2989434d4d08c..a4f0cb93a08136888a81f1a8e7ed1d56f92e2195 100644 +--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java ++++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +@@ -2063,7 +2063,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic + } + OutgoingChatMessage outgoing = OutgoingChatMessage.create(original); + +- if (!async && s.startsWith("/")) { ++ if (false && !async && s.startsWith("/")) { // Paper - Don't handle commands in chat logic + this.handleCommand(s); + } else if (this.player.getChatVisibility() == ChatVisiblity.SYSTEM) { + // Do nothing, this is coming from a plugin +@@ -2147,7 +2147,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic + } + } + +- private void handleCommand(String s) { ++ public void handleCommand(String s) { // Paper - private -> public ++ org.spigotmc.AsyncCatcher.catchOp("Command Dispatched Async: " + s); // Paper - Add async catcher + co.aikar.timings.MinecraftTimings.playerCommandTimer.startTiming(); // Paper + if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot + this.LOGGER.info(this.player.getScoreboardName() + " issued server command: " + s); +diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +index 9b725fe12c6f81b02ebea7a12a7c1312a27c6cb1..0c54f973d8ce70c10b728bed28c3e50adf028aa6 100644 +--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java ++++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +@@ -884,7 +884,7 @@ public final class CraftServer implements Server { + public boolean dispatchCommand(CommandSender sender, String commandLine) { + Preconditions.checkArgument(sender != null, "sender cannot be null"); + Preconditions.checkArgument(commandLine != null, "commandLine cannot be null"); +- org.spigotmc.AsyncCatcher.catchOp("command dispatch"); // Spigot ++ org.spigotmc.AsyncCatcher.catchOp("Command Dispatched Async: " + commandLine); // Spigot // Paper - Include command in error message + + if (this.commandMap.dispatch(sender, commandLine)) { + return true; +diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +index f5b05eb97f059cfb4d6d22d0a180c5fd8a203f66..a3f85b1cf8b03da90f2461cbe42dd18a630f2255 100644 +--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java ++++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +@@ -492,7 +492,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { + + if (this.getHandle().connection == null) return; + +- this.getHandle().connection.chat(msg, PlayerChatMessage.system(msg), false); ++ // Paper start - Improve chat handling ++ if (ServerGamePacketListenerImpl.isChatMessageIllegal(msg)) { ++ this.getHandle().connection.disconnect(Component.translatable("multiplayer.disconnect.illegal_characters")); ++ } else { ++ if (msg.startsWith("/")) { ++ this.getHandle().connection.handleCommand(msg); ++ } else { ++ final PlayerChatMessage playerChatMessage = PlayerChatMessage.system(msg).withResult(new net.minecraft.network.chat.ChatDecorator.ModernResult(Component.literal(msg), true, false)); ++ // TODO chat decorating ++ // TODO text filtering ++ this.getHandle().connection.chat(msg, playerChatMessage, false); ++ } ++ } ++ // Paper end + } + + @Override diff --git a/patches/server/0054-Expose-server-CommandMap.patch b/patches/server/0054-Expose-server-CommandMap.patch index 59d197fc04..3f4fa7e7c5 100644 --- a/patches/server/0054-Expose-server-CommandMap.patch +++ b/patches/server/0054-Expose-server-CommandMap.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Expose server CommandMap diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 40c874d8f6a4d281078aadc34602bfbc6389df2a..a4d530e81a319ea53122760e352083b9708f9f04 100644 +index 0c54f973d8ce70c10b728bed28c3e50adf028aa6..566c4c6745dcd3a6434420e9b892ec295fe39500 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2035,6 +2035,7 @@ public final class CraftServer implements Server { +@@ -2013,6 +2013,7 @@ public final class CraftServer implements Server { return this.helpMap; } diff --git a/patches/server/0067-Allow-Reloading-of-Custom-Permissions.patch b/patches/server/0067-Allow-Reloading-of-Custom-Permissions.patch index 9f92b3f146..9a4804506c 100644 --- a/patches/server/0067-Allow-Reloading-of-Custom-Permissions.patch +++ b/patches/server/0067-Allow-Reloading-of-Custom-Permissions.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Allow Reloading of Custom Permissions https://github.com/PaperMC/Paper/issues/49 diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 49dada0a2b97552f080cda0b928f284ff02a25a3..3ce3ecec506930910c0c39a16d89e94ab79ae6f3 100644 +index a910b5a6be35236f39fc70aacd84d2047971aac1..39803ac3f17627e9ba3cac91a37ed347462da99a 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2639,5 +2639,23 @@ public final class CraftServer implements Server { +@@ -2617,5 +2617,23 @@ public final class CraftServer implements Server { } return this.adventure$audiences; } diff --git a/patches/server/0068-Remove-Metadata-on-reload.patch b/patches/server/0068-Remove-Metadata-on-reload.patch index e2a0ea4a9a..60127e7aa2 100644 --- a/patches/server/0068-Remove-Metadata-on-reload.patch +++ b/patches/server/0068-Remove-Metadata-on-reload.patch @@ -7,10 +7,10 @@ Metadata is not meant to persist reload as things break badly with non primitive This will remove metadata on reload so it does not crash everything if a plugin uses it. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 3ce3ecec506930910c0c39a16d89e94ab79ae6f3..7d6b5007c386ec174ccaf0abc48862f2f7cd8789 100644 +index 39803ac3f17627e9ba3cac91a37ed347462da99a..f463257f44104c38cfa35971276aa52a697b0414 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -973,8 +973,16 @@ public final class CraftServer implements Server { +@@ -951,8 +951,16 @@ public final class CraftServer implements Server { world.spigotConfig.init(); // Spigot } diff --git a/patches/server/0084-Add-PlayerUseUnknownEntityEvent.patch b/patches/server/0084-Add-PlayerUseUnknownEntityEvent.patch index c3c44a63b5..a2c2e3f7e2 100644 --- a/patches/server/0084-Add-PlayerUseUnknownEntityEvent.patch +++ b/patches/server/0084-Add-PlayerUseUnknownEntityEvent.patch @@ -28,10 +28,10 @@ index 644a0fdea6576647539b96528717dbaeab498d93..221e64a66ff12a8de5c75992fc26a54a + // Paper end - PlayerUseUnknownEntityEvent } diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index cad7df80d4914b533ce9db1a10b5923b5ffe578b..39f2db938edad3db6fa83d9f8431a28176d4011a 100644 +index 1c84143d271e70f6ffea301f3e93cd8ed8fd9bd1..6b87ed8b453b149bdd74eb3b164aa3bbcc8c2b13 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2543,8 +2543,38 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2522,8 +2522,38 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic }); } } diff --git a/patches/server/0106-Add-setting-for-proxy-online-mode-status.patch b/patches/server/0106-Add-setting-for-proxy-online-mode-status.patch index 896a2f68aa..275dbd183c 100644 --- a/patches/server/0106-Add-setting-for-proxy-online-mode-status.patch +++ b/patches/server/0106-Add-setting-for-proxy-online-mode-status.patch @@ -43,10 +43,10 @@ index da98f074ccd5a40c635824112c97fd174c393cb1..6599f874d9f97e9ef4862039ecad7277 } else { String[] astring1 = astring; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 7d6b5007c386ec174ccaf0abc48862f2f7cd8789..0a0ea4d8159a5ee8ca640d8c39f2ff78889a4712 100644 +index f463257f44104c38cfa35971276aa52a697b0414..f38b808355a06b0f276bfcdb8afe4c1d482214d4 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1744,7 +1744,7 @@ public final class CraftServer implements Server { +@@ -1722,7 +1722,7 @@ public final class CraftServer implements Server { // Spigot Start GameProfile profile = null; // Only fetch an online UUID in online mode diff --git a/patches/server/0113-Allow-Reloading-of-Command-Aliases.patch b/patches/server/0113-Allow-Reloading-of-Command-Aliases.patch index fd3f5a08a8..3119157c39 100644 --- a/patches/server/0113-Allow-Reloading-of-Command-Aliases.patch +++ b/patches/server/0113-Allow-Reloading-of-Command-Aliases.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Allow Reloading of Command Aliases Reload the aliases stored in commands.yml diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 0a0ea4d8159a5ee8ca640d8c39f2ff78889a4712..6014cf7de9a6a41b0c5ff03bfd2c88d55edd53e3 100644 +index f38b808355a06b0f276bfcdb8afe4c1d482214d4..a683ffa6e0b838b48274a1ea636ff30d169b0bc3 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2665,5 +2665,24 @@ public final class CraftServer implements Server { +@@ -2643,5 +2643,24 @@ public final class CraftServer implements Server { DefaultPermissions.registerCorePermissions(); CraftDefaultPermissions.registerCorePermissions(); } diff --git a/patches/server/0122-Properly-fix-item-duplication-bug.patch b/patches/server/0122-Properly-fix-item-duplication-bug.patch index aeadcbabfd..1bd763d76c 100644 --- a/patches/server/0122-Properly-fix-item-duplication-bug.patch +++ b/patches/server/0122-Properly-fix-item-duplication-bug.patch @@ -19,10 +19,10 @@ index 9e182c4cdf54c9ca7701660df72052d5c8936a55..5c855a15f7847ca37c263755f643eeb1 @Override diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 683c7fea13705ef78a4fd86f148428bb33956421..27ba015a10abea7e120f32565120c34a99b8d55b 100644 +index 54433d42a13b8967e38eeeb3052b8ff94c62c730..4233b912d44fb66d2a0502ad66bcf0b29e670f6d 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -3161,7 +3161,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3140,7 +3140,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } public final boolean isDisconnected() { diff --git a/patches/server/0131-Properly-handle-async-calls-to-restart-the-server.patch b/patches/server/0131-Properly-handle-async-calls-to-restart-the-server.patch index ccf39e1b83..e8f003b732 100644 --- a/patches/server/0131-Properly-handle-async-calls-to-restart-the-server.patch +++ b/patches/server/0131-Properly-handle-async-calls-to-restart-the-server.patch @@ -84,11 +84,11 @@ index cf110171ba47051eab94c0195eb155b685a25dca..bc96f426d488d2a206b763dccdc4034f } // CraftBukkit end diff --git a/src/main/java/org/spigotmc/RestartCommand.java b/src/main/java/org/spigotmc/RestartCommand.java -index 94d8ba376cd1f024b244654cac9bb62bb19e3060..a142a56a920e153ed84c08cece993f10d76f7793 100644 +index 882e93ad4471e3688f2fcfb1e6f16926786ee5e7..14eadb0f81dfad072d82d7793cce1a4dd3f2c5f0 100644 --- a/src/main/java/org/spigotmc/RestartCommand.java +++ b/src/main/java/org/spigotmc/RestartCommand.java -@@ -46,86 +46,134 @@ public class RestartCommand extends Command - org.spigotmc.AsyncCatcher.shuttingDown = true; // Paper +@@ -45,86 +45,134 @@ public class RestartCommand extends Command + AsyncCatcher.enabled = false; // Disable async catcher incase it interferes with us try { - String[] split = restartScript.split( " " ); diff --git a/patches/server/0132-Add-option-to-make-parrots-stay-on-shoulders-despite.patch b/patches/server/0132-Add-option-to-make-parrots-stay-on-shoulders-despite.patch index b5bded6025..d92a8dd699 100644 --- a/patches/server/0132-Add-option-to-make-parrots-stay-on-shoulders-despite.patch +++ b/patches/server/0132-Add-option-to-make-parrots-stay-on-shoulders-despite.patch @@ -14,10 +14,10 @@ To be converted into a Paper-API event at some point in the future? public net.minecraft.world.entity.player.Player removeEntitiesOnShoulder()V diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 27ba015a10abea7e120f32565120c34a99b8d55b..79ec73cbd1c44ec0ec5c6fff3c70501051a9ba42 100644 +index 4233b912d44fb66d2a0502ad66bcf0b29e670f6d..0c869475bc81b635e98fa5d396db434ecf2d54e4 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2331,6 +2331,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2310,6 +2310,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic switch (packet.getAction()) { case PRESS_SHIFT_KEY: this.player.setShiftKeyDown(true); diff --git a/patches/server/0133-Add-configuration-option-to-prevent-player-names-fro.patch b/patches/server/0133-Add-configuration-option-to-prevent-player-names-fro.patch index aa6e08e49e..3d7ab64e6b 100644 --- a/patches/server/0133-Add-configuration-option-to-prevent-player-names-fro.patch +++ b/patches/server/0133-Add-configuration-option-to-prevent-player-names-fro.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add configuration option to prevent player names from being diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 6014cf7de9a6a41b0c5ff03bfd2c88d55edd53e3..14d51e174f6acdc3606faa5ccd6ba3f1e8cf4749 100644 +index a683ffa6e0b838b48274a1ea636ff30d169b0bc3..5c58ba142b14423f699437fe79693ebb606a3219 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2684,5 +2684,10 @@ public final class CraftServer implements Server { +@@ -2662,5 +2662,10 @@ public final class CraftServer implements Server { commandMap.registerServerAliases(); return true; } diff --git a/patches/server/0134-Use-TerminalConsoleAppender-for-console-improvements.patch b/patches/server/0134-Use-TerminalConsoleAppender-for-console-improvements.patch index b0bb45c2e6..53d54bd20b 100644 --- a/patches/server/0134-Use-TerminalConsoleAppender-for-console-improvements.patch +++ b/patches/server/0134-Use-TerminalConsoleAppender-for-console-improvements.patch @@ -25,7 +25,7 @@ Other changes: Co-Authored-By: Emilia Kond diff --git a/build.gradle.kts b/build.gradle.kts -index d67bfb162d122f6944aa16219b754d8d6ee40fb8..df0c787a6e3cff522dc540aab3986692b4fc4cc3 100644 +index d88da6eb9753e8289705cd7c1f87b7b6e15d9606..65134c3604379223df991cf1b96ccc4d8936f4f9 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -6,9 +6,30 @@ plugins { @@ -389,7 +389,7 @@ index bc96f426d488d2a206b763dccdc4034fe24f269d..82db70c548336ada2af556251b8ae8d1 this.bans = new UserBanList(PlayerList.USERBANLIST_FILE); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 14d51e174f6acdc3606faa5ccd6ba3f1e8cf4749..8f407e9abe705a18e8b47902291ece9c42eab51c 100644 +index 5c58ba142b14423f699437fe79693ebb606a3219..22a359e3883765044e349cd4e785a64d00d6044d 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -44,7 +44,6 @@ import java.util.logging.Level; @@ -400,7 +400,7 @@ index 14d51e174f6acdc3606faa5ccd6ba3f1e8cf4749..8f407e9abe705a18e8b47902291ece9c import net.minecraft.advancements.Advancement; import net.minecraft.commands.CommandSourceStack; import net.minecraft.commands.Commands; -@@ -1312,9 +1311,13 @@ public final class CraftServer implements Server { +@@ -1290,9 +1289,13 @@ public final class CraftServer implements Server { return this.logger; } @@ -583,10 +583,10 @@ index 0b4c62387c1093652ac15b64a8703249de4cf088..b996fde481cebbbcce80a6c267591136 } } diff --git a/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java b/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java -index 6a073a9dc44d93eba296a0e18a9c7be8a7881725..b4a19d80bbf71591f25729fd0e98590350cb31d0 100644 +index 19c44daaa407b7c1c7a7ffe56fef8c8814c6d5b2..c6e8441e299f477ddb22c1ce2618710763978f1a 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java +++ b/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java -@@ -17,7 +17,7 @@ public class ServerShutdownThread extends Thread { +@@ -16,7 +16,7 @@ public class ServerShutdownThread extends Thread { this.server.close(); } finally { try { diff --git a/patches/server/0140-Add-UnknownCommandEvent.patch b/patches/server/0140-Add-UnknownCommandEvent.patch index 0397d711b1..05157f36f3 100644 --- a/patches/server/0140-Add-UnknownCommandEvent.patch +++ b/patches/server/0140-Add-UnknownCommandEvent.patch @@ -83,7 +83,7 @@ index 2fdfc17ef3daf9fb5cc32c807292c71e256d5356..e3394864e29357fec036f9e616472aea b1 = 0; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 8f407e9abe705a18e8b47902291ece9c42eab51c..06c215af9d6d4e73cd2bb6d799c35b890cc48e50 100644 +index 22a359e3883765044e349cd4e785a64d00d6044d..2ffc67b0b8f2e0f1fbc70099541f093887d9945c 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -526,6 +526,7 @@ public final class CraftServer implements Server { @@ -94,7 +94,7 @@ index 8f407e9abe705a18e8b47902291ece9c42eab51c..06c215af9d6d4e73cd2bb6d799c35b89 dispatcher.getDispatcher().getRoot().addChild(node); } else { -@@ -915,7 +916,13 @@ public final class CraftServer implements Server { +@@ -893,7 +894,13 @@ public final class CraftServer implements Server { // Spigot start if (!org.spigotmc.SpigotConfig.unknownCommandMessage.isEmpty()) { diff --git a/patches/server/0141-Basic-PlayerProfile-API.patch b/patches/server/0141-Basic-PlayerProfile-API.patch index f5c5f816a5..b252441f5c 100644 --- a/patches/server/0141-Basic-PlayerProfile-API.patch +++ b/patches/server/0141-Basic-PlayerProfile-API.patch @@ -596,7 +596,7 @@ index dc2ab968ed010289125ac08f0a9ea85af6f6e8bb..82a1a87822e3fc323b92e1aa30ddb0cd * Calculates distance between 2 entities * @param e1 diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java -index d8a4db5024fbe5a1240f53e515ceb7066f834972..b549de337b1556816e3c4932546693cc3b8ad5d3 100644 +index 017395b49d4cc0d12246332cc7d4d0113dcd5c5e..839055c2cb941c36c3d7e3eaf61a277b25d16acb 100644 --- a/src/main/java/net/minecraft/server/Main.java +++ b/src/main/java/net/minecraft/server/Main.java @@ -181,7 +181,7 @@ public class Main { @@ -631,7 +631,7 @@ index 4038bb76339d43f18770624bd7fecc79b8d7f2a9..2456edc11b29a92b1648937cd3dd6a9a String s1 = name.toLowerCase(Locale.ROOT); GameProfileCache.GameProfileInfo usercache_usercacheentry = (GameProfileCache.GameProfileInfo) this.profilesByName.get(s1); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 06c215af9d6d4e73cd2bb6d799c35b890cc48e50..648c29d0c06655e88f450872e8bc672f38eaec26 100644 +index 2ffc67b0b8f2e0f1fbc70099541f093887d9945c..d61b4894f4f575c1e4b55439afef327a5fa6c35e 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -261,6 +261,9 @@ import org.yaml.snakeyaml.error.MarkedYAMLException; @@ -652,7 +652,7 @@ index 06c215af9d6d4e73cd2bb6d799c35b890cc48e50..648c29d0c06655e88f450872e8bc672f CraftItemFactory.instance(); } -@@ -2699,5 +2703,37 @@ public final class CraftServer implements Server { +@@ -2677,5 +2681,37 @@ public final class CraftServer implements Server { public boolean suggestPlayerNamesWhenNullTabCompletions() { return io.papermc.paper.configuration.GlobalConfiguration.get().commands.suggestPlayerNamesWhenNullTabCompletions; } diff --git a/patches/server/0158-handle-ServerboundKeepAlivePacket-async.patch b/patches/server/0158-handle-ServerboundKeepAlivePacket-async.patch index d079322b2c..115f77fc35 100644 --- a/patches/server/0158-handle-ServerboundKeepAlivePacket-async.patch +++ b/patches/server/0158-handle-ServerboundKeepAlivePacket-async.patch @@ -15,10 +15,10 @@ also adding some additional logging in order to help work out what is causing random disconnections for clients. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index cf1d8913d74e2e1c1b8d6be53cdea4873cd2ee10..8a331d8a440455b0d49ba0b8bb65184fba13c43a 100644 +index 18c9c39fd5574326d9137724773b7403c3c3429d..63003915799f636af2d60778f059a5667e199baf 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -3120,14 +3120,18 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3099,14 +3099,18 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @Override public void handleKeepAlive(ServerboundKeepAlivePacket packet) { diff --git a/patches/server/0167-AsyncTabCompleteEvent.patch b/patches/server/0167-AsyncTabCompleteEvent.patch index 82d1169940..a965966ece 100644 --- a/patches/server/0167-AsyncTabCompleteEvent.patch +++ b/patches/server/0167-AsyncTabCompleteEvent.patch @@ -16,7 +16,7 @@ Also adds isCommand and getLocation to the sync TabCompleteEvent Co-authored-by: Aikar diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index bc5c661394d5c64f9d50a615583ff7eb646534db..74adfbde6e4635390a29f8e9155fa61a30631055 100644 +index 51edb4f6be04b9c3b0745bc13fe7ce7cc4868e59..a6e6c82be3a6f397c6cefbd843b17c86bb0ff2f7 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -790,12 +790,16 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @@ -91,10 +91,10 @@ index bc5c661394d5c64f9d50a615583ff7eb646534db..74adfbde6e4635390a29f8e9155fa61a @Override diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 648c29d0c06655e88f450872e8bc672f38eaec26..57674358b958226ff575eafffa872e76d6f0f5fa 100644 +index d61b4894f4f575c1e4b55439afef327a5fa6c35e..0b711440fa42c9e8584cd6fd1ba0d0bb540b833f 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2149,7 +2149,7 @@ public final class CraftServer implements Server { +@@ -2127,7 +2127,7 @@ public final class CraftServer implements Server { offers = this.tabCompleteChat(player, message); } diff --git a/patches/server/0183-getPlayerUniqueId-API.patch b/patches/server/0183-getPlayerUniqueId-API.patch index 4fc282154c..a9d6ccaab2 100644 --- a/patches/server/0183-getPlayerUniqueId-API.patch +++ b/patches/server/0183-getPlayerUniqueId-API.patch @@ -9,10 +9,10 @@ In Offline Mode, will return an Offline UUID This is a more performant way to obtain a UUID for a name than loading an OfflinePlayer diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 57674358b958226ff575eafffa872e76d6f0f5fa..b78c1362a2396f950f50e7ee093bbdd6ab1823f7 100644 +index 0b711440fa42c9e8584cd6fd1ba0d0bb540b833f..0666cf00a8904dcc9092200b2610600e0cf37603 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1747,6 +1747,25 @@ public final class CraftServer implements Server { +@@ -1725,6 +1725,25 @@ public final class CraftServer implements Server { return recipients.size(); } diff --git a/patches/server/0216-InventoryCloseEvent-Reason-API.patch b/patches/server/0216-InventoryCloseEvent-Reason-API.patch index d8909dadb3..699afab14c 100644 --- a/patches/server/0216-InventoryCloseEvent-Reason-API.patch +++ b/patches/server/0216-InventoryCloseEvent-Reason-API.patch @@ -75,7 +75,7 @@ index 3842caf61e388aa65b3a18c587480a7dabb8341b..bd7b8ede44a5971b034ffb75fbddbadd this.doCloseContainer(); } diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index a1b26e5a2b100bbfa4dcca6573720f3b891759dd..d3834e0bb41d26a0e5f36084409d795f94a53cff 100644 +index d01daadf038b381c4b0d7787553ccd341c0787af..2b71b1345a8fc20ca94b837323560c4d70df97fe 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -222,6 +222,7 @@ import org.bukkit.event.inventory.ClickType; @@ -86,7 +86,7 @@ index a1b26e5a2b100bbfa4dcca6573720f3b891759dd..d3834e0bb41d26a0e5f36084409d795f import org.bukkit.event.inventory.InventoryCreativeEvent; import org.bukkit.event.inventory.InventoryType.SlotType; import org.bukkit.event.inventory.SmithItemEvent; -@@ -2682,10 +2683,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2661,10 +2662,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @Override public void handleContainerClose(ServerboundContainerClosePacket packet) { @@ -173,7 +173,7 @@ index 74f1af3dccddf52965e5c91277be3592649e8cfa..552fb0be2f31bd52a5ae43526d55aa29 @Override public boolean isBlocking() { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 91eb7f4fb65fcaa4c953f9567971df243387816a..ef566466afb9665824e3f5c5c16a411cdf1abadc 100644 +index 0868e977d356a1e3b5c49c9c788d8e3d0cb85c84..240f90460ddddf8168b7bc661a55fe7e5c94c67d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1189,7 +1189,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0218-Refresh-player-inventory-when-cancelling-PlayerInter.patch b/patches/server/0218-Refresh-player-inventory-when-cancelling-PlayerInter.patch index 92de025acc..a8cdafd0c9 100644 --- a/patches/server/0218-Refresh-player-inventory-when-cancelling-PlayerInter.patch +++ b/patches/server/0218-Refresh-player-inventory-when-cancelling-PlayerInter.patch @@ -16,10 +16,10 @@ Refresh the player inventory when PlayerInteractEntityEvent is cancelled to avoid this problem. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index d3834e0bb41d26a0e5f36084409d795f94a53cff..4649d9bd175f88f1caade1618d08ae64a8aaa649 100644 +index 2b71b1345a8fc20ca94b837323560c4d70df97fe..32acb0ea31c3d617a0a087e11e5a8bfa6eb83db9 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2563,6 +2563,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2542,6 +2542,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } if (event.isCancelled()) { diff --git a/patches/server/0237-Add-Early-Warning-Feature-to-WatchDog.patch b/patches/server/0237-Add-Early-Warning-Feature-to-WatchDog.patch index 91a75ae620..768641c88c 100644 --- a/patches/server/0237-Add-Early-Warning-Feature-to-WatchDog.patch +++ b/patches/server/0237-Add-Early-Warning-Feature-to-WatchDog.patch @@ -33,10 +33,10 @@ index 97df17a1636ac1ba765a8e486cfbb46bfac9ee6c..980088f5af3d44d47b94ecde52cdc5f9 com.destroystokyo.paper.Metrics.PaperMetrics.startMetrics(); com.destroystokyo.paper.VersionHistoryManager.INSTANCE.getClass(); // load version history now diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index b78c1362a2396f950f50e7ee093bbdd6ab1823f7..2a4cddc0ed4d71b6db9112ff1397da5ddb433c1d 100644 +index 0666cf00a8904dcc9092200b2610600e0cf37603..df12f456131ea62de908573b67e1643e0b0e2e02 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -935,6 +935,7 @@ public final class CraftServer implements Server { +@@ -913,6 +913,7 @@ public final class CraftServer implements Server { @Override public void reload() { @@ -44,7 +44,7 @@ index b78c1362a2396f950f50e7ee093bbdd6ab1823f7..2a4cddc0ed4d71b6db9112ff1397da5d this.reloadCount++; this.configuration = YamlConfiguration.loadConfiguration(this.getConfigFile()); this.commandsConfiguration = YamlConfiguration.loadConfiguration(this.getCommandsConfigFile()); -@@ -1024,6 +1025,7 @@ public final class CraftServer implements Server { +@@ -1002,6 +1003,7 @@ public final class CraftServer implements Server { this.enablePlugins(PluginLoadOrder.STARTUP); this.enablePlugins(PluginLoadOrder.POSTWORLD); this.getPluginManager().callEvent(new ServerLoadEvent(ServerLoadEvent.LoadType.RELOAD)); diff --git a/patches/server/0282-Make-the-default-permission-message-configurable.patch b/patches/server/0282-Make-the-default-permission-message-configurable.patch index 1d37711a00..8451b55c3c 100644 --- a/patches/server/0282-Make-the-default-permission-message-configurable.patch +++ b/patches/server/0282-Make-the-default-permission-message-configurable.patch @@ -18,10 +18,10 @@ index 0dd48e4098191c8b6e29945d62bc473e9f3a1e77..ae51993e0de706cb62c96795ca9de766 } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 2a4cddc0ed4d71b6db9112ff1397da5ddb433c1d..4b3749c20f0530f3b1268827dfe8f7ee898322fb 100644 +index df12f456131ea62de908573b67e1643e0b0e2e02..867507780b5a94aeaf07daaf924e89a2bee6ecde 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2725,6 +2725,16 @@ public final class CraftServer implements Server { +@@ -2703,6 +2703,16 @@ public final class CraftServer implements Server { return io.papermc.paper.configuration.GlobalConfiguration.get().commands.suggestPlayerNamesWhenNullTabCompletions; } diff --git a/patches/server/0297-Limit-Client-Sign-length-more.patch b/patches/server/0297-Limit-Client-Sign-length-more.patch index 00e07463ba..8262e77b3a 100644 --- a/patches/server/0297-Limit-Client-Sign-length-more.patch +++ b/patches/server/0297-Limit-Client-Sign-length-more.patch @@ -22,7 +22,7 @@ it only impacts data sent from the client. Set -DPaper.maxSignLength=XX to change limit or -1 to disable diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index f286a4f65aba9706a1c7a6100b4045e6b47dc059..40955343416bc8db479d13cb7b86246b6ea4f276 100644 +index 6b49981d61e910d8d8fa09ff091359754e6d09a3..593f017a43153c081f007073926fa4f520bded00 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -302,6 +302,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @@ -33,7 +33,7 @@ index f286a4f65aba9706a1c7a6100b4045e6b47dc059..40955343416bc8db479d13cb7b86246b public ServerGamePacketListenerImpl(MinecraftServer server, Connection connection, ServerPlayer player) { this.lastChatTimeStamp = new AtomicReference(Instant.EPOCH); -@@ -3210,7 +3211,19 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3189,7 +3190,19 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @Override public void handleSignUpdate(ServerboundSignUpdatePacket packet) { diff --git a/patches/server/0315-Expose-the-internal-current-tick.patch b/patches/server/0315-Expose-the-internal-current-tick.patch index c5f2e9e9d5..859bbdccda 100644 --- a/patches/server/0315-Expose-the-internal-current-tick.patch +++ b/patches/server/0315-Expose-the-internal-current-tick.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Expose the internal current tick diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 4b3749c20f0530f3b1268827dfe8f7ee898322fb..7dae9866289e776c57e498121f79c1154809822d 100644 +index 867507780b5a94aeaf07daaf924e89a2bee6ecde..47212f800c4290c9912e9b9189381b148313a29a 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2766,5 +2766,10 @@ public final class CraftServer implements Server { +@@ -2744,5 +2744,10 @@ public final class CraftServer implements Server { profile.getProperties().putAll(((CraftPlayer)player).getHandle().getGameProfile().getProperties()); return new com.destroystokyo.paper.profile.CraftPlayerProfile(profile); } diff --git a/patches/server/0343-Anti-Xray.patch b/patches/server/0343-Anti-Xray.patch index cc9e19df42..4beab5af55 100644 --- a/patches/server/0343-Anti-Xray.patch +++ b/patches/server/0343-Anti-Xray.patch @@ -1573,10 +1573,10 @@ index b738e1f7debac7d70910d5ac908ca9d4f60640d5..269ebe8e8826a0c89e471cb59b503900 public CraftChunk(net.minecraft.world.level.chunk.LevelChunk chunk) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 7dae9866289e776c57e498121f79c1154809822d..e5eedc1ff0b60414406bb0b131e3b0170991f046 100644 +index 47212f800c4290c9912e9b9189381b148313a29a..dfa5364fe6ef4ab8edc826e7fde35d35cc000224 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2295,7 +2295,7 @@ public final class CraftServer implements Server { +@@ -2273,7 +2273,7 @@ public final class CraftServer implements Server { public ChunkGenerator.ChunkData createChunkData(World world) { Preconditions.checkArgument(world != null, "World cannot be null"); ServerLevel handle = ((CraftWorld) world).getHandle(); diff --git a/patches/server/0359-Add-tick-times-API-and-mspt-command.patch b/patches/server/0359-Add-tick-times-API-and-mspt-command.patch index fa98fef7a9..14c834648f 100644 --- a/patches/server/0359-Add-tick-times-API-and-mspt-command.patch +++ b/patches/server/0359-Add-tick-times-API-and-mspt-command.patch @@ -184,10 +184,10 @@ index 21d7196cdc694a581c8a3232a39e7454c0b30f56..498f06aa1d8b2c20f5bf31d6751f08cf + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index e5eedc1ff0b60414406bb0b131e3b0170991f046..6b7dc90df1d023d867f0eec30edd0e49f49899a1 100644 +index dfa5364fe6ef4ab8edc826e7fde35d35cc000224..0ece716ec813aa9e68f255fd20604f344f95276c 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2550,6 +2550,16 @@ public final class CraftServer implements Server { +@@ -2528,6 +2528,16 @@ public final class CraftServer implements Server { net.minecraft.server.MinecraftServer.getServer().tps15.getAverage() }; } diff --git a/patches/server/0360-Expose-MinecraftServer-isRunning.patch b/patches/server/0360-Expose-MinecraftServer-isRunning.patch index ae812ac0f7..eafe988660 100644 --- a/patches/server/0360-Expose-MinecraftServer-isRunning.patch +++ b/patches/server/0360-Expose-MinecraftServer-isRunning.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Expose MinecraftServer#isRunning This allows for plugins to detect if the server is actually turning off in onDisable rather than just plugins reloading. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 6b7dc90df1d023d867f0eec30edd0e49f49899a1..8d104a58a5ebe4e019d398f17286527f2d33dac7 100644 +index 0ece716ec813aa9e68f255fd20604f344f95276c..63cd64a6d88d4f14a446477812a87fc52504849e 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2781,5 +2781,10 @@ public final class CraftServer implements Server { +@@ -2759,5 +2759,10 @@ public final class CraftServer implements Server { public int getCurrentTick() { return net.minecraft.server.MinecraftServer.currentTick; } diff --git a/patches/server/0371-Improved-Watchdog-Support.patch b/patches/server/0371-Improved-Watchdog-Support.patch index 9a80560da7..262b7dc945 100644 --- a/patches/server/0371-Improved-Watchdog-Support.patch +++ b/patches/server/0371-Improved-Watchdog-Support.patch @@ -425,10 +425,10 @@ index 09c13423e055ad414651a5cab43d10be4041e6f3..d91a839819e260e90f810968077c4910 private static List asList(String... params) { return Arrays.asList(params); diff --git a/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java b/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java -index b4a19d80bbf71591f25729fd0e98590350cb31d0..e948ec5a573b22645664eb53bc3e9932246544e4 100644 +index c6e8441e299f477ddb22c1ce2618710763978f1a..e8e93538dfd71de86515d9405f728db1631e949a 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java +++ b/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java -@@ -12,12 +12,28 @@ public class ServerShutdownThread extends Thread { +@@ -12,11 +12,27 @@ public class ServerShutdownThread extends Thread { @Override public void run() { try { @@ -443,7 +443,6 @@ index b4a19d80bbf71591f25729fd0e98590350cb31d0..e948ec5a573b22645664eb53bc3e9932 + } + // Looks stalled, close async org.spigotmc.AsyncCatcher.enabled = false; // Spigot - org.spigotmc.AsyncCatcher.shuttingDown = true; // Paper + server.forceTicks = true; this.server.close(); + while (!server.hasFullyShutdown) Thread.sleep(1000); @@ -459,10 +458,10 @@ index b4a19d80bbf71591f25729fd0e98590350cb31d0..e948ec5a573b22645664eb53bc3e9932 } } diff --git a/src/main/java/org/spigotmc/RestartCommand.java b/src/main/java/org/spigotmc/RestartCommand.java -index a142a56a920e153ed84c08cece993f10d76f7793..92d97a5810a379b427a99b4c63fb9844d823a84f 100644 +index 14eadb0f81dfad072d82d7793cce1a4dd3f2c5f0..29b39dff0aceaa902f701162a42d3f2f881d6d5a 100644 --- a/src/main/java/org/spigotmc/RestartCommand.java +++ b/src/main/java/org/spigotmc/RestartCommand.java -@@ -139,7 +139,7 @@ public class RestartCommand extends Command +@@ -138,7 +138,7 @@ public class RestartCommand extends Command // Paper end // Paper start - copied from above and modified to return if the hook registered @@ -472,7 +471,7 @@ index a142a56a920e153ed84c08cece993f10d76f7793..92d97a5810a379b427a99b4c63fb9844 String[] split = restartScript.split( " " ); if ( split.length > 0 && new File( split[0] ).isFile() ) diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java -index b47d043144c499b1499f6b4be5a16a3f75c9fcb8..383c52c62f49b17db2fbf58009d6ea132d124bea 100644 +index b47d043144c499b1499f6b4be5a16a3f75c9fcb8..a9bd33b58a6a3296b70eaaaea3adbee74724e448 100644 --- a/src/main/java/org/spigotmc/WatchdogThread.java +++ b/src/main/java/org/spigotmc/WatchdogThread.java @@ -11,6 +11,7 @@ import org.bukkit.Bukkit; @@ -508,7 +507,7 @@ index b47d043144c499b1499f6b4be5a16a3f75c9fcb8..383c52c62f49b17db2fbf58009d6ea13 lastEarlyWarning = currentTime; if (isLongTimeout) { // Paper end -@@ -137,9 +140,25 @@ public final class WatchdogThread extends io.papermc.paper.util.TickThread // Pa +@@ -137,9 +140,24 @@ public final class WatchdogThread extends io.papermc.paper.util.TickThread // Pa if ( isLongTimeout ) { @@ -517,7 +516,6 @@ index b47d043144c499b1499f6b4be5a16a3f75c9fcb8..383c52c62f49b17db2fbf58009d6ea13 { - RestartCommand.restart(); + AsyncCatcher.enabled = false; // Disable async catcher incase it interferes with us -+ AsyncCatcher.shuttingDown = true; + server.forceTicks = true; + if (restart) { + RestartCommand.addShutdownHook( SpigotConfig.restartScript ); diff --git a/patches/server/0390-misc-debugging-dumps.patch b/patches/server/0390-misc-debugging-dumps.patch index e38c098e30..81401f8aa0 100644 --- a/patches/server/0390-misc-debugging-dumps.patch +++ b/patches/server/0390-misc-debugging-dumps.patch @@ -74,10 +74,10 @@ index 0c7f280bae81bbb492d5780a43e5ffda0f58756a..238a7bc87ab49da1f0fa3c733dd512fd this.connection.send(new ClientboundDisconnectPacket(ichatmutablecomponent)); this.connection.disconnect(ichatmutablecomponent); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index c3855d89f7d9b8c17b53d7ed34734d32f338fbc5..704572fb2b62afccf0a130b8430c78d306587b65 100644 +index d643d975c5143ab9f82ad6d7c0f5559ed57cb695..e7418c564ee7a96b6ef11fb66f4df12ebbaf72e9 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1026,6 +1026,7 @@ public final class CraftServer implements Server { +@@ -1004,6 +1004,7 @@ public final class CraftServer implements Server { plugin.getDescription().getFullName(), "This plugin is not properly shutting down its async tasks when it is being reloaded. This may cause conflicts with the newly loaded version of the plugin" )); diff --git a/patches/server/0392-Deobfuscate-stacktraces-in-log-messages-crash-report.patch b/patches/server/0392-Deobfuscate-stacktraces-in-log-messages-crash-report.patch index 043a0880af..225ab59b99 100644 --- a/patches/server/0392-Deobfuscate-stacktraces-in-log-messages-crash-report.patch +++ b/patches/server/0392-Deobfuscate-stacktraces-in-log-messages-crash-report.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Deobfuscate stacktraces in log messages, crash reports, and diff --git a/build.gradle.kts b/build.gradle.kts -index 6807a91d4d55dc90e2820caa855a44844c87b7e2..453691f34c400b074699f0f444ac28482837a9f7 100644 +index 17c672625c92f57720323d4fcb64886eb1b23484..6ba3b89bd18210cec31b181d025fd4d07dce3cc2 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -37,6 +37,7 @@ dependencies { @@ -641,7 +641,7 @@ index 3c1992e212a6d6f1db4d5b807b38d71913619fc0..9c1aff17aabd062640e3f451a2ef8c50 CraftAsyncScheduler() { diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java -index 383c52c62f49b17db2fbf58009d6ea132d124bea..e0a71bfc1498a517456b21747ab6ef3f1067a3f3 100644 +index a9bd33b58a6a3296b70eaaaea3adbee74724e448..7071327fab87d53e794374c701d7c2748c439aaa 100644 --- a/src/main/java/org/spigotmc/WatchdogThread.java +++ b/src/main/java/org/spigotmc/WatchdogThread.java @@ -105,7 +105,7 @@ public final class WatchdogThread extends io.papermc.paper.util.TickThread // Pa @@ -653,7 +653,7 @@ index 383c52c62f49b17db2fbf58009d6ea132d124bea..e0a71bfc1498a517456b21747ab6ef3f { log.log( Level.SEVERE, "\t\t" + stack ); } -@@ -193,7 +193,7 @@ public final class WatchdogThread extends io.papermc.paper.util.TickThread // Pa +@@ -192,7 +192,7 @@ public final class WatchdogThread extends io.papermc.paper.util.TickThread // Pa } log.log( Level.SEVERE, "\tStack:" ); // diff --git a/patches/server/0393-Implement-Mob-Goal-API.patch b/patches/server/0393-Implement-Mob-Goal-API.patch index f3e67cfaa9..42b410bd7f 100644 --- a/patches/server/0393-Implement-Mob-Goal-API.patch +++ b/patches/server/0393-Implement-Mob-Goal-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Implement Mob Goal API diff --git a/build.gradle.kts b/build.gradle.kts -index 453691f34c400b074699f0f444ac28482837a9f7..a24d682d77682c8421ed1e37be3905b2a5c8aff9 100644 +index 6ba3b89bd18210cec31b181d025fd4d07dce3cc2..3d420e82e64fba5a5237d6f484a7032e43da2e57 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -46,6 +46,7 @@ dependencies { @@ -792,10 +792,10 @@ index 4379b9948f1eecfe6fd7dea98e298ad5f761019a..3f081183521603824430709886a9cc31 LOOK, JUMP, diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 704572fb2b62afccf0a130b8430c78d306587b65..900e38b7ac712cdbc64ec580ee7f2e09e1ceccc3 100644 +index e7418c564ee7a96b6ef11fb66f4df12ebbaf72e9..43267d123a209223e0f9123e3c798374d2ecd37a 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2794,5 +2794,11 @@ public final class CraftServer implements Server { +@@ -2772,5 +2772,11 @@ public final class CraftServer implements Server { public boolean isStopping() { return net.minecraft.server.MinecraftServer.getServer().hasStopped(); } diff --git a/patches/server/0400-Wait-for-Async-Tasks-during-shutdown.patch b/patches/server/0400-Wait-for-Async-Tasks-during-shutdown.patch index 62eb5e0890..2867314753 100644 --- a/patches/server/0400-Wait-for-Async-Tasks-during-shutdown.patch +++ b/patches/server/0400-Wait-for-Async-Tasks-during-shutdown.patch @@ -22,10 +22,10 @@ index 8b1a92c1a0e9505ebc11de0e6b54b48343ef8e60..ccf238c12c416e2aa7ee83a14bbbb96f // CraftBukkit end if (this.getConnection() != null) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 900e38b7ac712cdbc64ec580ee7f2e09e1ceccc3..6134dfb1b64c8ab88053f62aea5341ead2563db7 100644 +index 43267d123a209223e0f9123e3c798374d2ecd37a..d4d25495aeb8c56c93ebaac9f3e239fb4d943f55 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1036,6 +1036,31 @@ public final class CraftServer implements Server { +@@ -1014,6 +1014,31 @@ public final class CraftServer implements Server { org.spigotmc.WatchdogThread.hasStarted = true; // Paper - Disable watchdog early timeout on reload } diff --git a/patches/server/0417-Add-and-implement-PlayerRecipeBookClickEvent.patch b/patches/server/0417-Add-and-implement-PlayerRecipeBookClickEvent.patch index 1c46676a7e..a0cf4fcda1 100644 --- a/patches/server/0417-Add-and-implement-PlayerRecipeBookClickEvent.patch +++ b/patches/server/0417-Add-and-implement-PlayerRecipeBookClickEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add and implement PlayerRecipeBookClickEvent diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 2939403b788c3e656cb7b600242db6e3269d90eb..2203795cdb63398095f9c467cbaf605aa7c7b856 100644 +index b9fdfa115262a1f16a2bbffa373c3438b38adbb3..cff8b643efadcc153b03af1335885376746b48be 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -3117,16 +3117,40 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3096,16 +3096,40 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic if (!this.player.containerMenu.stillValid(this.player)) { ServerGamePacketListenerImpl.LOGGER.debug("Player {} interacted with invalid menu {}", this.player, this.player.containerMenu); } else { diff --git a/patches/server/0421-Fix-Per-World-Difficulty-Remembering-Difficulty.patch b/patches/server/0421-Fix-Per-World-Difficulty-Remembering-Difficulty.patch index 1a35a8573e..184f704495 100644 --- a/patches/server/0421-Fix-Per-World-Difficulty-Remembering-Difficulty.patch +++ b/patches/server/0421-Fix-Per-World-Difficulty-Remembering-Difficulty.patch @@ -89,10 +89,10 @@ index 15a70bad66eb2508f58ff184061c2d19e45297e1..f80645fe0e1f9ad2a70ea33c5dc6a8c0 playerlist.sendPlayerPermissionLevel(this); diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 61053ccdcf5e588164f243faa9ef6beda5bf45fc..2f0fb75a35a1fa45614621da9e24cec6e842b693 100644 +index 4de14bd6390537730f764137390be4e7861d9894..3ddf29100807d5882e20395466d420fb169c2f87 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -3382,7 +3382,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3361,7 +3361,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic public void handleChangeDifficulty(ServerboundChangeDifficultyPacket packet) { PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel()); if (this.player.hasPermissions(2) || this.isSingleplayerOwner()) { @@ -102,10 +102,10 @@ index 61053ccdcf5e588164f243faa9ef6beda5bf45fc..2f0fb75a35a1fa45614621da9e24cec6 } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 6134dfb1b64c8ab88053f62aea5341ead2563db7..a910974f8e6f6f5a4cc63d8060a62ac21dfe0d01 100644 +index d4d25495aeb8c56c93ebaac9f3e239fb4d943f55..99cda61e71a2bc9f97c890f21ef3690a0fa3343a 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -975,8 +975,8 @@ public final class CraftServer implements Server { +@@ -953,8 +953,8 @@ public final class CraftServer implements Server { org.spigotmc.SpigotConfig.init((File) console.options.valueOf("spigot-settings")); // Spigot this.console.paperConfigurations.reloadConfigs(this.console); for (ServerLevel world : this.console.getAllLevels()) { diff --git a/patches/server/0425-Add-Plugin-Tickets-to-API-Chunk-Methods.patch b/patches/server/0425-Add-Plugin-Tickets-to-API-Chunk-Methods.patch index a992c7b86e..7c0453f365 100644 --- a/patches/server/0425-Add-Plugin-Tickets-to-API-Chunk-Methods.patch +++ b/patches/server/0425-Add-Plugin-Tickets-to-API-Chunk-Methods.patch @@ -22,7 +22,7 @@ wants it to collect even faster, they can restore that setting back to 1 instead Not adding it to .getType() though to keep behavior consistent with vanilla for performance reasons. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index a910974f8e6f6f5a4cc63d8060a62ac21dfe0d01..878fab611ed590e815f268af11dff27cef8d7fde 100644 +index 99cda61e71a2bc9f97c890f21ef3690a0fa3343a..cc222f4f17445350840584f6ecf5bfe7bc4e8c05 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -380,7 +380,7 @@ public final class CraftServer implements Server { @@ -34,7 +34,7 @@ index a910974f8e6f6f5a4cc63d8060a62ac21dfe0d01..878fab611ed590e815f268af11dff27c this.minimumAPI = this.configuration.getString("settings.minimum-api"); this.loadIcon(); -@@ -955,7 +955,7 @@ public final class CraftServer implements Server { +@@ -933,7 +933,7 @@ public final class CraftServer implements Server { this.console.setMotd(config.motd); this.overrideSpawnLimits(); this.warningState = WarningState.value(this.configuration.getString("settings.deprecated-verbose")); diff --git a/patches/server/0448-Brand-support.patch b/patches/server/0448-Brand-support.patch index ccf552be2b..24fdf6ed06 100644 --- a/patches/server/0448-Brand-support.patch +++ b/patches/server/0448-Brand-support.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Brand support diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 2f0fb75a35a1fa45614621da9e24cec6e842b693..a10e4d99bd7e6588cd09d17ebcc3e68f05b9e87b 100644 +index 3ddf29100807d5882e20395466d420fb169c2f87..37e5b479a093184e7d8d05c13e69b2682b5dac92 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -304,6 +304,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @@ -17,7 +17,7 @@ index 2f0fb75a35a1fa45614621da9e24cec6e842b693..a10e4d99bd7e6588cd09d17ebcc3e68f public ServerGamePacketListenerImpl(MinecraftServer server, Connection connection, ServerPlayer player) { this.lastChatTimeStamp = new AtomicReference(Instant.EPOCH); this.lastSeenMessages = new LastSeenMessagesValidator(20); -@@ -3337,6 +3339,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3316,6 +3318,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic private static final ResourceLocation CUSTOM_REGISTER = new ResourceLocation("register"); private static final ResourceLocation CUSTOM_UNREGISTER = new ResourceLocation("unregister"); @@ -26,7 +26,7 @@ index 2f0fb75a35a1fa45614621da9e24cec6e842b693..a10e4d99bd7e6588cd09d17ebcc3e68f @Override public void handleCustomPayload(ServerboundCustomPayloadPacket packet) { PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel()); -@@ -3364,6 +3368,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3343,6 +3347,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic try { byte[] data = new byte[packet.data.readableBytes()]; packet.data.readBytes(data); @@ -42,7 +42,7 @@ index 2f0fb75a35a1fa45614621da9e24cec6e842b693..a10e4d99bd7e6588cd09d17ebcc3e68f this.cserver.getMessenger().dispatchIncomingMessage(this.player.getBukkitEntity(), packet.identifier.toString(), data); } catch (Exception ex) { ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t dispatch custom payload", ex); -@@ -3373,6 +3386,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3352,6 +3365,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } @@ -56,7 +56,7 @@ index 2f0fb75a35a1fa45614621da9e24cec6e842b693..a10e4d99bd7e6588cd09d17ebcc3e68f return (!this.player.joining && !this.connection.isConnected()) || this.processedDisconnect; // Paper } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 2e09a49d52cbd23d3181d41a0540d11a3bd80fca..d5f03bd485403fd2222bba0dbbf37e438b99ef28 100644 +index cb9482240de0d5d56be4ec591b4fbb23006767c1..c96efc055e44dcc7880abb3a6e7b4c441aa9a112 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -2991,6 +2991,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0483-Add-getOfflinePlayerIfCached-String.patch b/patches/server/0483-Add-getOfflinePlayerIfCached-String.patch index f7825d907e..86867cf0eb 100644 --- a/patches/server/0483-Add-getOfflinePlayerIfCached-String.patch +++ b/patches/server/0483-Add-getOfflinePlayerIfCached-String.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add getOfflinePlayerIfCached(String) diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 878fab611ed590e815f268af11dff27cef8d7fde..1dc93c013eb34b395e7a0523ccd185ec1372be19 100644 +index cc222f4f17445350840584f6ecf5bfe7bc4e8c05..338143208ff0b6b8a789b1248691c7008af7bdb8 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1831,6 +1831,28 @@ public final class CraftServer implements Server { +@@ -1809,6 +1809,28 @@ public final class CraftServer implements Server { return result; } diff --git a/patches/server/0503-Limit-recipe-packets.patch b/patches/server/0503-Limit-recipe-packets.patch index ab3ff245f3..402bbade0f 100644 --- a/patches/server/0503-Limit-recipe-packets.patch +++ b/patches/server/0503-Limit-recipe-packets.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Limit recipe packets diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index a82b911450feb011cc8776a0dece478bb94d4221..9f9db1234a8b14fbb53a1293f0ffe2b51d652c5e 100644 +index c115d103cbc28a511aedcdcd40ce6a50a777b102..cb0cfd2d6b5e45771c99bd0b8dd5debd29064c7b 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -268,6 +268,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @@ -24,7 +24,7 @@ index a82b911450feb011cc8776a0dece478bb94d4221..9f9db1234a8b14fbb53a1293f0ffe2b5 /* Use thread-safe field access instead if (this.chatSpamTickCount > 0) { --this.chatSpamTickCount; -@@ -3136,6 +3138,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3115,6 +3117,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @Override public void handlePlaceRecipe(ServerboundPlaceRecipePacket packet) { diff --git a/patches/server/0520-Fix-interact-event-not-being-called-sometimes.patch b/patches/server/0520-Fix-interact-event-not-being-called-sometimes.patch index 0cb82384ef..e719b0d48b 100644 --- a/patches/server/0520-Fix-interact-event-not-being-called-sometimes.patch +++ b/patches/server/0520-Fix-interact-event-not-being-called-sometimes.patch @@ -11,7 +11,7 @@ Subject: [PATCH] Fix interact event not being called sometimes Co-authored-by: Moulberry diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 9f9db1234a8b14fbb53a1293f0ffe2b51d652c5e..d0fee1a4d728213a6b0c9bf9f26101d1a5bbec9f 100644 +index cb0cfd2d6b5e45771c99bd0b8dd5debd29064c7b..240b1f8efa672fb6d1967ef2b895c6710596e2cd 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -1839,7 +1839,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @@ -23,7 +23,7 @@ index 9f9db1234a8b14fbb53a1293f0ffe2b51d652c5e..d0fee1a4d728213a6b0c9bf9f26101d1 this.player.swing(enumhand, true); } } -@@ -2468,13 +2468,20 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2447,13 +2447,20 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic double d3 = player.gameMode.getGameModeForPlayer() == GameType.CREATIVE ? 5.0D : 4.5D; // SPIGOT-5607: Only call interact event if no block or entity is being clicked. Use bukkit ray trace method, because it handles blocks and entities at the same time // SPIGOT-7429: Make sure to call PlayerInteractEvent for spectators and non-pickable entities diff --git a/patches/server/0568-Expand-world-key-API.patch b/patches/server/0568-Expand-world-key-API.patch index fcc4f943d8..69b999f001 100644 --- a/patches/server/0568-Expand-world-key-API.patch +++ b/patches/server/0568-Expand-world-key-API.patch @@ -20,10 +20,10 @@ index b5981001d8ad4d6c79b965be9a446352971b0d29..0624ba7f1f5b352a5730b6b4736b2499 // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 1dc93c013eb34b395e7a0523ccd185ec1372be19..7326ed1b913c6d9b1e122564101bd67b6bdc489a 100644 +index 338143208ff0b6b8a789b1248691c7008af7bdb8..8526221f4b8bd3c98bf0f845c857bcdcecb39657 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1157,9 +1157,15 @@ public final class CraftServer implements Server { +@@ -1135,9 +1135,15 @@ public final class CraftServer implements Server { File folder = new File(this.getWorldContainer(), name); World world = this.getWorld(name); @@ -41,7 +41,7 @@ index 1dc93c013eb34b395e7a0523ccd185ec1372be19..7326ed1b913c6d9b1e122564101bd67b if (folder.exists()) { Preconditions.checkArgument(folder.isDirectory(), "File (%s) exists and isn't a folder", name); -@@ -1246,7 +1252,7 @@ public final class CraftServer implements Server { +@@ -1224,7 +1230,7 @@ public final class CraftServer implements Server { } else if (name.equals(levelName + "_the_end")) { worldKey = net.minecraft.world.level.Level.END; } else { @@ -50,7 +50,7 @@ index 1dc93c013eb34b395e7a0523ccd185ec1372be19..7326ed1b913c6d9b1e122564101bd67b } ServerLevel internal = (ServerLevel) new ServerLevel(this.console, console.executor, worldSession, worlddata, worldKey, worlddimension, this.getServer().progressListenerFactory.create(11), -@@ -1338,6 +1344,15 @@ public final class CraftServer implements Server { +@@ -1316,6 +1322,15 @@ public final class CraftServer implements Server { return null; } diff --git a/patches/server/0591-add-RespawnFlags-to-PlayerRespawnEvent.patch b/patches/server/0591-add-RespawnFlags-to-PlayerRespawnEvent.patch index 8b3baa5f4c..567c5d7709 100644 --- a/patches/server/0591-add-RespawnFlags-to-PlayerRespawnEvent.patch +++ b/patches/server/0591-add-RespawnFlags-to-PlayerRespawnEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] add RespawnFlags to PlayerRespawnEvent diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index ab295581a05686a9cd6c2397a7d4b8f32c098ba9..9cf8d415d0499f8d6b87d4a7c9be7ff51c3cd5af 100644 +index d22f9a39a7655ed41ad21f5794b7b2c77d582310..aa0a524ad7200648731fcc5e702470872c0ac3cb 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2790,7 +2790,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2769,7 +2769,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic case PERFORM_RESPAWN: if (this.player.wonGame) { this.player.wonGame = false; diff --git a/patches/server/0601-Add-basic-Datapack-API.patch b/patches/server/0601-Add-basic-Datapack-API.patch index cbac98f237..a92de2a1eb 100644 --- a/patches/server/0601-Add-basic-Datapack-API.patch +++ b/patches/server/0601-Add-basic-Datapack-API.patch @@ -92,7 +92,7 @@ index 0000000000000000000000000000000000000000..cf4374493c11057451a62a655514415c + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 7326ed1b913c6d9b1e122564101bd67b6bdc489a..112ec37cbb7b3ad262cce8d624f0da313935f8d9 100644 +index 8526221f4b8bd3c98bf0f845c857bcdcecb39657..7673ac22dfa0b354c540d9af0d7bf2349460a0a9 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -301,6 +301,7 @@ public final class CraftServer implements Server { @@ -111,7 +111,7 @@ index 7326ed1b913c6d9b1e122564101bd67b6bdc489a..112ec37cbb7b3ad262cce8d624f0da31 } public boolean getCommandBlockOverride(String command) { -@@ -2862,5 +2864,11 @@ public final class CraftServer implements Server { +@@ -2840,5 +2842,11 @@ public final class CraftServer implements Server { public com.destroystokyo.paper.entity.ai.MobGoals getMobGoals() { return mobGoals; } diff --git a/patches/server/0603-additions-to-PlayerGameModeChangeEvent.patch b/patches/server/0603-additions-to-PlayerGameModeChangeEvent.patch index d0bab77934..e3ad37907e 100644 --- a/patches/server/0603-additions-to-PlayerGameModeChangeEvent.patch +++ b/patches/server/0603-additions-to-PlayerGameModeChangeEvent.patch @@ -131,10 +131,10 @@ index c256423e9dc9d1837b847da44fb2920c58842c8b..0cb9803e30702de1cc530c1205fe9bbb } diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 9cf8d415d0499f8d6b87d4a7c9be7ff51c3cd5af..6fbed22273227d159797bd38ab4c1705180559f3 100644 +index aa0a524ad7200648731fcc5e702470872c0ac3cb..bb483fbc201c6041bafc75d822b46e5d06cd75dc 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2799,7 +2799,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2778,7 +2778,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic this.player = this.server.getPlayerList().respawn(this.player, false, RespawnReason.DEATH); if (this.server.isHardcore()) { @@ -144,7 +144,7 @@ index 9cf8d415d0499f8d6b87d4a7c9be7ff51c3cd5af..6fbed22273227d159797bd38ab4c1705 } } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index f4ac6130d1112fb908cfd61698207b81d182b492..270521550d0349af64b01eb0d12c09c557341baa 100644 +index 04abb49aa5b947e4c265471358981ed41b36ddd6..d8c95d53b923b2e269ae3f5afa77a5a93187bab8 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1562,7 +1562,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0607-Fix-and-optimise-world-force-upgrading.patch b/patches/server/0607-Fix-and-optimise-world-force-upgrading.patch index 44a82de767..e3daf9ed94 100644 --- a/patches/server/0607-Fix-and-optimise-world-force-upgrading.patch +++ b/patches/server/0607-Fix-and-optimise-world-force-upgrading.patch @@ -247,7 +247,7 @@ index 0000000000000000000000000000000000000000..513833c2ea23df5b079d157bc5cb89d5 + } +} diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java -index 4bd47eeb9e4c8ece2ba43a6c8c4e89b1e67ed9d9..3a27a33899a10745b79ea263d686389ddf4bb5a4 100644 +index f035065aa46a8c1a2c3064b82208fbdc5ac4463d..0303b7f80fe0939ce1e50cdfd3d93456f09a8259 100644 --- a/src/main/java/net/minecraft/server/Main.java +++ b/src/main/java/net/minecraft/server/Main.java @@ -18,6 +18,7 @@ import java.nio.file.Paths; @@ -362,10 +362,10 @@ index 29da08c58200c24fd03003937d30eb41234cabc9..d3d4d10a77af51cff4da201201bac325 public synchronized RegionFile getRegionFileIfLoaded(ChunkPos chunkcoordintpair) { return this.regionCache.getAndMoveToFirst(ChunkPos.asLong(chunkcoordintpair.getRegionX(), chunkcoordintpair.getRegionZ())); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 112ec37cbb7b3ad262cce8d624f0da313935f8d9..ff3fcaa91b7cd50eaff3bdb1ae15d222b197ba97 100644 +index 7673ac22dfa0b354c540d9af0d7bf2349460a0a9..94889f3f697eb8d2c5e660a015cf4640964e98ae 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1234,9 +1234,7 @@ public final class CraftServer implements Server { +@@ -1212,9 +1212,7 @@ public final class CraftServer implements Server { worlddata.checkName(name); worlddata.setModdedInfo(this.console.getServerModName(), this.console.getModdedStatus().shouldReportAsModified()); @@ -376,7 +376,7 @@ index 112ec37cbb7b3ad262cce8d624f0da313935f8d9..ff3fcaa91b7cd50eaff3bdb1ae15d222 long j = BiomeManager.obfuscateSeed(creator.seed()); List list = ImmutableList.of(new PhantomSpawner(), new PatrolSpawner(), new CatSpawner(), new VillageSiege(), new WanderingTraderSpawner(worlddata)); -@@ -1247,6 +1245,13 @@ public final class CraftServer implements Server { +@@ -1225,6 +1223,13 @@ public final class CraftServer implements Server { biomeProvider = generator.getDefaultBiomeProvider(worldInfo); } diff --git a/patches/server/0609-Add-Unix-domain-socket-support.patch b/patches/server/0609-Add-Unix-domain-socket-support.patch index 272678ab91..bff6d3af8d 100644 --- a/patches/server/0609-Add-Unix-domain-socket-support.patch +++ b/patches/server/0609-Add-Unix-domain-socket-support.patch @@ -91,10 +91,10 @@ index 29a0a720f22f56ca3d844efef1ecde3980fb1c12..838244e3680ea6020701e10bafbde7f5 } diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index b245e87adb867e84f13b13863183f70ab889802b..6205a08aca97b2e8bba9c06e399f700023a08ab2 100644 +index b7b9575b84f35757c24ad43bd187e2bd623d672c..967ed1f44a4d7c97a14d9415541df000698e8aad 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2633,6 +2633,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2612,6 +2612,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic // Spigot Start public SocketAddress getRawAddress() { diff --git a/patches/server/0615-Add-PlayerKickEvent-causes.patch b/patches/server/0615-Add-PlayerKickEvent-causes.patch index 5f28e53184..66094563bb 100644 --- a/patches/server/0615-Add-PlayerKickEvent-causes.patch +++ b/patches/server/0615-Add-PlayerKickEvent-causes.patch @@ -88,7 +88,7 @@ index c68bac4727f6b2ca95fc8c438303097af14286f2..bb629ec263959c8268de88ca807bddb6 return Component.translatable("commands.kick.success", serverPlayer.getDisplayName(), reason); }, true); diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 6205a08aca97b2e8bba9c06e399f700023a08ab2..47dafff9552ded18780f5a059768f9dbb7a69ba8 100644 +index 967ed1f44a4d7c97a14d9415541df000698e8aad..08a69f7a2d153aee1b9637085be04d3065b6df08 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -364,7 +364,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @@ -312,7 +312,7 @@ index 6205a08aca97b2e8bba9c06e399f700023a08ab2..47dafff9552ded18780f5a059768f9db if (!this.updateChatOrder(timestamp)) { ServerGamePacketListenerImpl.LOGGER.warn("{} sent out-of-order chat: '{}'", this.player.getName().getString(), message); - this.disconnect(Component.translatable("multiplayer.disconnect.out_of_order_chat")); -+ this.disconnect(Component.translatable("multiplayer.disconnect.out_of_order_chat"), org.bukkit.event.player.PlayerKickEvent.Cause.OUT_OF_ORDER_CHAT); // Paper - kick event ca ++ this.disconnect(Component.translatable("multiplayer.disconnect.out_of_order_chat"), org.bukkit.event.player.PlayerKickEvent.Cause.OUT_OF_ORDER_CHAT); // Paper - kick event causes return Optional.empty(); } else { Optional optional = this.unpackAndApplyLastSeen(acknowledgment); @@ -325,7 +325,7 @@ index 6205a08aca97b2e8bba9c06e399f700023a08ab2..47dafff9552ded18780f5a059768f9db } return optional; -@@ -2440,7 +2450,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2419,7 +2429,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic // this.chatSpamTickCount += 20; if (this.chatSpamTickCount.addAndGet(20) > 200 && !this.server.getPlayerList().isOp(this.player.getGameProfile())) { // CraftBukkit end @@ -334,7 +334,7 @@ index 6205a08aca97b2e8bba9c06e399f700023a08ab2..47dafff9552ded18780f5a059768f9db } } -@@ -2452,7 +2462,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2431,7 +2441,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic synchronized (this.lastSeenMessages) { if (!this.lastSeenMessages.applyOffset(packet.offset())) { ServerGamePacketListenerImpl.LOGGER.warn("Failed to validate message acknowledgements from {}", this.player.getName().getString()); @@ -343,7 +343,7 @@ index 6205a08aca97b2e8bba9c06e399f700023a08ab2..47dafff9552ded18780f5a059768f9db } } -@@ -2605,7 +2615,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2584,7 +2594,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } if (i > 4096) { @@ -352,7 +352,7 @@ index 6205a08aca97b2e8bba9c06e399f700023a08ab2..47dafff9552ded18780f5a059768f9db } } -@@ -2651,7 +2661,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2630,7 +2640,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic // Spigot Start if ( entity == this.player && !this.player.isSpectator() ) { @@ -361,7 +361,7 @@ index 6205a08aca97b2e8bba9c06e399f700023a08ab2..47dafff9552ded18780f5a059768f9db return; } // Spigot End -@@ -2750,7 +2760,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2729,7 +2739,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic // CraftBukkit end } } else { @@ -370,7 +370,7 @@ index 6205a08aca97b2e8bba9c06e399f700023a08ab2..47dafff9552ded18780f5a059768f9db ServerGamePacketListenerImpl.LOGGER.warn("Player {} tried to attack an invalid entity", ServerGamePacketListenerImpl.this.player.getName().getString()); } } -@@ -3160,7 +3170,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3139,7 +3149,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic // Paper start if (!org.bukkit.Bukkit.isPrimaryThread()) { if (this.recipeSpamPackets.addAndGet(io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.recipeSpamIncrement) > io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.recipeSpamLimit) { @@ -379,7 +379,7 @@ index 6205a08aca97b2e8bba9c06e399f700023a08ab2..47dafff9552ded18780f5a059768f9db return; } } -@@ -3358,7 +3368,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3337,7 +3347,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } else if (!this.isSingleplayerOwner()) { // Paper start - This needs to be handled on the main thread for plugins server.submit(() -> { @@ -388,7 +388,7 @@ index 6205a08aca97b2e8bba9c06e399f700023a08ab2..47dafff9552ded18780f5a059768f9db }); // Paper end } -@@ -3404,7 +3414,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3383,7 +3393,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } } catch (Exception ex) { ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t register custom payload", ex); @@ -397,7 +397,7 @@ index 6205a08aca97b2e8bba9c06e399f700023a08ab2..47dafff9552ded18780f5a059768f9db } } else if (packet.identifier.equals(CUSTOM_UNREGISTER)) { try { -@@ -3414,7 +3424,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3393,7 +3403,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } } catch (Exception ex) { ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t unregister custom payload", ex); @@ -406,7 +406,7 @@ index 6205a08aca97b2e8bba9c06e399f700023a08ab2..47dafff9552ded18780f5a059768f9db } } else { try { -@@ -3432,7 +3442,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3411,7 +3421,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic this.cserver.getMessenger().dispatchIncomingMessage(this.player.getBukkitEntity(), packet.identifier.toString(), data); } catch (Exception ex) { ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t dispatch custom payload", ex); @@ -415,7 +415,7 @@ index 6205a08aca97b2e8bba9c06e399f700023a08ab2..47dafff9552ded18780f5a059768f9db } } -@@ -3474,7 +3484,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3453,7 +3463,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic if (!Objects.equals(profilepublickey_a, profilepublickey_a1)) { if (profilepublickey_a != null && profilepublickey_a1.expiresAt().isBefore(profilepublickey_a.expiresAt())) { @@ -424,7 +424,7 @@ index 6205a08aca97b2e8bba9c06e399f700023a08ab2..47dafff9552ded18780f5a059768f9db } else { try { SignatureValidator signaturevalidator = this.server.getProfileKeySignatureValidator(); -@@ -3487,7 +3497,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3466,7 +3476,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic this.resetPlayerChatState(remotechatsession_a.validate(this.player.getGameProfile(), signaturevalidator, Duration.ZERO)); } catch (ProfilePublicKey.ValidationException profilepublickey_b) { ServerGamePacketListenerImpl.LOGGER.error("Failed to validate profile key: {}", profilepublickey_b.getMessage()); @@ -491,7 +491,7 @@ index 984c288abf94d9fe47fada33722fea035b832f3b..addd20237b87c9a87bb09fd7addb101a } } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 270521550d0349af64b01eb0d12c09c557341baa..04979441a1e654d978b858acb2219da6615ed8a6 100644 +index d8c95d53b923b2e269ae3f5afa77a5a93187bab8..54027efe50942ad1ac3fbe45e9a02b7e7eac0f28 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -584,7 +584,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -522,7 +522,7 @@ index 270521550d0349af64b01eb0d12c09c557341baa..04979441a1e654d978b858acb2219da6 @@ -670,7 +675,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { - // Paper start - improve chat handling + // Paper start - Improve chat handling if (ServerGamePacketListenerImpl.isChatMessageIllegal(msg)) { - this.getHandle().connection.disconnect(Component.translatable("multiplayer.disconnect.illegal_characters")); + this.getHandle().connection.disconnect(Component.translatable("multiplayer.disconnect.illegal_characters"), org.bukkit.event.player.PlayerKickEvent.Cause.ILLEGAL_CHARACTERS); // Paper - kick event causes @@ -530,10 +530,10 @@ index 270521550d0349af64b01eb0d12c09c557341baa..04979441a1e654d978b858acb2219da6 if (msg.startsWith("/")) { this.getHandle().connection.handleCommand(msg); diff --git a/src/main/java/org/spigotmc/RestartCommand.java b/src/main/java/org/spigotmc/RestartCommand.java -index 92d97a5810a379b427a99b4c63fb9844d823a84f..160115bf8a153ff981ba308599d22c4c08026fb6 100644 +index 29b39dff0aceaa902f701162a42d3f2f881d6d5a..6a8fc3bc43183538f5717c0b34f83b47fd081bad 100644 --- a/src/main/java/org/spigotmc/RestartCommand.java +++ b/src/main/java/org/spigotmc/RestartCommand.java -@@ -74,7 +74,7 @@ public class RestartCommand extends Command +@@ -73,7 +73,7 @@ public class RestartCommand extends Command // Kick all players for ( ServerPlayer p : com.google.common.collect.ImmutableList.copyOf( MinecraftServer.getServer().getPlayerList().players ) ) { diff --git a/patches/server/0636-Adds-PlayerArmSwingEvent.patch b/patches/server/0636-Adds-PlayerArmSwingEvent.patch index 1709c951b5..9ebfeb62d3 100644 --- a/patches/server/0636-Adds-PlayerArmSwingEvent.patch +++ b/patches/server/0636-Adds-PlayerArmSwingEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Adds PlayerArmSwingEvent diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index d69c4cccc1a26284bfb3a12a332df85ee14a4906..fff82d1fde56ff8ca564b3209877dedc0b384c20 100644 +index 006035b94ab0490c0dd5747906398965016b3e42..b673f6a43e4b057b1a5c78398a6e40bf73340112 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2500,7 +2500,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2479,7 +2479,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } // Paper end // Arm swing animation diff --git a/patches/server/0679-Improve-and-expand-AsyncCatcher.patch b/patches/server/0679-Improve-and-expand-AsyncCatcher.patch index 395c7ac16e..7610a789fe 100644 --- a/patches/server/0679-Improve-and-expand-AsyncCatcher.patch +++ b/patches/server/0679-Improve-and-expand-AsyncCatcher.patch @@ -17,7 +17,7 @@ Async catch modifications to critical entity state Co-authored-by: Jake Potrebic diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 75ea5d01a515dcc604a1414d7261887ca71b243e..c534dadb3414c487fd3afbf7be71bfcbf55d66ab 100644 +index 96a414a09e125ca0ea3ccf2589abf47a39fad92d..ee5cb4efcf5e63321e34cea77afa6af7b402b651 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -1658,6 +1658,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @@ -29,7 +29,7 @@ index 75ea5d01a515dcc604a1414d7261887ca71b243e..c534dadb3414c487fd3afbf7be71bfcb if (player.isRemoved()) { LOGGER.info("Attempt to teleport removed player {} restricted", player.getScoreboardName()); diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 8cde3d6c34226c197645a382e65d3c9ab685fff7..199f802b3bed9ec25027d33e47329a80770755f2 100644 +index 693fe96b508a78545c180dda8ab40d6456896db4..4e368756efce3cb31bd88a2145a97b00366fa977 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -1119,7 +1119,7 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -178,10 +178,10 @@ index a235247fe0d8ec50d374ec30007fea8427de9cae..1377400a8762158fa1dd40e425bd0999 return true; } diff --git a/src/main/java/org/spigotmc/AsyncCatcher.java b/src/main/java/org/spigotmc/AsyncCatcher.java -index 5409f230fdd53b70fc03c58177438534731ad4e6..c02a04d284734b5f545b64307ed4aea337c1465f 100644 +index 05e94702e42b8f5c35d2a112c486d57948a3acba..d678ca116f9b81ab9d7d99a698e0ce066c132f34 100644 --- a/src/main/java/org/spigotmc/AsyncCatcher.java +++ b/src/main/java/org/spigotmc/AsyncCatcher.java -@@ -12,6 +12,7 @@ public class AsyncCatcher +@@ -11,6 +11,7 @@ public class AsyncCatcher { if ( !io.papermc.paper.util.TickThread.isTickThread() ) // Paper // Paper - rewrite chunk system { diff --git a/patches/server/0680-Add-paper-mobcaps-and-paper-playermobcaps.patch b/patches/server/0680-Add-paper-mobcaps-and-paper-playermobcaps.patch index 6fcc4c42d0..33c71598b1 100644 --- a/patches/server/0680-Add-paper-mobcaps-and-paper-playermobcaps.patch +++ b/patches/server/0680-Add-paper-mobcaps-and-paper-playermobcaps.patch @@ -278,10 +278,10 @@ index e57bb23ec14263b7c9dd721fefbe912963b863d0..7bfc95b2a4fd94bcb0347fd7aff9fe0e // Paper start - add parameters and int ret type spawnCategoryForChunk(group, world, chunk, checker, runner, Integer.MAX_VALUE, null); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index fc8d0b81054cad7dbfebd29b2d92a52952357fc2..eb221cd9fff4f5fd6c30ba36dc43434d791d4956 100644 +index c05d2b6a78f3a479ca37ff705f89ee064d419e73..46e1b306ddb4b5d9fba8ce854d697479c758ea7c 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2201,6 +2201,11 @@ public final class CraftServer implements Server { +@@ -2179,6 +2179,11 @@ public final class CraftServer implements Server { @Override public int getSpawnLimit(SpawnCategory spawnCategory) { diff --git a/patches/server/0733-Hide-unnecessary-itemmeta-from-clients.patch b/patches/server/0733-Hide-unnecessary-itemmeta-from-clients.patch index 52945672aa..4a156dcef5 100644 --- a/patches/server/0733-Hide-unnecessary-itemmeta-from-clients.patch +++ b/patches/server/0733-Hide-unnecessary-itemmeta-from-clients.patch @@ -18,10 +18,10 @@ index 24f0d61a2fa9ac95dd26443a978209b53baf10b1..31fa0f4fbf195d0db7a89a060b1cc4fd } } diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index bcf93ca2dacbd527db8b17f4e1a7d1836ae493f7..33a7ff327b7ba69fde0ce39bcf347892479ae479 100644 +index 31c8b483006febd23363f7bcc2c09bde37b84847..81750c1551a69d1c77ab8c34437e5d839b7e2941 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2714,8 +2714,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2693,8 +2693,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic // Refresh the current entity metadata entity.getEntityData().refresh(player); // SPIGOT-7136 - Allays @@ -33,7 +33,7 @@ index bcf93ca2dacbd527db8b17f4e1a7d1836ae493f7..33a7ff327b7ba69fde0ce39bcf347892 } } diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index d481eeac08535bc79b5714afa376a2fe2843516c..b5996e86d2bfcb6d52b10c79bffb92d76954b714 100644 +index de69507b71c79172f0581aa58a7ac7e9a002444f..a35e59544786776391ba135f247ac1a28be3d754 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -3159,7 +3159,7 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0738-Allow-delegation-to-vanilla-chunk-gen.patch b/patches/server/0738-Allow-delegation-to-vanilla-chunk-gen.patch index d3760b7cf2..e60b2be10b 100644 --- a/patches/server/0738-Allow-delegation-to-vanilla-chunk-gen.patch +++ b/patches/server/0738-Allow-delegation-to-vanilla-chunk-gen.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Allow delegation to vanilla chunk gen diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index eb221cd9fff4f5fd6c30ba36dc43434d791d4956..d55a300b11fcdf7f0c502f95ae7c992cf3e13aff 100644 +index 46e1b306ddb4b5d9fba8ce854d697479c758ea7c..2b6a037e014c2d214e3d55068f53cdd0f312fbb8 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2381,6 +2381,88 @@ public final class CraftServer implements Server { +@@ -2359,6 +2359,88 @@ public final class CraftServer implements Server { return new OldCraftChunkData(world.getMinHeight(), world.getMaxHeight(), handle.registryAccess().registryOrThrow(Registries.BIOME), world); // Paper - Anti-Xray - Add parameters } diff --git a/patches/server/0758-Expose-vanilla-BiomeProvider-from-WorldInfo.patch b/patches/server/0758-Expose-vanilla-BiomeProvider-from-WorldInfo.patch index fb05c9468b..711394abd3 100644 --- a/patches/server/0758-Expose-vanilla-BiomeProvider-from-WorldInfo.patch +++ b/patches/server/0758-Expose-vanilla-BiomeProvider-from-WorldInfo.patch @@ -18,10 +18,10 @@ index b54a3dcbd94582158a7119b92b02be5a4e32877c..18269a33f6eb3623fbfa6dd551426515 biomeProvider = gen.getDefaultBiomeProvider(worldInfo); } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index d55a300b11fcdf7f0c502f95ae7c992cf3e13aff..65e8f35f9bec25f8d21e35af95d021b31f47075e 100644 +index 2b6a037e014c2d214e3d55068f53cdd0f312fbb8..c3beabe15ef5a5862cf8bcea146b746dd05654be 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1241,7 +1241,7 @@ public final class CraftServer implements Server { +@@ -1219,7 +1219,7 @@ public final class CraftServer implements Server { List list = ImmutableList.of(new PhantomSpawner(), new PatrolSpawner(), new CatSpawner(), new VillageSiege(), new WanderingTraderSpawner(worlddata)); LevelStem worlddimension = iregistry.get(actualDimension); diff --git a/patches/server/0766-Kick-on-main-for-illegal-chat.patch b/patches/server/0766-Kick-on-main-for-illegal-chat.patch index a4ebe06852..7dedbb83f2 100644 --- a/patches/server/0766-Kick-on-main-for-illegal-chat.patch +++ b/patches/server/0766-Kick-on-main-for-illegal-chat.patch @@ -7,7 +7,7 @@ Makes the PlayerKickEvent fire on the main thread for illegal characters or chat out-of-order errors. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index c89c6c9f315756dc46f253a155d34bb229eca21c..661a5ee162829a060284a870e1704f615cc768ac 100644 +index 6345d9d3ade4c490e4a6266fc5ecbd5b2de8ddeb..9535d8effbc588b69df9dba9aba4b3090370ae69 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -2167,7 +2167,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @@ -35,7 +35,7 @@ index c89c6c9f315756dc46f253a155d34bb229eca21c..661a5ee162829a060284a870e1704f61 if (!this.updateChatOrder(timestamp)) { ServerGamePacketListenerImpl.LOGGER.warn("{} sent out-of-order chat: '{}'", this.player.getName().getString(), message); + this.server.scheduleOnMain(() -> { // Paper - push to main - this.disconnect(Component.translatable("multiplayer.disconnect.out_of_order_chat"), org.bukkit.event.player.PlayerKickEvent.Cause.OUT_OF_ORDER_CHAT); // Paper - kick event ca + this.disconnect(Component.translatable("multiplayer.disconnect.out_of_order_chat"), org.bukkit.event.player.PlayerKickEvent.Cause.OUT_OF_ORDER_CHAT); // Paper - kick event causes + }); // Paper - push to main return Optional.empty(); } else { diff --git a/patches/server/0773-API-for-creating-command-sender-which-forwards-feedb.patch b/patches/server/0773-API-for-creating-command-sender-which-forwards-feedb.patch index c0ea2d68f2..a4c6ea4b63 100644 --- a/patches/server/0773-API-for-creating-command-sender-which-forwards-feedb.patch +++ b/patches/server/0773-API-for-creating-command-sender-which-forwards-feedb.patch @@ -122,10 +122,10 @@ index 0000000000000000000000000000000000000000..e3a5f1ec376319bdfda87fa27ae217bf + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 65e8f35f9bec25f8d21e35af95d021b31f47075e..3d9bf78a1a0f04d96008a2601c1f82c8af690094 100644 +index c3beabe15ef5a5862cf8bcea146b746dd05654be..1033e997653c844cafe4cdb7985191526f4a86ca 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2032,6 +2032,13 @@ public final class CraftServer implements Server { +@@ -2010,6 +2010,13 @@ public final class CraftServer implements Server { return console.console; } diff --git a/patches/server/0777-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch b/patches/server/0777-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch index 8c367b0d11..ade09caf21 100644 --- a/patches/server/0777-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch +++ b/patches/server/0777-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add missing Validate calls to CraftServer#getSpawnLimit Copies appropriate checks from CraftWorld#getSpawnLimit diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 3d9bf78a1a0f04d96008a2601c1f82c8af690094..a294fc8019f95059a1c6a2d300d63319d53496af 100644 +index 1033e997653c844cafe4cdb7985191526f4a86ca..0de3faf1f29608e7a387b4e4d2332d3321934963 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2209,6 +2209,8 @@ public final class CraftServer implements Server { +@@ -2187,6 +2187,8 @@ public final class CraftServer implements Server { @Override public int getSpawnLimit(SpawnCategory spawnCategory) { // Paper start diff --git a/patches/server/0778-Add-GameEvent-tags.patch b/patches/server/0778-Add-GameEvent-tags.patch index afeb377743..237dad8ba6 100644 --- a/patches/server/0778-Add-GameEvent-tags.patch +++ b/patches/server/0778-Add-GameEvent-tags.patch @@ -46,10 +46,10 @@ index 0000000000000000000000000000000000000000..e7d9fd2702a1ce96596580fff8f5ee4f + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index a294fc8019f95059a1c6a2d300d63319d53496af..b5ebe75bf670e949dbc01cff67738b0686b78371 100644 +index 0de3faf1f29608e7a387b4e4d2332d3321934963..afd9c8696573876d112906cec2bfd23fef1bd7d2 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2630,6 +2630,15 @@ public final class CraftServer implements Server { +@@ -2608,6 +2608,15 @@ public final class CraftServer implements Server { return (org.bukkit.Tag) new CraftEntityTag(BuiltInRegistries.ENTITY_TYPE, entityTagKey); } } @@ -65,7 +65,7 @@ index a294fc8019f95059a1c6a2d300d63319d53496af..b5ebe75bf670e949dbc01cff67738b06 default -> throw new IllegalArgumentException(); } -@@ -2662,6 +2671,13 @@ public final class CraftServer implements Server { +@@ -2640,6 +2649,13 @@ public final class CraftServer implements Server { net.minecraft.core.Registry> entityTags = BuiltInRegistries.ENTITY_TYPE; return entityTags.getTags().map(pair -> (org.bukkit.Tag) new CraftEntityTag(entityTags, pair.getFirst())).collect(ImmutableList.toImmutableList()); } diff --git a/patches/server/0784-Put-world-into-worldlist-before-initing-the-world.patch b/patches/server/0784-Put-world-into-worldlist-before-initing-the-world.patch index 7695344878..de50164e63 100644 --- a/patches/server/0784-Put-world-into-worldlist-before-initing-the-world.patch +++ b/patches/server/0784-Put-world-into-worldlist-before-initing-the-world.patch @@ -23,10 +23,10 @@ index 5b64fe9f8c6d6fecad67a395a38fe6d7c91c5954..980b8055b971376e5999d81accf4db3b if (worlddata.getCustomBossEvents() != null) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index b5ebe75bf670e949dbc01cff67738b0686b78371..0576d449f353e9cb93f613f85bef0e93e51f5bab 100644 +index afd9c8696573876d112906cec2bfd23fef1bd7d2..ff9930cb6ec661fc065cae906659b5ff18091d22 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1270,10 +1270,11 @@ public final class CraftServer implements Server { +@@ -1248,10 +1248,11 @@ public final class CraftServer implements Server { return null; } diff --git a/patches/server/0786-Custom-Potion-Mixes.patch b/patches/server/0786-Custom-Potion-Mixes.patch index 0f8702a668..e097524ac3 100644 --- a/patches/server/0786-Custom-Potion-Mixes.patch +++ b/patches/server/0786-Custom-Potion-Mixes.patch @@ -164,7 +164,7 @@ index 424406d2692856cfd82b6f3b7b6228fa3bd20c2f..c57efcb9a79337ec791e4e8f6671612f @Override diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 0576d449f353e9cb93f613f85bef0e93e51f5bab..575c4a4baaecbcbd16727138a96aab8bcaee6795 100644 +index ff9930cb6ec661fc065cae906659b5ff18091d22..5b95fc597ef27f32222303fe0a7901ff9cfa5acd 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -304,6 +304,7 @@ public final class CraftServer implements Server { @@ -184,7 +184,7 @@ index 0576d449f353e9cb93f613f85bef0e93e51f5bab..575c4a4baaecbcbd16727138a96aab8b MobEffects.BLINDNESS.getClass(); PotionEffectType.stopAcceptingRegistrations(); // Ugly hack :( -@@ -2989,5 +2990,10 @@ public final class CraftServer implements Server { +@@ -2967,5 +2968,10 @@ public final class CraftServer implements Server { return datapackManager; } diff --git a/patches/server/0797-Fix-saving-in-unloadWorld.patch b/patches/server/0797-Fix-saving-in-unloadWorld.patch index d047059e5f..141b770151 100644 --- a/patches/server/0797-Fix-saving-in-unloadWorld.patch +++ b/patches/server/0797-Fix-saving-in-unloadWorld.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Fix saving in unloadWorld Change savingDisabled to false to ensure ServerLevel's saving logic gets called when unloadWorld is called with save = true diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 575c4a4baaecbcbd16727138a96aab8bcaee6795..cc85f098bca750a6511477c0a57f2f75af182f0f 100644 +index 5b95fc597ef27f32222303fe0a7901ff9cfa5acd..a6bc9144a975e89a2f8ef18cfe935deef81612fe 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1318,7 +1318,7 @@ public final class CraftServer implements Server { +@@ -1296,7 +1296,7 @@ public final class CraftServer implements Server { try { if (save) { diff --git a/patches/server/0808-Prevent-tile-entity-copies-loading-chunks.patch b/patches/server/0808-Prevent-tile-entity-copies-loading-chunks.patch index 96752e75e9..3211cb7e46 100644 --- a/patches/server/0808-Prevent-tile-entity-copies-loading-chunks.patch +++ b/patches/server/0808-Prevent-tile-entity-copies-loading-chunks.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Prevent tile entity copies loading chunks diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 21c7cf0af2cc65f1f0275f4089326cdcfd94ec90..82154172b5d1452512587c9c7c6c897cfd6c2d40 100644 +index 8b33da482a7971d6481283c37485185925bd5dd5..02c277f582aea0d7bd42d2ded21deecc80bd8655 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -3345,7 +3345,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3324,7 +3324,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic BlockPos blockposition = BlockEntity.getPosFromTag(nbttagcompound); if (this.player.level().isLoaded(blockposition)) { diff --git a/patches/server/0811-Pass-ServerLevel-for-gamerule-callbacks.patch b/patches/server/0811-Pass-ServerLevel-for-gamerule-callbacks.patch index d456b0145f..353a5edf6f 100644 --- a/patches/server/0811-Pass-ServerLevel-for-gamerule-callbacks.patch +++ b/patches/server/0811-Pass-ServerLevel-for-gamerule-callbacks.patch @@ -18,10 +18,10 @@ index c9a6847b4eb29b8d0ed68741b5e6055de02d1e83..23c39cc77ae0d2ab7100fff0a3e8ff67 if (dedicatedserverproperties.enableQuery) { diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 82154172b5d1452512587c9c7c6c897cfd6c2d40..85c328440db5aac79622a7ebf76c99affd2203d3 100644 +index 02c277f582aea0d7bd42d2ded21deecc80bd8655..1743444a48cacfad2326c8d21974e763ea332914 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2908,7 +2908,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2887,7 +2887,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic this.player = this.server.getPlayerList().respawn(this.player, false, RespawnReason.DEATH); if (this.server.isHardcore()) { this.player.setGameMode(GameType.SPECTATOR, org.bukkit.event.player.PlayerGameModeChangeEvent.Cause.HARDCORE_DEATH, null); // Paper diff --git a/patches/server/0813-WorldCreator-keepSpawnLoaded.patch b/patches/server/0813-WorldCreator-keepSpawnLoaded.patch index 900a92ca9e..0fa1a71a73 100644 --- a/patches/server/0813-WorldCreator-keepSpawnLoaded.patch +++ b/patches/server/0813-WorldCreator-keepSpawnLoaded.patch @@ -5,10 +5,10 @@ Subject: [PATCH] WorldCreator#keepSpawnLoaded diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index cc85f098bca750a6511477c0a57f2f75af182f0f..2282d0ae19c3428a32d4645caaa2d543cbd866fb 100644 +index a6bc9144a975e89a2f8ef18cfe935deef81612fe..d6cc883ed429a6a156b7bba4bb1c0dafff44f9c5 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1277,6 +1277,7 @@ public final class CraftServer implements Server { +@@ -1255,6 +1255,7 @@ public final class CraftServer implements Server { internal.setSpawnSettings(true, true); // Paper - move up diff --git a/patches/server/0822-Do-not-accept-invalid-client-settings.patch b/patches/server/0822-Do-not-accept-invalid-client-settings.patch index bef1ad5d25..06d1fb2933 100644 --- a/patches/server/0822-Do-not-accept-invalid-client-settings.patch +++ b/patches/server/0822-Do-not-accept-invalid-client-settings.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Do not accept invalid client settings diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 85c328440db5aac79622a7ebf76c99affd2203d3..bb36a5c934252ce11c2705e676ecb943d362fcd4 100644 +index 1743444a48cacfad2326c8d21974e763ea332914..42bb941af5eac6e4a4d79a59be9e1ac56468c4b4 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -3487,6 +3487,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3466,6 +3466,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @Override public void handleClientInformation(ServerboundClientInformationPacket packet) { PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel()); diff --git a/patches/server/0829-Throw-exception-on-world-create-while-being-ticked.patch b/patches/server/0829-Throw-exception-on-world-create-while-being-ticked.patch index 59b2d3cfaf..e9a49b1081 100644 --- a/patches/server/0829-Throw-exception-on-world-create-while-being-ticked.patch +++ b/patches/server/0829-Throw-exception-on-world-create-while-being-ticked.patch @@ -45,7 +45,7 @@ index d8747518678596586dccb636d8e9b805260e75a7..42f566c9155b70e04d457eb05934d678 this.profiler.popPush("connection"); MinecraftTimings.connectionTimer.startTiming(); // Spigot diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 2282d0ae19c3428a32d4645caaa2d543cbd866fb..48130600572c216f071893e2925dd1758e143751 100644 +index d6cc883ed429a6a156b7bba4bb1c0dafff44f9c5..5e28c5c8b5c2ef92911822c5dad8ee24a559e393 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -872,6 +872,11 @@ public final class CraftServer implements Server { @@ -60,7 +60,7 @@ index 2282d0ae19c3428a32d4645caaa2d543cbd866fb..48130600572c216f071893e2925dd175 public DedicatedPlayerList getHandle() { return this.playerList; } -@@ -1153,6 +1158,7 @@ public final class CraftServer implements Server { +@@ -1131,6 +1136,7 @@ public final class CraftServer implements Server { @Override public World createWorld(WorldCreator creator) { Preconditions.checkState(this.console.getAllLevels().iterator().hasNext(), "Cannot create additional worlds on STARTUP"); @@ -68,7 +68,7 @@ index 2282d0ae19c3428a32d4645caaa2d543cbd866fb..48130600572c216f071893e2925dd175 Preconditions.checkArgument(creator != null, "WorldCreator cannot be null"); String name = creator.name(); -@@ -1292,6 +1298,7 @@ public final class CraftServer implements Server { +@@ -1270,6 +1276,7 @@ public final class CraftServer implements Server { @Override public boolean unloadWorld(World world, boolean save) { diff --git a/patches/server/0836-Don-t-broadcast-messages-to-command-blocks.patch b/patches/server/0836-Don-t-broadcast-messages-to-command-blocks.patch index 70b52ee7b4..c86580e24d 100644 --- a/patches/server/0836-Don-t-broadcast-messages-to-command-blocks.patch +++ b/patches/server/0836-Don-t-broadcast-messages-to-command-blocks.patch @@ -20,10 +20,10 @@ index e05eb08a9c229b371887676da510df948b896a85..ceeedbd88c56c08ec8b047c9ca2f14cc Date date = new Date(); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 48130600572c216f071893e2925dd1758e143751..f5f69968aa80c58b5325d4b6a3d03439149b7375 100644 +index 5e28c5c8b5c2ef92911822c5dad8ee24a559e393..b460bd8597b402b304b08de1f9d41ab745682126 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1794,7 +1794,7 @@ public final class CraftServer implements Server { +@@ -1772,7 +1772,7 @@ public final class CraftServer implements Server { // Paper end Set recipients = new HashSet<>(); for (Permissible permissible : this.getPluginManager().getPermissionSubscriptions(permission)) { diff --git a/patches/server/0843-Add-some-minimal-debug-information-to-chat-packet-er.patch b/patches/server/0843-Add-some-minimal-debug-information-to-chat-packet-er.patch index 25669d24d8..f349b2419f 100644 --- a/patches/server/0843-Add-some-minimal-debug-information-to-chat-packet-er.patch +++ b/patches/server/0843-Add-some-minimal-debug-information-to-chat-packet-er.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Add some minimal debug information to chat packet errors TODO: potentially add some kick leeway diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 0a5ab47ecbfa4c7d1653fdc4b918387a1389f42e..e8f40d5baec146262385f14f9b2e028f47c3ac6d 100644 +index 5c4a4b7efff2a00d7a35d902b4e18e02d4489122..e60478b96c6dc67a16b08e418971aa3bef63c0fc 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -2295,7 +2295,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @@ -16,5 +16,5 @@ index 0a5ab47ecbfa4c7d1653fdc4b918387a1389f42e..e8f40d5baec146262385f14f9b2e028f - ServerGamePacketListenerImpl.LOGGER.warn("{} sent out-of-order chat: '{}'", this.player.getName().getString(), message); + ServerGamePacketListenerImpl.LOGGER.warn("{} sent out-of-order chat: '{}': {} > {}", this.player.getName().getString(), message, this.lastChatTimeStamp.get().getEpochSecond(), timestamp.getEpochSecond()); // Paper this.server.scheduleOnMain(() -> { // Paper - push to main - this.disconnect(Component.translatable("multiplayer.disconnect.out_of_order_chat"), org.bukkit.event.player.PlayerKickEvent.Cause.OUT_OF_ORDER_CHAT); // Paper - kick event ca + this.disconnect(Component.translatable("multiplayer.disconnect.out_of_order_chat"), org.bukkit.event.player.PlayerKickEvent.Cause.OUT_OF_ORDER_CHAT); // Paper - kick event causes }); // Paper - push to main diff --git a/patches/server/0845-Fix-Spigot-Config-not-using-commands.spam-exclusions.patch b/patches/server/0845-Fix-Spigot-Config-not-using-commands.spam-exclusions.patch index 61310edc94..e77aac5a74 100644 --- a/patches/server/0845-Fix-Spigot-Config-not-using-commands.spam-exclusions.patch +++ b/patches/server/0845-Fix-Spigot-Config-not-using-commands.spam-exclusions.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix Spigot Config not using commands.spam-exclusions diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index e8f40d5baec146262385f14f9b2e028f47c3ac6d..502ee7d0629b2b2e9b2513beb9b4e2fee3e6966f 100644 +index e60478b96c6dc67a16b08e418971aa3bef63c0fc..f876cd2320788570137d9f59411bf7e908e9e81b 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2536,7 +2536,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2515,7 +2515,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } // Spigot end // this.chatSpamTickCount += 20; diff --git a/patches/server/0907-Properly-resend-entities.patch b/patches/server/0907-Properly-resend-entities.patch index 0692d5c71b..e948f3c81a 100644 --- a/patches/server/0907-Properly-resend-entities.patch +++ b/patches/server/0907-Properly-resend-entities.patch @@ -82,10 +82,10 @@ index d088479d160dbd2fc90b48a30553be141db8eef2..15add3f4dfd718ec09bb1db4f2222346 public static class DataItem { diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 7bb601078ef3a983d1807246b91b669ae5d5a8e4..dbc93883b8529b0aab3ea21ddd466bc8c3739351 100644 +index bf73cdaa4f05e4415b9d072ad46774361deddad8..b95ad6e975048364876dd47686438688f65773db 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2805,7 +2805,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2784,7 +2784,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic // Entity in bucket - SPIGOT-4048 and SPIGOT-6859a if ((entity instanceof Bucketable && entity instanceof LivingEntity && origItem != null && origItem.asItem() == Items.WATER_BUCKET) && (event.isCancelled() || ServerGamePacketListenerImpl.this.player.getInventory().getSelected() == null || ServerGamePacketListenerImpl.this.player.getInventory().getSelected().getItem() != origItem)) { diff --git a/patches/server/0914-Improve-logging-and-errors.patch b/patches/server/0914-Improve-logging-and-errors.patch index 8622471fd1..2395cd447a 100644 --- a/patches/server/0914-Improve-logging-and-errors.patch +++ b/patches/server/0914-Improve-logging-and-errors.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Improve logging and errors diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index dbc93883b8529b0aab3ea21ddd466bc8c3739351..d7a4e200853f4eb980f1ea4a5c6a338039979cf1 100644 +index b95ad6e975048364876dd47686438688f65773db..ef702b934f75578900b7b3d0156c3ede7411aa4d 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -3622,7 +3622,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3601,7 +3601,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic this.resetPlayerChatState(remotechatsession_a.validate(this.player.getGameProfile(), signaturevalidator, Duration.ZERO)); } catch (ProfilePublicKey.ValidationException profilepublickey_b) { diff --git a/patches/server/0923-Use-single-player-info-update-packet-on-join.patch b/patches/server/0923-Use-single-player-info-update-packet-on-join.patch index d359b7fc8b..95ed72f1fa 100644 --- a/patches/server/0923-Use-single-player-info-update-packet-on-join.patch +++ b/patches/server/0923-Use-single-player-info-update-packet-on-join.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Use single player info update packet on join diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 4434cad1a854fb514245c4afb3e3d469efb223f9..ce13cd909e50fcc1b63c0a515f18fd1fbd4f6aea 100644 +index 771341996a41723cceb945e18ac8b5adae337d91..5cb45e6e5f73996b2a603589b8571cf0155a42c5 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -3637,7 +3637,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3616,7 +3616,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic this.signedMessageDecoder = session.createMessageDecoder(this.player.getUUID()); this.chatMessageChain.append((executor) -> { this.player.setChatSession(session); diff --git a/patches/server/0946-Prevent-causing-expired-keys-from-impacting-new-join.patch b/patches/server/0946-Prevent-causing-expired-keys-from-impacting-new-join.patch index ad19637698..124f6000e1 100644 --- a/patches/server/0946-Prevent-causing-expired-keys-from-impacting-new-join.patch +++ b/patches/server/0946-Prevent-causing-expired-keys-from-impacting-new-join.patch @@ -24,7 +24,7 @@ index 23e0e6937e28f09271a4ec7c35e0076a576cf3d3..4aa8b483841028fbcc43f9ed47730881 UPDATE_GAME_MODE((serialized, buf) -> { serialized.gameMode = GameType.byId(buf.readVarInt()); diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 4b8a1dd566601059f77b61b8df0c6ba8d211fed3..3876bcddb3ab69aee1feb0fe19cb343e097a6824 100644 +index 419979939efcf83f03edab522b4360c9d2c03fe3..f6ba77a7c43a6a030fe4073ba7ee2970e7d774f3 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -298,6 +298,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @@ -49,7 +49,7 @@ index 4b8a1dd566601059f77b61b8df0c6ba8d211fed3..3876bcddb3ab69aee1feb0fe19cb343e } public void resetPosition() { -@@ -3635,6 +3643,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3614,6 +3622,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic private void resetPlayerChatState(RemoteChatSession session) { this.chatSession = session; diff --git a/patches/server/0996-API-for-updating-recipes-on-clients.patch b/patches/server/0996-API-for-updating-recipes-on-clients.patch index 97aae77fcc..dd3c307f1d 100644 --- a/patches/server/0996-API-for-updating-recipes-on-clients.patch +++ b/patches/server/0996-API-for-updating-recipes-on-clients.patch @@ -39,10 +39,10 @@ index fff7ad7a45f310783ac96b44575ad3db13d537fa..640e9bd618dc8286933318744c2064ed Iterator iterator1 = this.players.iterator(); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index d62cdda5ef3691a54ce34729920bad8e16c7a883..54f27d91f941235a99e341ed84531ad7f0840728 100644 +index 86b31f29742d940c43a3bca2d4b1910af2cbe1a8..7286623de9f104554d608bf1d192b8a8d890cb15 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1149,6 +1149,18 @@ public final class CraftServer implements Server { +@@ -1127,6 +1127,18 @@ public final class CraftServer implements Server { ReloadCommand.reload(console); } @@ -61,7 +61,7 @@ index d62cdda5ef3691a54ce34729920bad8e16c7a883..54f27d91f941235a99e341ed84531ad7 private void loadIcon() { this.icon = new CraftIconCache(null); try { -@@ -1491,6 +1503,13 @@ public final class CraftServer implements Server { +@@ -1469,6 +1481,13 @@ public final class CraftServer implements Server { @Override public boolean addRecipe(Recipe recipe) { @@ -75,7 +75,7 @@ index d62cdda5ef3691a54ce34729920bad8e16c7a883..54f27d91f941235a99e341ed84531ad7 CraftRecipe toAdd; if (recipe instanceof CraftRecipe) { toAdd = (CraftRecipe) recipe; -@@ -1520,6 +1539,11 @@ public final class CraftServer implements Server { +@@ -1498,6 +1517,11 @@ public final class CraftServer implements Server { } } toAdd.addToCraftingManager(); @@ -87,7 +87,7 @@ index d62cdda5ef3691a54ce34729920bad8e16c7a883..54f27d91f941235a99e341ed84531ad7 return true; } -@@ -1639,10 +1663,23 @@ public final class CraftServer implements Server { +@@ -1617,10 +1641,23 @@ public final class CraftServer implements Server { @Override public boolean removeRecipe(NamespacedKey recipeKey) { diff --git a/patches/server/1001-Use-correct-seed-on-api-world-load.patch b/patches/server/1001-Use-correct-seed-on-api-world-load.patch index 9d1369ecae..33fd258886 100644 --- a/patches/server/1001-Use-correct-seed-on-api-world-load.patch +++ b/patches/server/1001-Use-correct-seed-on-api-world-load.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Use correct seed on api world load diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 54f27d91f941235a99e341ed84531ad7f0840728..249d76acac9a91cd46f0b8a477511974a75d6f4a 100644 +index 7286623de9f104554d608bf1d192b8a8d890cb15..b4969e522199dda4f1d0319b2fbba1d3994a647c 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1330,7 +1330,7 @@ public final class CraftServer implements Server { +@@ -1308,7 +1308,7 @@ public final class CraftServer implements Server { // Paper - move down diff --git a/patches/server/1009-Deprecate-and-replace-methods-with-old-StructureType.patch b/patches/server/1009-Deprecate-and-replace-methods-with-old-StructureType.patch index aac23ba1c7..1ac756c973 100644 --- a/patches/server/1009-Deprecate-and-replace-methods-with-old-StructureType.patch +++ b/patches/server/1009-Deprecate-and-replace-methods-with-old-StructureType.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Deprecate and replace methods with old StructureType diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 249d76acac9a91cd46f0b8a477511974a75d6f4a..ec4b73321205b472f19fa5bd4ad95893020d1340 100644 +index b4969e522199dda4f1d0319b2fbba1d3994a647c..1150a114e56899758264aa678db4e9ec3e78befc 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1872,6 +1872,11 @@ public final class CraftServer implements Server { +@@ -1850,6 +1850,11 @@ public final class CraftServer implements Server { ServerLevel worldServer = ((CraftWorld) world).getHandle(); Location structureLocation = world.locateNearestStructure(location, structureType, radius, findUnexplored); @@ -20,7 +20,7 @@ index 249d76acac9a91cd46f0b8a477511974a75d6f4a..ec4b73321205b472f19fa5bd4ad95893 BlockPos structurePosition = CraftLocation.toBlockPosition(structureLocation); // Create map with trackPlayer = true, unlimitedTracking = true -@@ -1882,6 +1887,31 @@ public final class CraftServer implements Server { +@@ -1860,6 +1865,31 @@ public final class CraftServer implements Server { return CraftItemStack.asBukkitCopy(stack); }