diff --git a/Spigot-API-Patches/0005-Adventure.patch b/Spigot-API-Patches/0005-Adventure.patch new file mode 100644 index 0000000000..27990ef5b5 --- /dev/null +++ b/Spigot-API-Patches/0005-Adventure.patch @@ -0,0 +1,3169 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Riley Park +Date: Fri, 29 Jan 2021 17:21:55 +0100 +Subject: [PATCH] Adventure + +Co-authored-by: zml +Co-authored-by: Jake Potrebic + +diff --git a/pom.xml b/pom.xml +index 58fc279186e01a4703102227f387e96272fcf0a7..a6565a93848213a39694dc84be75aebcc327b1b8 100644 +--- a/pom.xml ++++ b/pom.xml +@@ -49,6 +49,28 @@ + + + ++ ++ ++ net.kyori ++ adventure-api ++ 4.4.0 ++ ++ ++ net.kyori ++ adventure-text-serializer-gson ++ 4.4.0 ++ ++ ++ net.kyori ++ adventure-text-serializer-legacy ++ 4.4.0 ++ ++ ++ net.kyori ++ adventure-text-serializer-plain ++ 4.4.0 ++ ++ + + it.unimi.dsi + fastutil +diff --git a/src/main/java/co/aikar/timings/TimingsReportListener.java b/src/main/java/co/aikar/timings/TimingsReportListener.java +index ef58a6c00f444bd498a2d8fc4e457236f393954f..ecd149157d4fb80444f34bf5633d74bcdb63dec5 100644 +--- a/src/main/java/co/aikar/timings/TimingsReportListener.java ++++ b/src/main/java/co/aikar/timings/TimingsReportListener.java +@@ -15,7 +15,7 @@ import org.jetbrains.annotations.NotNull; + import org.jetbrains.annotations.Nullable; + + @SuppressWarnings("WeakerAccess") +-public class TimingsReportListener implements MessageCommandSender { ++public class TimingsReportListener implements net.kyori.adventure.audience.ForwardingAudience, MessageCommandSender { // Paper + private final List senders; + private final Runnable onDone; + private String timingsURL; +@@ -74,4 +74,17 @@ public class TimingsReportListener implements MessageCommandSender { + this.senders.add(Bukkit.getConsoleSender()); + } + } ++ ++ // Paper start ++ @Override ++ public void sendMessage(final @NotNull net.kyori.adventure.identity.Identity source, final @NotNull net.kyori.adventure.text.Component message, final @NotNull net.kyori.adventure.audience.MessageType type) { ++ net.kyori.adventure.audience.ForwardingAudience.super.sendMessage(source, message, type); ++ } ++ ++ @NotNull ++ @Override ++ public Iterable audiences() { ++ return this.senders; ++ } ++ // Paper end + } +diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java +index 7c715fdc11ab7837552b1fe3ffd08b31cec0a63b..426b1e83226e674ee4bf3ec05ddcd3ac4376b06d 100644 +--- a/src/main/java/org/bukkit/Bukkit.java ++++ b/src/main/java/org/bukkit/Bukkit.java +@@ -278,7 +278,9 @@ public final class Bukkit { + * + * @param message the message + * @return the number of players ++ * @deprecated in favour of {@link Server#sendMessage(net.kyori.adventure.text.Component)} + */ ++ @Deprecated // Paper + public static int broadcastMessage(@NotNull String message) { + return server.broadcastMessage(message); + } +@@ -836,6 +838,7 @@ public final class Bukkit { + server.shutdown(); + } + ++ // Paper start + /** + * Broadcasts the specified message to every user with the given + * permission name. +@@ -845,6 +848,21 @@ public final class Bukkit { + * permissibles} must have to receive the broadcast + * @return number of message recipients + */ ++ public static int broadcast(@NotNull net.kyori.adventure.text.Component message, @NotNull String permission) { ++ return server.broadcast(message, permission); ++ } ++ // Paper end ++ /** ++ * Broadcasts the specified message to every user with the given ++ * permission name. ++ * ++ * @param message message to broadcast ++ * @param permission the required permission {@link Permissible ++ * permissibles} must have to receive the broadcast ++ * @return number of message recipients ++ * @deprecated in favour of {@link #broadcast(net.kyori.adventure.text.Component, String)} ++ */ ++ @Deprecated // Paper + public static int broadcast(@NotNull String message, @NotNull String permission) { + return server.broadcast(message, permission); + } +@@ -1044,6 +1062,7 @@ public final class Bukkit { + return server.createInventory(owner, type); + } + ++ // Paper start + /** + * Creates an empty inventory with the specified type and title. If the type + * is {@link InventoryType#CHEST}, the new inventory has a size of 27; +@@ -1069,6 +1088,38 @@ public final class Bukkit { + * @see InventoryType#isCreatable() + */ + @NotNull ++ public static Inventory createInventory(@Nullable InventoryHolder owner, @NotNull InventoryType type, @NotNull net.kyori.adventure.text.Component title) { ++ return server.createInventory(owner, type, title); ++ } ++ // Paper end ++ ++ /** ++ * Creates an empty inventory with the specified type and title. If the type ++ * is {@link InventoryType#CHEST}, the new inventory has a size of 27; ++ * otherwise the new inventory has the normal size for its type.
++ * It should be noted that some inventory types do not support titles and ++ * may not render with said titles on the Minecraft client. ++ *
++ * {@link InventoryType#WORKBENCH} will not process crafting recipes if ++ * created with this method. Use ++ * {@link Player#openWorkbench(Location, boolean)} instead. ++ *
++ * {@link InventoryType#ENCHANTING} will not process {@link ItemStack}s ++ * for possible enchanting results. Use ++ * {@link Player#openEnchanting(Location, boolean)} instead. ++ * ++ * @param owner The holder of the inventory; can be null if there's no holder. ++ * @param type The type of inventory to create. ++ * @param title The title of the inventory, to be displayed when it is viewed. ++ * @return The new inventory. ++ * @throws IllegalArgumentException if the {@link InventoryType} cannot be ++ * viewed. ++ * @deprecated in favour of {@link #createInventory(InventoryHolder, InventoryType, net.kyori.adventure.text.Component)} ++ * ++ * @see InventoryType#isCreatable() ++ */ ++ @Deprecated // Paper ++ @NotNull + public static Inventory createInventory(@Nullable InventoryHolder owner, @NotNull InventoryType type, @NotNull String title) { + return server.createInventory(owner, type, title); + } +@@ -1087,6 +1138,7 @@ public final class Bukkit { + return server.createInventory(owner, size); + } + ++ // Paper start + /** + * Creates an empty inventory of type {@link InventoryType#CHEST} with the + * specified size and title. +@@ -1099,10 +1151,30 @@ public final class Bukkit { + * @throws IllegalArgumentException if the size is not a multiple of 9 + */ + @NotNull ++ public static Inventory createInventory(@Nullable InventoryHolder owner, int size, @NotNull net.kyori.adventure.text.Component title) throws IllegalArgumentException { ++ return server.createInventory(owner, size, title); ++ } ++ // Paper end ++ ++ /** ++ * Creates an empty inventory of type {@link InventoryType#CHEST} with the ++ * specified size and title. ++ * ++ * @param owner the holder of the inventory, or null to indicate no holder ++ * @param size a multiple of 9 as the size of inventory to create ++ * @param title the title of the inventory, displayed when inventory is ++ * viewed ++ * @return a new inventory ++ * @throws IllegalArgumentException if the size is not a multiple of 9 ++ * @deprecated in favour of {@link #createInventory(InventoryHolder, InventoryType, net.kyori.adventure.text.Component)} ++ */ ++ @Deprecated // Paper ++ @NotNull + public static Inventory createInventory(@Nullable InventoryHolder owner, int size, @NotNull String title) throws IllegalArgumentException { + return server.createInventory(owner, size, title); + } + ++ // Paper start + /** + * Creates an empty merchant. + * +@@ -1110,7 +1182,20 @@ public final class Bukkit { + * when the merchant inventory is viewed + * @return a new merchant + */ ++ public static @NotNull Merchant createMerchant(@Nullable net.kyori.adventure.text.Component title) { ++ return server.createMerchant(title); ++ } ++ // Paper start ++ /** ++ * Creates an empty merchant. ++ * ++ * @param title the title of the corresponding merchant inventory, displayed ++ * when the merchant inventory is viewed ++ * @return a new merchant ++ * @deprecated in favour of {@link #createMerchant(net.kyori.adventure.text.Component)} ++ */ + @NotNull ++ @Deprecated // Paper + public static Merchant createMerchant(@Nullable String title) { + return server.createMerchant(title); + } +@@ -1181,22 +1266,47 @@ public final class Bukkit { + return server.isPrimaryThread(); + } + ++ // Paper start ++ /** ++ * Gets the message that is displayed on the server list. ++ * ++ * @return the server's MOTD ++ */ ++ @NotNull public static net.kyori.adventure.text.Component motd() { ++ return server.motd(); ++ } ++ // Paper end ++ + /** + * Gets the message that is displayed on the server list. + * + * @return the servers MOTD ++ * @deprecated in favour of {@link #motd()} + */ + @NotNull ++ @Deprecated // Paper + public static String getMotd() { + return server.getMotd(); + } + ++ // Paper start ++ /** ++ * Gets the default message that is displayed when the server is stopped. ++ * ++ * @return the shutdown message ++ */ ++ public static @Nullable net.kyori.adventure.text.Component shutdownMessage() { ++ return server.shutdownMessage(); ++ } ++ // Paper end + /** + * Gets the default message that is displayed when the server is stopped. + * + * @return the shutdown message ++ * @deprecated in favour of {@link #shutdownMessage()} + */ + @Nullable ++ @Deprecated // Paper + public static String getShutdownMessage() { + return server.getShutdownMessage(); + } +diff --git a/src/main/java/org/bukkit/Nameable.java b/src/main/java/org/bukkit/Nameable.java +index fee814e01a653d2b53c56e8b566383ca44aa5346..2acdf2a6d3955923c721222b9da784f3278f6418 100644 +--- a/src/main/java/org/bukkit/Nameable.java ++++ b/src/main/java/org/bukkit/Nameable.java +@@ -4,6 +4,30 @@ import org.jetbrains.annotations.Nullable; + + public interface Nameable { + ++ // Paper start ++ /** ++ * Gets the custom name. ++ * ++ *

This value has no effect on players, they will always use their real name.

++ * ++ * @return the custom name ++ */ ++ @Nullable net.kyori.adventure.text.Component customName(); ++ ++ /** ++ * Sets the custom name. ++ * ++ *

This name will be used in death messages and can be sent to the client as a nameplate over the mob.

++ * ++ *

Setting the name to {@code null} will clear it.

++ * ++ *

This value has no effect on players, they will always use their real name.

++ * ++ * @param customName the custom name to set ++ */ ++ void customName(final @Nullable net.kyori.adventure.text.Component customName); ++ // Paper end ++ + /** + * Gets the custom name on a mob or block. If there is no name this method + * will return null. +diff --git a/src/main/java/org/bukkit/NamespacedKey.java b/src/main/java/org/bukkit/NamespacedKey.java +index 22eca2a180618ed43a4ef103bebd134897d6c71a..abb7448ee8fe1152623794d3b806eef9a9e17abc 100644 +--- a/src/main/java/org/bukkit/NamespacedKey.java ++++ b/src/main/java/org/bukkit/NamespacedKey.java +@@ -18,7 +18,7 @@ import org.jetbrains.annotations.NotNull; + * underscores, hyphens, and forward slashes. + * + */ +-public final class NamespacedKey { ++public final class NamespacedKey implements net.kyori.adventure.key.Key { // Paper - implement Key + + /** + * The namespace representing all inbuilt keys. +@@ -139,4 +139,24 @@ public final class NamespacedKey { + public static NamespacedKey minecraft(@NotNull String key) { + return new NamespacedKey(MINECRAFT, key); + } ++ ++ // Paper start ++ @NotNull ++ @Override ++ public String namespace() { ++ return this.getNamespace(); ++ } ++ ++ @NotNull ++ @Override ++ public String value() { ++ return this.getKey(); ++ } ++ ++ @NotNull ++ @Override ++ public String asString() { ++ return this.namespace + ':' + this.key; ++ } ++ // Paper end + } +diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java +index a6b9e4f158583e5932bf8ca210d531857e9f5360..d9515a79dc7ed60c66960cd6c6bb4c108f206f3c 100644 +--- a/src/main/java/org/bukkit/Server.java ++++ b/src/main/java/org/bukkit/Server.java +@@ -55,7 +55,7 @@ import org.jetbrains.annotations.Nullable; + /** + * Represents a server implementation. + */ +-public interface Server extends PluginMessageRecipient { ++public interface Server extends PluginMessageRecipient, net.kyori.adventure.audience.ForwardingAudience { // Paper + + /** + * Used for all administrative messages, such as an operator using a +@@ -229,7 +229,9 @@ public interface Server extends PluginMessageRecipient { + * + * @param message the message + * @return the number of players ++ * @deprecated use {@code sendMessage} methods that accept {@link net.kyori.adventure.text.Component} + */ ++ @Deprecated // Paper + public int broadcastMessage(@NotNull String message); + + /** +@@ -703,8 +705,22 @@ public interface Server extends PluginMessageRecipient { + * @param permission the required permission {@link Permissible + * permissibles} must have to receive the broadcast + * @return number of message recipients ++ * @deprecated in favour of {@link #broadcast(net.kyori.adventure.text.Component, String)} + */ ++ @Deprecated // Paper + public int broadcast(@NotNull String message, @NotNull String permission); ++ // Paper start ++ /** ++ * Broadcasts the specified message to every user with the given ++ * permission name. ++ * ++ * @param message message to broadcast ++ * @param permission the required permission {@link Permissible ++ * permissibles} must have to receive the broadcast ++ * @return number of message recipients ++ */ ++ int broadcast(@NotNull net.kyori.adventure.text.Component message, @NotNull String permission); ++ // Paper end + + /** + * Gets the player by the given name, regardless if they are offline or +@@ -869,6 +885,7 @@ public interface Server extends PluginMessageRecipient { + @NotNull + Inventory createInventory(@Nullable InventoryHolder owner, @NotNull InventoryType type); + ++ // Paper start + /** + * Creates an empty inventory with the specified type and title. If the type + * is {@link InventoryType#CHEST}, the new inventory has a size of 27; +@@ -894,6 +911,36 @@ public interface Server extends PluginMessageRecipient { + * @see InventoryType#isCreatable() + */ + @NotNull ++ Inventory createInventory(@Nullable InventoryHolder owner, @NotNull InventoryType type, @NotNull net.kyori.adventure.text.Component title); ++ // Paper end ++ ++ /** ++ * Creates an empty inventory with the specified type and title. If the type ++ * is {@link InventoryType#CHEST}, the new inventory has a size of 27; ++ * otherwise the new inventory has the normal size for its type.
++ * It should be noted that some inventory types do not support titles and ++ * may not render with said titles on the Minecraft client. ++ *
++ * {@link InventoryType#WORKBENCH} will not process crafting recipes if ++ * created with this method. Use ++ * {@link Player#openWorkbench(Location, boolean)} instead. ++ *
++ * {@link InventoryType#ENCHANTING} will not process {@link ItemStack}s ++ * for possible enchanting results. Use ++ * {@link Player#openEnchanting(Location, boolean)} instead. ++ * ++ * @param owner The holder of the inventory; can be null if there's no holder. ++ * @param type The type of inventory to create. ++ * @param title The title of the inventory, to be displayed when it is viewed. ++ * @return The new inventory. ++ * @throws IllegalArgumentException if the {@link InventoryType} cannot be ++ * viewed. ++ * @deprecated in favour of {@link #createInventory(InventoryHolder, InventoryType, net.kyori.adventure.text.Component)} ++ * ++ * @see InventoryType#isCreatable() ++ */ ++ @Deprecated // Paper ++ @NotNull + Inventory createInventory(@Nullable InventoryHolder owner, @NotNull InventoryType type, @NotNull String title); + + /** +@@ -908,6 +955,22 @@ public interface Server extends PluginMessageRecipient { + @NotNull + Inventory createInventory(@Nullable InventoryHolder owner, int size) throws IllegalArgumentException; + ++ // Paper start ++ /** ++ * Creates an empty inventory of type {@link InventoryType#CHEST} with the ++ * specified size and title. ++ * ++ * @param owner the holder of the inventory, or null to indicate no holder ++ * @param size a multiple of 9 as the size of inventory to create ++ * @param title the title of the inventory, displayed when inventory is ++ * viewed ++ * @return a new inventory ++ * @throws IllegalArgumentException if the size is not a multiple of 9 ++ */ ++ @NotNull ++ Inventory createInventory(@Nullable InventoryHolder owner, int size, @NotNull net.kyori.adventure.text.Component title) throws IllegalArgumentException; ++ // Paper end ++ + /** + * Creates an empty inventory of type {@link InventoryType#CHEST} with the + * specified size and title. +@@ -918,18 +981,32 @@ public interface Server extends PluginMessageRecipient { + * viewed + * @return a new inventory + * @throws IllegalArgumentException if the size is not a multiple of 9 ++ * @deprecated in favour of {@link #createInventory(InventoryHolder, int, net.kyori.adventure.text.Component)} + */ ++ @Deprecated // Paper + @NotNull + Inventory createInventory(@Nullable InventoryHolder owner, int size, @NotNull String title) throws IllegalArgumentException; + ++ // Paper start ++ /** ++ * Creates an empty merchant. ++ * ++ * @param title the title of the corresponding merchant inventory, displayed ++ * when the merchant inventory is viewed ++ * @return a new merchant ++ */ ++ @NotNull Merchant createMerchant(@Nullable net.kyori.adventure.text.Component title); ++ // Paper start + /** + * Creates an empty merchant. + * + * @param title the title of the corresponding merchant inventory, displayed + * when the merchant inventory is viewed + * @return a new merchant ++ * @deprecated in favour of {@link #createMerchant(net.kyori.adventure.text.Component)} + */ + @NotNull ++ @Deprecated // Paper + Merchant createMerchant(@Nullable String title); + + /** +@@ -986,20 +1063,41 @@ public interface Server extends PluginMessageRecipient { + */ + boolean isPrimaryThread(); + ++ // Paper start ++ /** ++ * Gets the message that is displayed on the server list. ++ * ++ * @return the server's MOTD ++ */ ++ @NotNull net.kyori.adventure.text.Component motd(); ++ // Paper end ++ + /** + * Gets the message that is displayed on the server list. + * + * @return the servers MOTD ++ * @deprecated in favour of {@link #motd()} + */ + @NotNull ++ @Deprecated // Paper + String getMotd(); + ++ // Paper start ++ /** ++ * Gets the default message that is displayed when the server is stopped. ++ * ++ * @return the shutdown message ++ */ ++ @Nullable net.kyori.adventure.text.Component shutdownMessage(); ++ // Paper end + /** + * Gets the default message that is displayed when the server is stopped. + * + * @return the shutdown message ++ * @deprecated in favour of {@link #shutdownMessage()} + */ + @Nullable ++ @Deprecated // Paper + String getShutdownMessage(); + + /** +@@ -1368,7 +1466,9 @@ public interface Server extends PluginMessageRecipient { + * Sends the component to the player + * + * @param component the components to send ++ * @deprecated use {@code sendMessage} methods that accept {@link net.kyori.adventure.text.Component} + */ ++ @Deprecated // Paper + public void broadcast(@NotNull net.md_5.bungee.api.chat.BaseComponent component) { + throw new UnsupportedOperationException("Not supported yet."); + } +@@ -1377,7 +1477,9 @@ public interface Server extends PluginMessageRecipient { + * Sends an array of components as a single message to the player + * + * @param components the components to send ++ * @deprecated use {@code sendMessage} methods that accept {@link net.kyori.adventure.text.Component} + */ ++ @Deprecated // Paper + public void broadcast(@NotNull net.md_5.bungee.api.chat.BaseComponent... components) { + throw new UnsupportedOperationException("Not supported yet."); + } +diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java +index cdcbc8b05afc412017ac0e4ed0adf227d1342336..6b5dbe4ea711807a1944cfe2aae2ce415d4f2638 100644 +--- a/src/main/java/org/bukkit/World.java ++++ b/src/main/java/org/bukkit/World.java +@@ -38,7 +38,7 @@ import org.jetbrains.annotations.Nullable; + /** + * Represents a world, which may contain entities, chunks and blocks + */ +-public interface World extends PluginMessageRecipient, Metadatable { ++public interface World extends PluginMessageRecipient, Metadatable, net.kyori.adventure.audience.ForwardingAudience { // Paper + + /** + * Gets the {@link Block} at the given coordinates +@@ -616,6 +616,14 @@ public interface World extends PluginMessageRecipient, Metadatable { + @NotNull + public List getPlayers(); + ++ // Paper start ++ @NotNull ++ @Override ++ default Iterable audiences() { ++ return this.getPlayers(); ++ } ++ // Paper end ++ + /** + * Returns a list of entities within a bounding box centered around a + * Location. +diff --git a/src/main/java/org/bukkit/block/Sign.java b/src/main/java/org/bukkit/block/Sign.java +index 7e3cf00e49c66023bf46c298ef46c00e8c3c2caf..6ea9b54d95d80070c01a612c0ce2ab37f0b4ad41 100644 +--- a/src/main/java/org/bukkit/block/Sign.java ++++ b/src/main/java/org/bukkit/block/Sign.java +@@ -7,13 +7,48 @@ import org.jetbrains.annotations.NotNull; + * Represents a captured state of either a SignPost or a WallSign. + */ + public interface Sign extends TileState, Colorable { ++ // Paper start ++ /** ++ * Gets all the lines of text currently on this sign. ++ * ++ * @return Array of Strings containing each line of text ++ */ ++ @NotNull ++ public java.util.List lines(); ++ ++ /** ++ * Gets the line of text at the specified index. ++ *

++ * For example, getLine(0) will return the first line of text. ++ * ++ * @param index Line number to get the text from, starting at 0 ++ * @throws IndexOutOfBoundsException Thrown when the line does not exist ++ * @return Text on the given line ++ */ ++ @NotNull ++ public net.kyori.adventure.text.Component line(int index) throws IndexOutOfBoundsException; ++ ++ /** ++ * Sets the line of text at the specified index. ++ *

++ * For example, setLine(0, "Line One") will set the first line of text to ++ * "Line One". ++ * ++ * @param index Line number to set the text at, starting from 0 ++ * @param line New text to set at the specified index ++ * @throws IndexOutOfBoundsException If the index is out of the range 0..3 ++ */ ++ public void line(int index, @NotNull net.kyori.adventure.text.Component line) throws IndexOutOfBoundsException; ++ // Paper end + + /** + * Gets all the lines of text currently on this sign. + * + * @return Array of Strings containing each line of text ++ * @deprecated in favour of {@link #lines()} + */ + @NotNull ++ @Deprecated // Paper + public String[] getLines(); + + /** +@@ -24,8 +59,10 @@ public interface Sign extends TileState, Colorable { + * @param index Line number to get the text from, starting at 0 + * @throws IndexOutOfBoundsException Thrown when the line does not exist + * @return Text on the given line ++ * @deprecated in favour of {@link #line(int)} + */ + @NotNull ++ @Deprecated // Paper + public String getLine(int index) throws IndexOutOfBoundsException; + + /** +@@ -37,7 +74,9 @@ public interface Sign extends TileState, Colorable { + * @param index Line number to set the text at, starting from 0 + * @param line New text to set at the specified index + * @throws IndexOutOfBoundsException If the index is out of the range 0..3 ++ * @deprecated in favour of {@link #line(int, net.kyori.adventure.text.Component)} + */ ++ @Deprecated // Paper + public void setLine(int index, @NotNull String line) throws IndexOutOfBoundsException; + + /** +diff --git a/src/main/java/org/bukkit/command/CommandSender.java b/src/main/java/org/bukkit/command/CommandSender.java +index ac772bf349e0ffe9cab1df165d9460b387f2fe69..2588edf75483855e0c843834f39ca371770730b9 100644 +--- a/src/main/java/org/bukkit/command/CommandSender.java ++++ b/src/main/java/org/bukkit/command/CommandSender.java +@@ -6,12 +6,13 @@ import org.bukkit.permissions.Permissible; + import org.jetbrains.annotations.NotNull; + import org.jetbrains.annotations.Nullable; + +-public interface CommandSender extends Permissible { ++public interface CommandSender extends net.kyori.adventure.audience.Audience, Permissible { // Paper + + /** + * Sends this sender a message + * + * @param message Message to be displayed ++ * @see #sendMessage(net.kyori.adventure.text.Component) + */ + public void sendMessage(@NotNull String message); + +@@ -19,6 +20,7 @@ public interface CommandSender extends Permissible { + * Sends this sender multiple messages + * + * @param messages An array of messages to be displayed ++ * @see #sendMessage(net.kyori.adventure.text.Component) + */ + public void sendMessage(@NotNull String[] messages); + +@@ -27,6 +29,7 @@ public interface CommandSender extends Permissible { + * + * @param message Message to be displayed + * @param sender The sender of this message ++ * @see #sendMessage(net.kyori.adventure.identity.Identified, net.kyori.adventure.text.Component) + */ + public void sendMessage(@Nullable UUID sender, @NotNull String message); + +@@ -35,6 +38,7 @@ public interface CommandSender extends Permissible { + * + * @param messages An array of messages to be displayed + * @param sender The sender of this message ++ * @see #sendMessage(net.kyori.adventure.identity.Identified, net.kyori.adventure.text.Component) + */ + public void sendMessage(@Nullable UUID sender, @NotNull String[] messages); + +@@ -61,7 +65,9 @@ public interface CommandSender extends Permissible { + * Sends this sender a chat component. + * + * @param component the components to send ++ * @deprecated use {@code sendMessage} methods that accept {@link net.kyori.adventure.text.Component} + */ ++ @Deprecated // Paper + public void sendMessage(@NotNull net.md_5.bungee.api.chat.BaseComponent component) { + throw new UnsupportedOperationException("Not supported yet."); + } +@@ -70,7 +76,9 @@ public interface CommandSender extends Permissible { + * Sends an array of components as a single message to the sender. + * + * @param components the components to send ++ * @deprecated use {@code sendMessage} methods that accept {@link net.kyori.adventure.text.Component} + */ ++ @Deprecated // Paper + public void sendMessage(@NotNull net.md_5.bungee.api.chat.BaseComponent... components) { + throw new UnsupportedOperationException("Not supported yet."); + } +@@ -80,7 +88,9 @@ public interface CommandSender extends Permissible { + * + * @param component the components to send + * @param sender the sender of the message ++ * @deprecated use {@code sendMessage} methods that accept {@link net.kyori.adventure.text.Component} + */ ++ @Deprecated // Paper + public void sendMessage(@Nullable UUID sender, @NotNull net.md_5.bungee.api.chat.BaseComponent component) { + throw new UnsupportedOperationException("Not supported yet."); + } +@@ -90,7 +100,9 @@ public interface CommandSender extends Permissible { + * + * @param components the components to send + * @param sender the sender of the message ++ * @deprecated use {@code sendMessage} methods that accept {@link net.kyori.adventure.text.Component} + */ ++ @Deprecated // Paper + public void sendMessage(@Nullable UUID sender, @NotNull net.md_5.bungee.api.chat.BaseComponent... components) { + throw new UnsupportedOperationException("Not supported yet."); + } +@@ -99,4 +111,11 @@ public interface CommandSender extends Permissible { + @NotNull + Spigot spigot(); + // Spigot end ++ ++ // Paper start ++ @Override ++ default void sendMessage(final @NotNull net.kyori.adventure.identity.Identity identity, final @NotNull net.kyori.adventure.text.Component message, final @NotNull net.kyori.adventure.audience.MessageType type) { ++ this.sendMessage(net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().serialize(message)); ++ } ++ // Paper end + } +diff --git a/src/main/java/org/bukkit/command/ProxiedCommandSender.java b/src/main/java/org/bukkit/command/ProxiedCommandSender.java +index fcc34b640265f4dccb46b9f09466ab8e1d96043e..74599b4ee0518481c0e3a5f6ab2f5302837f1ae3 100644 +--- a/src/main/java/org/bukkit/command/ProxiedCommandSender.java ++++ b/src/main/java/org/bukkit/command/ProxiedCommandSender.java +@@ -3,7 +3,7 @@ package org.bukkit.command; + + import org.jetbrains.annotations.NotNull; + +-public interface ProxiedCommandSender extends CommandSender { ++public interface ProxiedCommandSender extends CommandSender, net.kyori.adventure.audience.ForwardingAudience.Single { // Paper + + /** + * Returns the CommandSender which triggered this proxied command +@@ -21,4 +21,16 @@ public interface ProxiedCommandSender extends CommandSender { + @NotNull + CommandSender getCallee(); + ++ // Paper start ++ @Override ++ default void sendMessage(final @NotNull net.kyori.adventure.identity.Identity source, final @NotNull net.kyori.adventure.text.Component message, final @NotNull net.kyori.adventure.audience.MessageType type) { ++ net.kyori.adventure.audience.ForwardingAudience.Single.super.sendMessage(source, message, type); ++ } ++ ++ @NotNull ++ @Override ++ default net.kyori.adventure.audience.Audience audience() { ++ return this.getCaller(); ++ } ++ // Paper end + } +diff --git a/src/main/java/org/bukkit/enchantments/Enchantment.java b/src/main/java/org/bukkit/enchantments/Enchantment.java +index b833ef63fbe01271ceb2bd83a9eb4a84c9912761..8eb0497c81744874809ebc4bc2e28b128e66a926 100644 +--- a/src/main/java/org/bukkit/enchantments/Enchantment.java ++++ b/src/main/java/org/bukkit/enchantments/Enchantment.java +@@ -294,6 +294,19 @@ public abstract class Enchantment implements Keyed { + * @return True if the enchantment may be applied, otherwise False + */ + public abstract boolean canEnchantItem(@NotNull ItemStack item); ++ // Paper start ++ /** ++ * Get the name of the enchantment with its applied level. ++ *

++ * If the given {@code level} is either less than the {@link #getStartLevel()} or greater than the {@link #getMaxLevel()}, ++ * the level may not be shown in the numeral format one may otherwise expect. ++ *

++ * ++ * @param level the level of the enchantment to show ++ * @return the name of the enchantment with {@code level} applied ++ */ ++ public abstract @NotNull net.kyori.adventure.text.Component displayName(int level); ++ // Paper end + + @Override + public boolean equals(Object obj) { +diff --git a/src/main/java/org/bukkit/enchantments/EnchantmentWrapper.java b/src/main/java/org/bukkit/enchantments/EnchantmentWrapper.java +index 9566e4306ada5e82dede0f002aa06da12c44996b..4d5f0837bd0e02a30c943d8969fb6b13452322e0 100644 +--- a/src/main/java/org/bukkit/enchantments/EnchantmentWrapper.java ++++ b/src/main/java/org/bukkit/enchantments/EnchantmentWrapper.java +@@ -63,4 +63,11 @@ public class EnchantmentWrapper extends Enchantment { + public boolean conflictsWith(@NotNull Enchantment other) { + return getEnchantment().conflictsWith(other); + } ++ // Paper start ++ @NotNull ++ @Override ++ public net.kyori.adventure.text.Component displayName(int level) { ++ return getEnchantment().displayName(level); ++ } ++ // Paper end + } +diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java +index 344c14a5ed86e9ebe401bfb5ba3aedc0c0ed0b04..41a1bc45cc5eb7f19374115ade7f5328c7fc1dae 100644 +--- a/src/main/java/org/bukkit/entity/Entity.java ++++ b/src/main/java/org/bukkit/entity/Entity.java +@@ -25,7 +25,7 @@ import org.jetbrains.annotations.Nullable; + /** + * Represents a base entity in the world + */ +-public interface Entity extends Metadatable, CommandSender, Nameable, PersistentDataHolder { ++public interface Entity extends Metadatable, CommandSender, Nameable, PersistentDataHolder, net.kyori.adventure.text.event.HoverEventSource { // Paper + + /** + * Gets the entity's current position +@@ -602,4 +602,12 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent + @Override + Spigot spigot(); + // Spigot end ++ ++ // Paper start ++ @NotNull ++ @Override ++ default net.kyori.adventure.text.event.HoverEvent asHoverEvent(final @NotNull java.util.function.UnaryOperator op) { ++ return net.kyori.adventure.text.event.HoverEvent.showEntity(op.apply(net.kyori.adventure.text.event.HoverEvent.ShowEntity.of(this.getType().getKey(), this.getUniqueId(), this.customName()))); ++ } ++ // Paper end + } +diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java +index f22b21ee12496452f7b2125c131f56ecc74d439a..447de8f7c1d871ef5fb1a06bace451e1de06d972 100644 +--- a/src/main/java/org/bukkit/entity/Player.java ++++ b/src/main/java/org/bukkit/entity/Player.java +@@ -30,7 +30,28 @@ import org.jetbrains.annotations.Nullable; + /** + * Represents a player, connected or not + */ +-public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginMessageRecipient { ++public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginMessageRecipient, net.kyori.adventure.identity.Identified { // Paper ++ ++ // Paper start ++ @Override ++ default @NotNull net.kyori.adventure.identity.Identity identity() { ++ return net.kyori.adventure.identity.Identity.identity(this.getUniqueId()); ++ } ++ ++ /** ++ * Gets the "friendly" name to display of this player. ++ * ++ * @return the display name ++ */ ++ @NotNull net.kyori.adventure.text.Component displayName(); ++ ++ /** ++ * Sets the "friendly" name to display of this player. ++ * ++ * @param displayName the display name to set ++ */ ++ void displayName(final @Nullable net.kyori.adventure.text.Component displayName); ++ // Paper end + + /** + * Gets the "friendly" name to display of this player. This may include +@@ -40,7 +61,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM + * places defined by plugins. + * + * @return the friendly name ++ * @deprecated in favour of {@link #displayName()} + */ ++ @Deprecated // Paper + @NotNull + public String getDisplayName(); + +@@ -52,15 +75,51 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM + * places defined by plugins. + * + * @param name The new display name. ++ * @deprecated in favour of {@link #displayName(net.kyori.adventure.text.Component)} + */ ++ @Deprecated // Paper + public void setDisplayName(@Nullable String name); + ++ // Paper start ++ /** ++ * Sets the name that is shown on the in-game player list. ++ *

++ * If the value is null, the name will be identical to {@link #getName()}. ++ * ++ * @param name new player list name ++ */ ++ void playerListName(@Nullable net.kyori.adventure.text.Component name); ++ ++ /** ++ * Gets the currently displayed player list header for this player. ++ * ++ * @return player list header or null ++ */ ++ @Nullable net.kyori.adventure.text.Component playerListName(); ++ ++ /** ++ * Gets the currently displayed player list header for this player. ++ * ++ * @return player list header or null ++ * @deprecated in favour of {@link #playerListName()} ++ */ ++ @Nullable net.kyori.adventure.text.Component playerListHeader(); ++ ++ /** ++ * Gets the currently displayed player list footer for this player. ++ * ++ * @return player list header or null ++ */ ++ @Nullable net.kyori.adventure.text.Component playerListFooter(); ++ // Paper end + /** + * Gets the name that is shown on the player list. + * + * @return the player list name ++ * @deprecated in favour of {@link #playerListName()} + */ + @NotNull ++ @Deprecated // Paper + public String getPlayerListName(); + + /** +@@ -69,14 +128,18 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM + * If the value is null, the name will be identical to {@link #getName()}. + * + * @param name new player list name ++ * @deprecated in favour of {@link #playerListName(net.kyori.adventure.text.Component)} + */ ++ @Deprecated // Paper + public void setPlayerListName(@Nullable String name); + + /** + * Gets the currently displayed player list header for this player. + * + * @return player list header or null ++ * @deprecated in favour of {@link #playerListHeader()} + */ ++ @Deprecated // Paper + @Nullable + public String getPlayerListHeader(); + +@@ -84,7 +147,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM + * Gets the currently displayed player list footer for this player. + * + * @return player list header or null ++ * @deprecated in favour of {@link #playerListFooter()} + */ ++ @Deprecated // Paper + @Nullable + public String getPlayerListFooter(); + +@@ -92,14 +157,18 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM + * Sets the currently displayed player list header for this player. + * + * @param header player list header, null for empty ++ * @deprecated in favour of {@link #sendPlayerListHeader(net.kyori.adventure.text.Component)} + */ ++ @Deprecated // Paper + public void setPlayerListHeader(@Nullable String header); + + /** + * Sets the currently displayed player list footer for this player. + * + * @param footer player list footer, null for empty ++ * @deprecated in favour of {@link #sendPlayerListFooter(net.kyori.adventure.text.Component)} + */ ++ @Deprecated // Paper + public void setPlayerListFooter(@Nullable String footer); + + /** +@@ -108,7 +177,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM + * + * @param header player list header, null for empty + * @param footer player list footer, null for empty ++ * @deprecated in favour of {@link #sendPlayerListHeaderAndFooter(net.kyori.adventure.text.Component, net.kyori.adventure.text.Component)} + */ ++ @Deprecated // Paper + public void setPlayerListHeaderFooter(@Nullable String header, @Nullable String footer); + + /** +@@ -146,9 +217,20 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM + * Kicks player with custom kick message. + * + * @param message kick message ++ * @deprecated in favour of {@link #kick(net.kyori.adventure.text.Component)} + */ ++ @Deprecated // Paper + public void kickPlayer(@Nullable String message); + ++ // Paper start ++ /** ++ * Kicks player with custom kick message. ++ * ++ * @param message kick message ++ */ ++ void kick(final @Nullable net.kyori.adventure.text.Component message); ++ // Paper end ++ + /** + * Says a message (or runs a command). + * +@@ -437,6 +519,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM + @Deprecated + public boolean sendChunkChange(@NotNull Location loc, int sx, int sy, int sz, @NotNull byte[] data); + ++ // Paper start + /** + * Send a sign change. This fakes a sign change packet for a user at + * a certain location. This will not actually change the world in any way. +@@ -452,6 +535,43 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM + * @throws IllegalArgumentException if location is null + * @throws IllegalArgumentException if lines is non-null and has a length less than 4 + */ ++ void sendSignChange(@NotNull Location loc, @Nullable java.util.List lines) throws IllegalArgumentException; ++ /** ++ * Send a sign change. This fakes a sign change packet for a user at ++ * a certain location. This will not actually change the world in any way. ++ * This method will use a sign at the location's block or a faked sign ++ * sent via ++ * {@link #sendBlockChange(org.bukkit.Location, org.bukkit.Material, byte)}. ++ *

++ * If the client does not have a sign at the given location it will ++ * display an error message to the user. ++ * ++ * @param loc the location of the sign ++ * @param lines the new text on the sign or null to clear it ++ * @param dyeColor the color of the sign ++ * @throws IllegalArgumentException if location is null ++ * @throws IllegalArgumentException if dyeColor is null ++ * @throws IllegalArgumentException if lines is non-null and has a length less than 4 ++ */ ++ void sendSignChange(@NotNull Location loc, @Nullable java.util.List lines, @NotNull DyeColor dyeColor) throws IllegalArgumentException; ++ // Paper end ++ /** ++ * Send a sign change. This fakes a sign change packet for a user at ++ * a certain location. This will not actually change the world in any way. ++ * This method will use a sign at the location's block or a faked sign ++ * sent via ++ * {@link #sendBlockChange(org.bukkit.Location, org.bukkit.Material, byte)}. ++ *

++ * If the client does not have a sign at the given location it will ++ * display an error message to the user. ++ * ++ * @param loc the location of the sign ++ * @param lines the new text on the sign or null to clear it ++ * @throws IllegalArgumentException if location is null ++ * @throws IllegalArgumentException if lines is non-null and has a length less than 4 ++ * @deprecated in favour of {@link #sendSignChange(org.bukkit.Location, java.util.List)} ++ */ ++ @Deprecated // Paper + public void sendSignChange(@NotNull Location loc, @Nullable String[] lines) throws IllegalArgumentException; + + +@@ -471,7 +591,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM + * @throws IllegalArgumentException if location is null + * @throws IllegalArgumentException if dyeColor is null + * @throws IllegalArgumentException if lines is non-null and has a length less than 4 ++ * @deprecated in favour of {@link #sendSignChange(org.bukkit.Location, java.util.List, org.bukkit.DyeColor)} + */ ++ @Deprecated // Paper + public void sendSignChange(@NotNull Location loc, @Nullable String[] lines, @NotNull DyeColor dyeColor) throws IllegalArgumentException; + + /** +@@ -1258,6 +1380,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM + */ + public int getClientViewDistance(); + ++ // Paper start ++ /** ++ * Gets the player's current locale. ++ * ++ * @return the player's locale ++ */ ++ @NotNull java.util.Locale locale(); ++ // Paper end + /** + * Gets the player's current locale. + * +@@ -1268,8 +1398,10 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM + * they wish. + * + * @return the player's locale ++ * @deprecated in favour of {@link #locale()} + */ + @NotNull ++ @Deprecated // Paper + public String getLocale(); + + /** +@@ -1287,6 +1419,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM + */ + public void openBook(@NotNull ItemStack book); + ++ // Paper start ++ @NotNull ++ @Override ++ default net.kyori.adventure.text.event.HoverEvent asHoverEvent(final @NotNull java.util.function.UnaryOperator op) { ++ return net.kyori.adventure.text.event.HoverEvent.showEntity(this.getType().getKey(), this.getUniqueId(), this.displayName()); ++ } ++ // Paper end ++ + // Spigot start + public class Spigot extends Entity.Spigot { + +@@ -1341,11 +1481,13 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM + throw new UnsupportedOperationException("Not supported yet."); + } + ++ @Deprecated // Paper + @Override + public void sendMessage(@NotNull net.md_5.bungee.api.chat.BaseComponent component) { + throw new UnsupportedOperationException("Not supported yet."); + } + ++ @Deprecated // Paper + @Override + public void sendMessage(@NotNull net.md_5.bungee.api.chat.BaseComponent... components) { + throw new UnsupportedOperationException("Not supported yet."); +@@ -1356,7 +1498,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM + * + * @param position the screen position + * @param component the components to send ++ * @deprecated use {@code sendMessage} methods that accept {@link net.kyori.adventure.text.Component} + */ ++ @Deprecated // Paper + public void sendMessage(@NotNull net.md_5.bungee.api.ChatMessageType position, @NotNull net.md_5.bungee.api.chat.BaseComponent component) { + throw new UnsupportedOperationException("Not supported yet."); + } +@@ -1366,7 +1510,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM + * + * @param position the screen position + * @param components the components to send ++ * @deprecated use {@code sendMessage} methods that accept {@link net.kyori.adventure.text.Component} + */ ++ @Deprecated // Paper + public void sendMessage(@NotNull net.md_5.bungee.api.ChatMessageType position, @NotNull net.md_5.bungee.api.chat.BaseComponent... components) { + throw new UnsupportedOperationException("Not supported yet."); + } +@@ -1377,7 +1523,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM + * @param position the screen position + * @param sender the sender of the message + * @param component the components to send ++ * @deprecated use {@code sendMessage} methods that accept {@link net.kyori.adventure.text.Component} + */ ++ @Deprecated // Paper + public void sendMessage(@NotNull net.md_5.bungee.api.ChatMessageType position, @Nullable UUID sender, @NotNull net.md_5.bungee.api.chat.BaseComponent component) { + throw new UnsupportedOperationException("Not supported yet."); + } +@@ -1388,7 +1536,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM + * @param position the screen position + * @param sender the sender of the message + * @param components the components to send ++ * @deprecated use {@code sendMessage} methods that accept {@link net.kyori.adventure.text.Component} + */ ++ @Deprecated // Paper + public void sendMessage(@NotNull net.md_5.bungee.api.ChatMessageType position, @Nullable UUID sender, @NotNull net.md_5.bungee.api.chat.BaseComponent... components) { + throw new UnsupportedOperationException("Not supported yet."); + +diff --git a/src/main/java/org/bukkit/entity/minecart/CommandMinecart.java b/src/main/java/org/bukkit/entity/minecart/CommandMinecart.java +index 63c80b4ee1f7adc8a9efc3b607993104b1991f90..91cab8b13d5bba34007f124838b32a1df58c5ac7 100644 +--- a/src/main/java/org/bukkit/entity/minecart/CommandMinecart.java ++++ b/src/main/java/org/bukkit/entity/minecart/CommandMinecart.java +@@ -32,7 +32,9 @@ public interface CommandMinecart extends Minecart { + * same as setting it to "@". + * + * @param name New name for this CommandMinecart. ++ * @deprecated in favour of {@link #customName(net.kyori.adventure.text.Component)} + */ ++ @Deprecated // Paper + public void setName(@Nullable String name); + + } +diff --git a/src/main/java/org/bukkit/event/block/SignChangeEvent.java b/src/main/java/org/bukkit/event/block/SignChangeEvent.java +index 7190db11eff7d48df8a99f405a9dbaefdfa76e3d..1268066e30ddb0cd3792ea4b3de894eb04196669 100644 +--- a/src/main/java/org/bukkit/event/block/SignChangeEvent.java ++++ b/src/main/java/org/bukkit/event/block/SignChangeEvent.java +@@ -16,12 +16,25 @@ public class SignChangeEvent extends BlockEvent implements Cancellable { + private static final HandlerList handlers = new HandlerList(); + private boolean cancel = false; + private final Player player; +- private final String[] lines; ++ // Paper start ++ private final java.util.List adventure$lines; + ++ public SignChangeEvent(@NotNull final Block theBlock, @NotNull final Player player, @NotNull final java.util.List adventure$lines) { ++ super(theBlock); ++ this.player = player; ++ this.adventure$lines = adventure$lines; ++ } ++ ++ @Deprecated // Paper end + public SignChangeEvent(@NotNull final Block theBlock, @NotNull final Player thePlayer, @NotNull final String[] theLines) { + super(theBlock); + this.player = thePlayer; +- this.lines = theLines; ++ // Paper start ++ this.adventure$lines = new java.util.ArrayList<>(); ++ for (String theLine : theLines) { ++ this.adventure$lines.add(net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(theLine)); ++ } ++ // Paper end + } + + /** +@@ -34,14 +47,52 @@ public class SignChangeEvent extends BlockEvent implements Cancellable { + return player; + } + ++ // Paper start ++ /** ++ * Gets all of the lines of text from the sign involved in this event. ++ * ++ * @return the String array for the sign's lines new text ++ */ ++ public @NotNull java.util.List lines() { ++ return this.adventure$lines; ++ } ++ ++ /** ++ * Gets a single line of text from the sign involved in this event. ++ * ++ * @param index index of the line to get ++ * @return the String containing the line of text associated with the ++ * provided index ++ * @throws IndexOutOfBoundsException thrown when the provided index is {@literal > 3 ++ * or < 0} ++ */ ++ public @Nullable net.kyori.adventure.text.Component line(int index) throws IndexOutOfBoundsException { ++ return this.adventure$lines.get(index); ++ } ++ ++ /** ++ * Sets a single line for the sign involved in this event ++ * ++ * @param index index of the line to set ++ * @param line text to set ++ * @throws IndexOutOfBoundsException thrown when the provided index is {@literal > 3 ++ * or < 0} ++ */ ++ public void line(int index, @Nullable net.kyori.adventure.text.Component line) throws IndexOutOfBoundsException { ++ this.adventure$lines.set(index, line); ++ } ++ // Paper end ++ + /** + * Gets all of the lines of text from the sign involved in this event. + * + * @return the String array for the sign's lines new text ++ * @deprecated in favour of {@link #lines()} + */ + @NotNull ++ @Deprecated // Paper + public String[] getLines() { +- return lines; ++ return adventure$lines.stream().map(net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection()::serialize).toArray(String[]::new); // Paper + } + + /** +@@ -52,10 +103,12 @@ public class SignChangeEvent extends BlockEvent implements Cancellable { + * provided index + * @throws IndexOutOfBoundsException thrown when the provided index is {@literal > 3 + * or < 0} ++ * @deprecated in favour of {@link #line(int)} + */ + @Nullable ++ @Deprecated // Paper + public String getLine(int index) throws IndexOutOfBoundsException { +- return lines[index]; ++ return net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().serialize(this.adventure$lines.get(index)); // Paper + } + + /** +@@ -65,9 +118,11 @@ public class SignChangeEvent extends BlockEvent implements Cancellable { + * @param line text to set + * @throws IndexOutOfBoundsException thrown when the provided index is {@literal > 3 + * or < 0} ++ * @deprecated in favour of {@link #line(int, net.kyori.adventure.text.Component)} + */ ++ @Deprecated // Paper + public void setLine(int index, @Nullable String line) throws IndexOutOfBoundsException { +- lines[index] = line; ++ adventure$lines.set(index, line != null ? net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(line) : null); // Paper + } + + @Override +diff --git a/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java b/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java +index 07a52441a5cdd7e428a14b286d7cb5210e3efa97..11cc9da9ff23e4c84f203cb0e62a8624bfcf5260 100644 +--- a/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java ++++ b/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java +@@ -11,26 +11,46 @@ import org.jetbrains.annotations.Nullable; + */ + public class PlayerDeathEvent extends EntityDeathEvent { + private int newExp = 0; +- private String deathMessage = ""; ++ private net.kyori.adventure.text.Component deathMessage; // Paper + private int newLevel = 0; + private int newTotalExp = 0; + private boolean keepLevel = false; + private boolean keepInventory = false; ++ // Paper start ++ public PlayerDeathEvent(@NotNull final Player player, @NotNull final List drops, final int droppedExp, @Nullable final net.kyori.adventure.text.Component deathMessage) { ++ this(player, drops, droppedExp, 0, deathMessage); ++ } ++ ++ public PlayerDeathEvent(@NotNull final Player player, @NotNull final List drops, final int droppedExp, final int newExp, @Nullable final net.kyori.adventure.text.Component deathMessage) { ++ this(player, drops, droppedExp, newExp, 0, 0, deathMessage); ++ } + ++ public PlayerDeathEvent(@NotNull final Player player, @NotNull final List drops, final int droppedExp, final int newExp, final int newTotalExp, final int newLevel, @Nullable final net.kyori.adventure.text.Component deathMessage) { ++ super(player, drops, droppedExp); ++ this.newExp = newExp; ++ this.newTotalExp = newTotalExp; ++ this.newLevel = newLevel; ++ this.deathMessage = deathMessage; ++ } ++ // Paper end ++ ++ @Deprecated // Paper + public PlayerDeathEvent(@NotNull final Player player, @NotNull final List drops, final int droppedExp, @Nullable final String deathMessage) { + this(player, drops, droppedExp, 0, deathMessage); + } + ++ @Deprecated // Paper + public PlayerDeathEvent(@NotNull final Player player, @NotNull final List drops, final int droppedExp, final int newExp, @Nullable final String deathMessage) { + this(player, drops, droppedExp, newExp, 0, 0, deathMessage); + } + ++ @Deprecated // Paper + public PlayerDeathEvent(@NotNull final Player player, @NotNull final List drops, final int droppedExp, final int newExp, final int newTotalExp, final int newLevel, @Nullable final String deathMessage) { + super(player, drops, droppedExp); + this.newExp = newExp; + this.newTotalExp = newTotalExp; + this.newLevel = newLevel; +- this.deathMessage = deathMessage; ++ this.deathMessage = deathMessage != null ? net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(deathMessage) : net.kyori.adventure.text.Component.empty(); // Paper + } + + @NotNull +@@ -39,12 +59,13 @@ public class PlayerDeathEvent extends EntityDeathEvent { + return (Player) entity; + } + ++ // Paper start + /** + * Set the death message that will appear to everyone on the server. + * + * @param deathMessage Message to appear to other players on the server. + */ +- public void setDeathMessage(@Nullable String deathMessage) { ++ public void deathMessage(@Nullable net.kyori.adventure.text.Component deathMessage) { + this.deathMessage = deathMessage; + } + +@@ -53,9 +74,32 @@ public class PlayerDeathEvent extends EntityDeathEvent { + * + * @return Message to appear to other players on the server. + */ ++ public @Nullable net.kyori.adventure.text.Component deathMessage() { ++ return this.deathMessage; ++ } ++ // Paper end ++ ++ /** ++ * Set the death message that will appear to everyone on the server. ++ * ++ * @param deathMessage Message to appear to other players on the server. ++ * @deprecated in favour of {@link #deathMessage(net.kyori.adventure.text.Component)} ++ */ ++ @Deprecated // Paper ++ public void setDeathMessage(@Nullable String deathMessage) { ++ this.deathMessage = deathMessage != null ? net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(deathMessage) : net.kyori.adventure.text.Component.empty(); // Paper ++ } ++ ++ /** ++ * Get the death message that will appear to everyone on the server. ++ * ++ * @return Message to appear to other players on the server. ++ * @deprecated in favour of {@link #deathMessage()} ++ */ + @Nullable ++ @Deprecated // Paper + public String getDeathMessage() { +- return deathMessage; ++ return this.deathMessage == null ? null : net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().serialize(this.deathMessage); // Paper + } + + /** +diff --git a/src/main/java/org/bukkit/event/inventory/InventoryType.java b/src/main/java/org/bukkit/event/inventory/InventoryType.java +index f1e9bc9bc797b7216336d3470e3c696a06f2b21a..090d22bd30f7947103771aaaf09a2398970ac337 100644 +--- a/src/main/java/org/bukkit/event/inventory/InventoryType.java ++++ b/src/main/java/org/bukkit/event/inventory/InventoryType.java +@@ -136,6 +136,18 @@ public enum InventoryType { + private final String title; + private final boolean isCreatable; + ++ // Paper start ++ private final net.kyori.adventure.text.Component defaultTitleComponent; ++ ++ /** ++ * Gets the inventory's default title. ++ * ++ * @return the inventory's default title ++ */ ++ public @NotNull net.kyori.adventure.text.Component defaultTitle() { ++ return defaultTitleComponent; ++ } ++ // Paper end + private InventoryType(int defaultSize, /*@NotNull*/ String defaultTitle) { + this(defaultSize, defaultTitle, true); + } +@@ -144,6 +156,7 @@ public enum InventoryType { + size = defaultSize; + title = defaultTitle; + this.isCreatable = isCreatable; ++ this.defaultTitleComponent = net.kyori.adventure.text.Component.text(defaultTitle); // Paper - Adventure + } + + public int getDefaultSize() { +@@ -151,6 +164,7 @@ public enum InventoryType { + } + + @NotNull ++ @Deprecated // Paper + public String getDefaultTitle() { + return title; + } +diff --git a/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java b/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java +index c8384da69af61e1970f254a3a9c206ee81d7a989..992d1025ca02020e87a9ab5db83d249427f41d69 100644 +--- a/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java ++++ b/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java +@@ -14,7 +14,7 @@ import org.jetbrains.annotations.NotNull; + public class AsyncPlayerPreLoginEvent extends Event { + private static final HandlerList handlers = new HandlerList(); + private Result result; +- private String message; ++ private net.kyori.adventure.text.Component message; // Paper + private final String name; + private final InetAddress ipAddress; + private final UUID uniqueId; +@@ -27,7 +27,7 @@ public class AsyncPlayerPreLoginEvent extends Event { + public AsyncPlayerPreLoginEvent(@NotNull final String name, @NotNull final InetAddress ipAddress, @NotNull final UUID uniqueId) { + super(true); + this.result = Result.ALLOWED; +- this.message = ""; ++ this.message = net.kyori.adventure.text.Component.empty(); // Paper + this.name = name; + this.ipAddress = ipAddress; + this.uniqueId = uniqueId; +@@ -79,6 +79,7 @@ public class AsyncPlayerPreLoginEvent extends Event { + this.result = result == null ? null : Result.valueOf(result.name()); + } + ++ // Paper start + /** + * Gets the current kick message that will be used if getResult() != + * Result.ALLOWED +@@ -86,7 +87,7 @@ public class AsyncPlayerPreLoginEvent extends Event { + * @return Current kick message + */ + @NotNull +- public String getKickMessage() { ++ public net.kyori.adventure.text.Component kickMessage() { + return message; + } + +@@ -95,16 +96,66 @@ public class AsyncPlayerPreLoginEvent extends Event { + * + * @param message New kick message + */ +- public void setKickMessage(@NotNull final String message) { ++ public void kickMessage(@NotNull final net.kyori.adventure.text.Component message) { ++ this.message = message; ++ } ++ ++ /** ++ * Disallows the player from logging in, with the given reason ++ * ++ * @param result New result for disallowing the player ++ * @param message Kick message to display to the user ++ */ ++ public void disallow(@NotNull final Result result, @NotNull final net.kyori.adventure.text.Component message) { ++ this.result = result; + this.message = message; + } + ++ /** ++ * Disallows the player from logging in, with the given reason ++ * ++ * @param result New result for disallowing the player ++ * @param message Kick message to display to the user ++ * @deprecated This method uses a deprecated enum from {@link ++ * PlayerPreLoginEvent} ++ * @see #disallow(Result, String) ++ */ ++ @Deprecated ++ public void disallow(@NotNull final PlayerPreLoginEvent.Result result, @NotNull final net.kyori.adventure.text.Component message) { ++ this.result = result == null ? null : Result.valueOf(result.name()); ++ this.message = message; ++ } ++ // Paper end ++ /** ++ * Gets the current kick message that will be used if getResult() != ++ * Result.ALLOWED ++ * ++ * @return Current kick message ++ * @deprecated in favour of {@link #kickMessage()} ++ */ ++ @NotNull ++ @Deprecated // Paper ++ public String getKickMessage() { ++ return net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().serialize(this.message); // Paper ++ } ++ ++ /** ++ * Sets the kick message to display if getResult() != Result.ALLOWED ++ * ++ * @param message New kick message ++ * @deprecated in favour of {@link #kickMessage(net.kyori.adventure.text.Component)} ++ */ ++ @Deprecated // Paper ++ public void setKickMessage(@NotNull final String message) { ++ this.message = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(message); // Paper ++ } ++ + /** + * Allows the player to log in + */ + public void allow() { + result = Result.ALLOWED; +- message = ""; ++ message = net.kyori.adventure.text.Component.empty(); // Paper + } + + /** +@@ -112,10 +163,12 @@ public class AsyncPlayerPreLoginEvent extends Event { + * + * @param result New result for disallowing the player + * @param message Kick message to display to the user ++ * @deprecated in favour of {@link #disallow(org.bukkit.event.player.AsyncPlayerPreLoginEvent.Result, net.kyori.adventure.text.Component)} + */ ++ @Deprecated // Paper + public void disallow(@NotNull final Result result, @NotNull final String message) { + this.result = result; +- this.message = message; ++ this.message = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(message); // Paper + } + + /** +@@ -130,7 +183,7 @@ public class AsyncPlayerPreLoginEvent extends Event { + @Deprecated + public void disallow(@NotNull final PlayerPreLoginEvent.Result result, @NotNull final String message) { + this.result = result == null ? null : Result.valueOf(result.name()); +- this.message = message; ++ this.message = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(message); // Paper + } + + /** +diff --git a/src/main/java/org/bukkit/event/player/PlayerJoinEvent.java b/src/main/java/org/bukkit/event/player/PlayerJoinEvent.java +index d06684aba7688ce06777dbd837a46856a9d7767f..fda3a43f1eac6c660f75a77acb882a9e6753a3f0 100644 +--- a/src/main/java/org/bukkit/event/player/PlayerJoinEvent.java ++++ b/src/main/java/org/bukkit/event/player/PlayerJoinEvent.java +@@ -10,30 +10,60 @@ import org.jetbrains.annotations.Nullable; + */ + public class PlayerJoinEvent extends PlayerEvent { + private static final HandlerList handlers = new HandlerList(); +- private String joinMessage; ++ // Paper start ++ private net.kyori.adventure.text.Component joinMessage; ++ public PlayerJoinEvent(@NotNull final Player playerJoined, @Nullable final net.kyori.adventure.text.Component joinMessage) { ++ super(playerJoined); ++ this.joinMessage = joinMessage; ++ } + ++ @Deprecated // Paper end + public PlayerJoinEvent(@NotNull final Player playerJoined, @Nullable final String joinMessage) { + super(playerJoined); ++ this.joinMessage = joinMessage != null ? net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(joinMessage) : net.kyori.adventure.text.Component.empty(); // Paper end ++ } ++ ++ // Paper start ++ /** ++ * Gets the join message to send to all online players ++ * ++ * @return string join message. Can be null ++ */ ++ public @Nullable net.kyori.adventure.text.Component joinMessage() { ++ return this.joinMessage; ++ } ++ ++ /** ++ * Sets the join message to send to all online players ++ * ++ * @param joinMessage join message. If null, no message will be sent ++ */ ++ public void joinMessage(@Nullable net.kyori.adventure.text.Component joinMessage) { + this.joinMessage = joinMessage; + } ++ // Paper end + + /** + * Gets the join message to send to all online players + * + * @return string join message. Can be null ++ * @deprecated in favour of {@link #joinMessage()} + */ + @Nullable ++ @Deprecated // Paper + public String getJoinMessage() { +- return joinMessage; ++ return this.joinMessage == null ? null : net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().serialize(this.joinMessage); // Paper + } + + /** + * Sets the join message to send to all online players + * + * @param joinMessage join message. If null, no message will be sent ++ * @deprecated in favour of {@link #joinMessage(net.kyori.adventure.text.Component)} + */ ++ @Deprecated // Paper + public void setJoinMessage(@Nullable String joinMessage) { +- this.joinMessage = joinMessage; ++ this.joinMessage = joinMessage != null ? net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(joinMessage) : net.kyori.adventure.text.Component.empty(); // Paper + } + + @NotNull +diff --git a/src/main/java/org/bukkit/event/player/PlayerKickEvent.java b/src/main/java/org/bukkit/event/player/PlayerKickEvent.java +index 14c337f15fc804f52e52cb0a185aad38d89303a8..2b3f57d1a1c79923a2173f52d9cf61da1f75b7fc 100644 +--- a/src/main/java/org/bukkit/event/player/PlayerKickEvent.java ++++ b/src/main/java/org/bukkit/event/player/PlayerKickEvent.java +@@ -10,35 +10,84 @@ import org.jetbrains.annotations.NotNull; + */ + public class PlayerKickEvent extends PlayerEvent implements Cancellable { + private static final HandlerList handlers = new HandlerList(); +- private String leaveMessage; +- private String kickReason; ++ private net.kyori.adventure.text.Component leaveMessage; // Paper ++ private net.kyori.adventure.text.Component kickReason; // Paper + private Boolean cancel; + ++ @Deprecated // Paper + public PlayerKickEvent(@NotNull final Player playerKicked, @NotNull final String kickReason, @NotNull final String leaveMessage) { ++ super(playerKicked); ++ this.kickReason = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(kickReason); // Paper ++ this.leaveMessage = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(leaveMessage); // Paper ++ this.cancel = false; ++ } ++ // Paper start ++ public PlayerKickEvent(@NotNull final Player playerKicked, @NotNull final net.kyori.adventure.text.Component kickReason, @NotNull final net.kyori.adventure.text.Component leaveMessage) { + super(playerKicked); + this.kickReason = kickReason; + this.leaveMessage = leaveMessage; + this.cancel = false; + } + ++ /** ++ * Gets the leave message send to all online players ++ * ++ * @return string kick reason ++ */ ++ public @NotNull net.kyori.adventure.text.Component leaveMessage() { ++ return this.leaveMessage; ++ } ++ ++ /** ++ * Sets the leave message send to all online players ++ * ++ * @param leaveMessage leave message ++ */ ++ public void leaveMessage(@NotNull net.kyori.adventure.text.Component leaveMessage) { ++ this.leaveMessage = leaveMessage; ++ } ++ + /** + * Gets the reason why the player is getting kicked + * + * @return string kick reason + */ ++ public @NotNull net.kyori.adventure.text.Component reason() { ++ return this.kickReason; ++ } ++ ++ /** ++ * Sets the reason why the player is getting kicked ++ * ++ * @param kickReason kick reason ++ */ ++ public void reason(@NotNull net.kyori.adventure.text.Component kickReason) { ++ this.kickReason = kickReason; ++ } ++ // Paper end ++ ++ /** ++ * Gets the reason why the player is getting kicked ++ * ++ * @return string kick reason ++ * @deprecated in favour of {@link #reason()} ++ */ + @NotNull ++ @Deprecated // Paper + public String getReason() { +- return kickReason; ++ return net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().serialize(this.kickReason); // Paper + } + + /** + * Gets the leave message send to all online players + * + * @return string kick reason ++ * @deprecated in favour of {@link #leaveMessage()} + */ + @NotNull ++ @Deprecated // Paper + public String getLeaveMessage() { +- return leaveMessage; ++ return net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().serialize(this.leaveMessage); // Paper + } + + @Override +@@ -55,18 +104,22 @@ public class PlayerKickEvent extends PlayerEvent implements Cancellable { + * Sets the reason why the player is getting kicked + * + * @param kickReason kick reason ++ * @deprecated in favour of {@link #reason(net.kyori.adventure.text.Component)} + */ ++ @Deprecated // Paper + public void setReason(@NotNull String kickReason) { +- this.kickReason = kickReason; ++ this.kickReason = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(kickReason); // Paper + } + + /** + * Sets the leave message send to all online players + * + * @param leaveMessage leave message ++ * @deprecated in favour of {@link #leaveMessage(net.kyori.adventure.text.Component)} + */ ++ @Deprecated // Paper + public void setLeaveMessage(@NotNull String leaveMessage) { +- this.leaveMessage = leaveMessage; ++ this.leaveMessage = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(leaveMessage); // Paper + } + + @NotNull +diff --git a/src/main/java/org/bukkit/event/player/PlayerLocaleChangeEvent.java b/src/main/java/org/bukkit/event/player/PlayerLocaleChangeEvent.java +index 1db386bb701cb6974daedc6bb5b93a3afbc42100..84521186404b8e43c81a2f9513dce2be40d27840 100644 +--- a/src/main/java/org/bukkit/event/player/PlayerLocaleChangeEvent.java ++++ b/src/main/java/org/bukkit/event/player/PlayerLocaleChangeEvent.java +@@ -12,18 +12,32 @@ public class PlayerLocaleChangeEvent extends PlayerEvent { + private static final HandlerList handlers = new HandlerList(); + // + private final String locale; ++ // Paper start ++ private final java.util.Locale adventure$locale; ++ /** ++ * @see Player#getLocale() ++ * ++ * @return the player's new locale ++ */ ++ public @NotNull java.util.Locale locale() { ++ return this.adventure$locale; ++ } ++ // Paper end + + public PlayerLocaleChangeEvent(@NotNull Player who, @NotNull String locale) { + super(who); + this.locale = locale; ++ this.adventure$locale = net.kyori.adventure.translation.Translator.parseLocale(locale); // Paper + } + + /** + * @see Player#getLocale() + * + * @return the player's new locale ++ * @deprecated in favour of {@link #locale()} + */ + @NotNull ++ @Deprecated // Paper + public String getLocale() { + return locale; + } +diff --git a/src/main/java/org/bukkit/event/player/PlayerLoginEvent.java b/src/main/java/org/bukkit/event/player/PlayerLoginEvent.java +index 084ca8cfcb7381bfa4fa6280748cf9b81210a9c1..95c53d934f928d25f7b20cfbf2e5faa3df31ddc4 100644 +--- a/src/main/java/org/bukkit/event/player/PlayerLoginEvent.java ++++ b/src/main/java/org/bukkit/event/player/PlayerLoginEvent.java +@@ -17,7 +17,7 @@ public class PlayerLoginEvent extends PlayerEvent { + private final InetAddress address; + private final String hostname; + private Result result = Result.ALLOWED; +- private String message = ""; ++ private net.kyori.adventure.text.Component message = net.kyori.adventure.text.Component.empty(); + private final InetAddress realAddress; // Spigot + + /** +@@ -53,12 +53,52 @@ public class PlayerLoginEvent extends PlayerEvent { + * @param result The result status for this event + * @param message The message to be displayed if result denies login + * @param realAddress the actual, unspoofed connecting address ++ * @deprecated in favour of {@link #PlayerLoginEvent(Player, String, InetAddress, Result, net.kyori.adventure.text.Component, InetAddress)} + */ ++ @Deprecated // Paper + public PlayerLoginEvent(@NotNull final Player player, @NotNull String hostname, @NotNull final InetAddress address, @NotNull final Result result, @NotNull final String message, @NotNull final InetAddress realAddress) { // Spigot + this(player, hostname, address, realAddress); // Spigot + this.result = result; ++ this.message = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(message); // Paper ++ } ++ ++ // Paper start ++ /** ++ * This constructor pre-configures the event with a result and message ++ * ++ * @param player The {@link Player} for this event ++ * @param hostname The hostname that was used to connect to the server ++ * @param address The address the player used to connect, provided for ++ * timing issues ++ * @param result The result status for this event ++ * @param message The message to be displayed if result denies login ++ * @param realAddress the actual, unspoofed connecting address ++ */ ++ public PlayerLoginEvent(@NotNull final Player player, @NotNull String hostname, @NotNull final InetAddress address, @NotNull final Result result, @NotNull final net.kyori.adventure.text.Component message, @NotNull final InetAddress realAddress) { // Spigot ++ this(player, hostname, address, realAddress); // Spigot ++ this.result = result; ++ this.message = message; ++ } ++ ++ /** ++ * Gets the current kick message that will be used if getResult() != ++ * Result.ALLOWED ++ * ++ * @return Current kick message ++ */ ++ public @NotNull net.kyori.adventure.text.Component kickMessage() { ++ return this.message; ++ } ++ ++ /** ++ * Sets the kick message to display if getResult() != Result.ALLOWED ++ * ++ * @param message New kick message ++ */ ++ public void kickMessage(@NotNull net.kyori.adventure.text.Component message) { + this.message = message; + } ++ // Paper end + + // Spigot start + /** +@@ -96,19 +136,23 @@ public class PlayerLoginEvent extends PlayerEvent { + * Result.ALLOWED + * + * @return Current kick message ++ * @deprecated in favour of {@link #kickMessage()} + */ + @NotNull ++ @Deprecated // Paper + public String getKickMessage() { +- return message; ++ return net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().serialize(this.message); // Paper + } + + /** + * Sets the kick message to display if getResult() != Result.ALLOWED + * + * @param message New kick message ++ * @deprecated in favour of {@link #kickMessage(net.kyori.adventure.text.Component)} + */ ++ @Deprecated // Paper + public void setKickMessage(@NotNull final String message) { +- this.message = message; ++ this.message = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(message); // Paper + } + + /** +@@ -127,7 +171,7 @@ public class PlayerLoginEvent extends PlayerEvent { + */ + public void allow() { + result = Result.ALLOWED; +- message = ""; ++ message = net.kyori.adventure.text.Component.empty(); // Paper + } + + /** +@@ -135,8 +179,21 @@ public class PlayerLoginEvent extends PlayerEvent { + * + * @param result New result for disallowing the player + * @param message Kick message to display to the user ++ * @deprecated in favour of {@link #disallow(Result, net.kyori.adventure.text.Component)} + */ ++ @Deprecated // Paper start + public void disallow(@NotNull final Result result, @NotNull final String message) { ++ this.result = result; ++ this.message = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(message); ++ } ++ /** ++ * Disallows the player from logging in, with the given reason ++ * ++ * @param result New result for disallowing the player ++ * @param message Kick message to display to the user ++ */ ++ public void disallow(@NotNull final Result result, @NotNull final net.kyori.adventure.text.Component message) { ++ // Paper end + this.result = result; + this.message = message; + } +diff --git a/src/main/java/org/bukkit/event/player/PlayerPreLoginEvent.java b/src/main/java/org/bukkit/event/player/PlayerPreLoginEvent.java +index fb066251f793ec3b41bfc075b9478901b15ee549..6800132c6288b4588fd02b08d26f016c38f27129 100644 +--- a/src/main/java/org/bukkit/event/player/PlayerPreLoginEvent.java ++++ b/src/main/java/org/bukkit/event/player/PlayerPreLoginEvent.java +@@ -19,7 +19,7 @@ import org.jetbrains.annotations.NotNull; + public class PlayerPreLoginEvent extends Event { + private static final HandlerList handlers = new HandlerList(); + private Result result; +- private String message; ++ private net.kyori.adventure.text.Component message; // Paper + private final String name; + private final InetAddress ipAddress; + private final UUID uniqueId; +@@ -31,7 +31,7 @@ public class PlayerPreLoginEvent extends Event { + + public PlayerPreLoginEvent(@NotNull final String name, @NotNull final InetAddress ipAddress, @NotNull final UUID uniqueId) { + this.result = Result.ALLOWED; +- this.message = ""; ++ this.message = net.kyori.adventure.text.Component.empty(); // Paper + this.name = name; + this.ipAddress = ipAddress; + this.uniqueId = uniqueId; +@@ -56,6 +56,7 @@ public class PlayerPreLoginEvent extends Event { + this.result = result; + } + ++ // Paper start + /** + * Gets the current kick message that will be used if getResult() != + * Result.ALLOWED +@@ -63,7 +64,7 @@ public class PlayerPreLoginEvent extends Event { + * @return Current kick message + */ + @NotNull +- public String getKickMessage() { ++ public net.kyori.adventure.text.Component kickMessage() { + return message; + } + +@@ -72,16 +73,51 @@ public class PlayerPreLoginEvent extends Event { + * + * @param message New kick message + */ +- public void setKickMessage(@NotNull final String message) { ++ public void kickMessage(@NotNull final net.kyori.adventure.text.Component message) { + this.message = message; + } + ++ /** ++ * Disallows the player from logging in, with the given reason ++ * ++ * @param result New result for disallowing the player ++ * @param message Kick message to display to the user ++ */ ++ public void disallow(@NotNull final Result result, @NotNull final net.kyori.adventure.text.Component message) { ++ this.result = result; ++ this.message = message; ++ } ++ // Paper end ++ /** ++ * Gets the current kick message that will be used if getResult() != ++ * Result.ALLOWED ++ * ++ * @return Current kick message ++ * @deprecated in favour of {@link #kickMessage()} ++ */ ++ @Deprecated // Paper ++ @NotNull ++ public String getKickMessage() { ++ return net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().serialize(this.message); // Paper ++ } ++ ++ /** ++ * Sets the kick message to display if getResult() != Result.ALLOWED ++ * ++ * @param message New kick message ++ * @deprecated in favour of {@link #kickMessage(net.kyori.adventure.text.Component)} ++ */ ++ @Deprecated // Paper ++ public void setKickMessage(@NotNull final String message) { ++ this.message = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(message); // Paper ++ } ++ + /** + * Allows the player to log in + */ + public void allow() { + result = Result.ALLOWED; +- message = ""; ++ message = net.kyori.adventure.text.Component.empty(); // Paper + } + + /** +@@ -89,10 +125,12 @@ public class PlayerPreLoginEvent extends Event { + * + * @param result New result for disallowing the player + * @param message Kick message to display to the user ++ * @deprecated in favour of {@link #disallow(org.bukkit.event.player.PlayerPreLoginEvent.Result, net.kyori.adventure.text.Component)} + */ ++ @Deprecated // Paper + public void disallow(@NotNull final Result result, @NotNull final String message) { + this.result = result; +- this.message = message; ++ this.message = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(message); // Paper + } + + /** +diff --git a/src/main/java/org/bukkit/event/player/PlayerQuitEvent.java b/src/main/java/org/bukkit/event/player/PlayerQuitEvent.java +index d70c25f404e994766a9ebce89a917c8d0719777c..9b43bb24055b94328c569f7e0df6bd24c8ebfd2b 100644 +--- a/src/main/java/org/bukkit/event/player/PlayerQuitEvent.java ++++ b/src/main/java/org/bukkit/event/player/PlayerQuitEvent.java +@@ -10,30 +10,59 @@ import org.jetbrains.annotations.Nullable; + */ + public class PlayerQuitEvent extends PlayerEvent { + private static final HandlerList handlers = new HandlerList(); +- private String quitMessage; ++ private net.kyori.adventure.text.Component quitMessage; // Paper + ++ @Deprecated // Paper + public PlayerQuitEvent(@NotNull final Player who, @Nullable final String quitMessage) { + super(who); ++ this.quitMessage = quitMessage != null ? net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(quitMessage) : net.kyori.adventure.text.Component.empty(); // Paper ++ } ++ // Paper start ++ public PlayerQuitEvent(@NotNull final Player who, @Nullable final net.kyori.adventure.text.Component quitMessage) { ++ super(who); ++ this.quitMessage = quitMessage; ++ } ++ ++ /** ++ * Gets the quit message to send to all online players ++ * ++ * @return string quit message ++ */ ++ public @Nullable net.kyori.adventure.text.Component quitMessage() { ++ return quitMessage; ++ } ++ ++ /** ++ * Sets the quit message to send to all online players ++ * ++ * @param quitMessage quit message ++ */ ++ public void quitMessage(@Nullable net.kyori.adventure.text.Component quitMessage) { + this.quitMessage = quitMessage; + } ++ // Paper end + + /** + * Gets the quit message to send to all online players + * + * @return string quit message ++ * @deprecated in favour of {@link #quitMessage()} + */ + @Nullable ++ @Deprecated // Paper + public String getQuitMessage() { +- return quitMessage; ++ return this.quitMessage == null ? null : net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().serialize(this.quitMessage); // Paper + } + + /** + * Sets the quit message to send to all online players + * + * @param quitMessage quit message ++ * @deprecated in favour of {@link #quitMessage(net.kyori.adventure.text.Component)} + */ ++ @Deprecated // Paper + public void setQuitMessage(@Nullable String quitMessage) { +- this.quitMessage = quitMessage; ++ this.quitMessage = quitMessage != null ? net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(quitMessage) : net.kyori.adventure.text.Component.empty(); // Paper + } + + @NotNull +diff --git a/src/main/java/org/bukkit/event/server/BroadcastMessageEvent.java b/src/main/java/org/bukkit/event/server/BroadcastMessageEvent.java +index 03bfca9d368bbe4b7c1353d52c883e756bf69bda..943d324435350d3f16fad3e21cb472a01a3ff60b 100644 +--- a/src/main/java/org/bukkit/event/server/BroadcastMessageEvent.java ++++ b/src/main/java/org/bukkit/event/server/BroadcastMessageEvent.java +@@ -18,7 +18,7 @@ import org.jetbrains.annotations.NotNull; + public class BroadcastMessageEvent extends ServerEvent implements Cancellable { + + private static final HandlerList handlers = new HandlerList(); +- private String message; ++ private net.kyori.adventure.text.Component message; // Paper + private final Set recipients; + private boolean cancelled = false; + +@@ -27,29 +27,66 @@ public class BroadcastMessageEvent extends ServerEvent implements Cancellable { + this(false, message, recipients); + } + ++ @Deprecated // Paper + public BroadcastMessageEvent(boolean isAsync, @NotNull String message, @NotNull Set recipients) { ++ // Paper start ++ super(isAsync); ++ this.message = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(message); ++ this.recipients = recipients; ++ } ++ ++ @Deprecated ++ public BroadcastMessageEvent(@NotNull net.kyori.adventure.text.Component message, @NotNull Set recipients) { ++ this(false, message, recipients); ++ } ++ ++ public BroadcastMessageEvent(boolean isAsync, @NotNull net.kyori.adventure.text.Component message, @NotNull Set recipients) { ++ // Paper end + super(isAsync); + this.message = message; + this.recipients = recipients; + } ++ // Paper start ++ /** ++ * Get the broadcast message. ++ * ++ * @return Message to broadcast ++ */ ++ public @NotNull net.kyori.adventure.text.Component message() { ++ return this.message; ++ } ++ ++ /** ++ * Set the broadcast message. ++ * ++ * @param message New message to broadcast ++ */ ++ public void message(@NotNull net.kyori.adventure.text.Component message) { ++ this.message = message; ++ } ++ // Paper end + + /** + * Get the message to broadcast. + * + * @return Message to broadcast ++ * @deprecated in favour of {@link #message()} + */ + @NotNull ++ @Deprecated // Paper + public String getMessage() { +- return message; ++ return net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().serialize(this.message); // Paper + } + + /** + * Set the message to broadcast. + * + * @param message New message to broadcast ++ * @deprecated in favour of {@link #message(net.kyori.adventure.text.Component)} + */ ++ @Deprecated // Paper + public void setMessage(@NotNull String message) { +- this.message = message; ++ this.message = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(message); // Paper + } + + /** +diff --git a/src/main/java/org/bukkit/event/server/ServerListPingEvent.java b/src/main/java/org/bukkit/event/server/ServerListPingEvent.java +index 7a2a58bac8e721c3f0c64f69f77be07a51f76d58..f46ea9f2bd4a4d9582428325e725d9220817b254 100644 +--- a/src/main/java/org/bukkit/event/server/ServerListPingEvent.java ++++ b/src/main/java/org/bukkit/event/server/ServerListPingEvent.java +@@ -17,15 +17,16 @@ public class ServerListPingEvent extends ServerEvent implements Iterable + private static final int MAGIC_PLAYER_COUNT = Integer.MIN_VALUE; + private static final HandlerList handlers = new HandlerList(); + private final InetAddress address; +- private String motd; ++ private net.kyori.adventure.text.Component motd; // Paper + private final int numPlayers; + private int maxPlayers; + ++ @Deprecated // Paper + public ServerListPingEvent(@NotNull final InetAddress address, @NotNull final String motd, final int numPlayers, final int maxPlayers) { + super(true); + Validate.isTrue(numPlayers >= 0, "Cannot have negative number of players online", numPlayers); + this.address = address; +- this.motd = motd; ++ this.motd = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(motd); // Paper + this.numPlayers = numPlayers; + this.maxPlayers = maxPlayers; + } +@@ -38,14 +39,58 @@ public class ServerListPingEvent extends ServerEvent implements Iterable + * @param address the address of the pinger + * @param motd the message of the day + * @param maxPlayers the max number of players ++ * @deprecated in favour of {@link #ServerListPingEvent(java.net.InetAddress, net.kyori.adventure.text.Component, int)} + */ ++ @Deprecated // Paper + protected ServerListPingEvent(@NotNull final InetAddress address, @NotNull final String motd, final int maxPlayers) { ++ super(true); ++ this.numPlayers = MAGIC_PLAYER_COUNT; ++ this.address = address; ++ this.motd = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(motd); // Paper ++ this.maxPlayers = maxPlayers; ++ } ++ // Paper start ++ public ServerListPingEvent(@NotNull final InetAddress address, @NotNull final net.kyori.adventure.text.Component motd, final int numPlayers, final int maxPlayers) { ++ super(true); ++ Validate.isTrue(numPlayers >= 0, "Cannot have negative number of players online", numPlayers); ++ this.address = address; ++ this.motd = motd; ++ this.numPlayers = numPlayers; ++ this.maxPlayers = maxPlayers; ++ } ++ /** ++ * This constructor is intended for implementations that provide the ++ * {@link #iterator()} method, thus provided the {@link #getNumPlayers()} ++ * count. ++ * ++ * @param address the address of the pinger ++ * @param motd the message of the day ++ * @param maxPlayers the max number of players ++ */ ++ protected ServerListPingEvent(@NotNull final InetAddress address, @NotNull final net.kyori.adventure.text.Component motd, final int maxPlayers) { + super(true); + this.numPlayers = MAGIC_PLAYER_COUNT; + this.address = address; + this.motd = motd; + this.maxPlayers = maxPlayers; + } ++ /** ++ * Get the message of the day message. ++ * ++ * @return the message of the day ++ */ ++ public @NotNull net.kyori.adventure.text.Component motd() { ++ return motd; ++ } ++ /** ++ * Change the message of the day message. ++ * ++ * @param motd the message of the day ++ */ ++ public void motd(@NotNull net.kyori.adventure.text.Component motd) { ++ this.motd = motd; ++ } ++ // Paper end + + /** + * Get the address the ping is coming from. +@@ -61,19 +106,23 @@ public class ServerListPingEvent extends ServerEvent implements Iterable + * Get the message of the day message. + * + * @return the message of the day ++ * @deprecated in favour of {@link #motd()} + */ + @NotNull ++ @Deprecated // Paper + public String getMotd() { +- return motd; ++ return net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().serialize(this.motd); // Paper + } + + /** + * Change the message of the day message. + * + * @param motd the message of the day ++ * @deprecated in favour of {@link #motd(net.kyori.adventure.text.Component)} + */ ++ @Deprecated // Paper + public void setMotd(@NotNull String motd) { +- this.motd = motd; ++ this.motd = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(motd); // Paper + } + + /** +diff --git a/src/main/java/org/bukkit/inventory/InventoryView.java b/src/main/java/org/bukkit/inventory/InventoryView.java +index 14346d83bc99581b18e53d19af03708c0bf22cf7..b6cbf23dd40fb1cb1fec3c7d6918438ebf5bcc2e 100644 +--- a/src/main/java/org/bukkit/inventory/InventoryView.java ++++ b/src/main/java/org/bukkit/inventory/InventoryView.java +@@ -446,11 +446,23 @@ public abstract class InventoryView { + return getPlayer().setWindowProperty(prop, value); + } + ++ // Paper start + /** + * Get the title of this inventory window. + * + * @return The title. + */ + @NotNull ++ public abstract net.kyori.adventure.text.Component title(); ++ // Paper end ++ ++ /** ++ * Get the title of this inventory window. ++ * ++ * @return The title. ++ * @deprecated in favour of {@link #title()} ++ */ ++ @Deprecated // Paper ++ @NotNull + public abstract String getTitle(); + } +diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java +index 4ff149fd98895dd8ba45939a37c223b1f8d7281f..3dba4c361993e143e511b4f108ac0b444a84d964 100644 +--- a/src/main/java/org/bukkit/inventory/ItemFactory.java ++++ b/src/main/java/org/bukkit/inventory/ItemFactory.java +@@ -141,4 +141,15 @@ public interface ItemFactory { + @Deprecated + @NotNull + Material updateMaterial(@NotNull final ItemMeta meta, @NotNull final Material material) throws IllegalArgumentException; ++ ++ // Paper start ++ /** ++ * Creates a hover event for the given item. ++ * ++ * @param item The item ++ * @return A hover event ++ */ ++ @NotNull ++ net.kyori.adventure.text.event.HoverEvent asHoverEvent(final @NotNull ItemStack item, final @NotNull java.util.function.UnaryOperator op); ++ // Paper end + } +diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java +index f70a6a22b85ff0da76e67e9b223ad4e0b020b5c4..4b20b557eaa958cf1ad1baf8d6cc17f38b180ff1 100644 +--- a/src/main/java/org/bukkit/inventory/ItemStack.java ++++ b/src/main/java/org/bukkit/inventory/ItemStack.java +@@ -22,7 +22,7 @@ import org.jetbrains.annotations.Nullable; + * use this class to encapsulate Materials for which {@link Material#isItem()} + * returns false. + */ +-public class ItemStack implements Cloneable, ConfigurationSerializable { ++public class ItemStack implements Cloneable, ConfigurationSerializable, net.kyori.adventure.text.event.HoverEventSource { // Paper + private Material type = Material.AIR; + private int amount = 0; + private MaterialData data = null; +@@ -595,4 +595,12 @@ public class ItemStack implements Cloneable, ConfigurationSerializable { + + return true; + } ++ ++ // Paper start ++ @NotNull ++ @Override ++ public net.kyori.adventure.text.event.HoverEvent asHoverEvent(final @NotNull java.util.function.UnaryOperator op) { ++ return org.bukkit.Bukkit.getServer().getItemFactory().asHoverEvent(this, op); ++ } ++ // Paper end + } +diff --git a/src/main/java/org/bukkit/inventory/meta/BookMeta.java b/src/main/java/org/bukkit/inventory/meta/BookMeta.java +index 94852d50e88d0594b84b581cd627174043629995..0cfd4b02cc2095da56b4dc8d4ea4e9b4a95f513c 100644 +--- a/src/main/java/org/bukkit/inventory/meta/BookMeta.java ++++ b/src/main/java/org/bukkit/inventory/meta/BookMeta.java +@@ -10,7 +10,7 @@ import org.jetbrains.annotations.Nullable; + * Represents a book ({@link Material#WRITABLE_BOOK} or {@link + * Material#WRITTEN_BOOK}) that can have a title, an author, and pages. + */ +-public interface BookMeta extends ItemMeta { ++public interface BookMeta extends ItemMeta, net.kyori.adventure.inventory.Book { // Paper + + /** + * Represents the generation (or level of copying) of a written book +@@ -119,6 +119,111 @@ public interface BookMeta extends ItemMeta { + */ + boolean hasPages(); + ++ // Paper start ++ /** ++ * Gets the title of the book. ++ *

++ * Plugins should check that hasTitle() returns true before calling this ++ * method. ++ * ++ * @return the title of the book ++ */ ++ @Nullable ++ @Override ++ net.kyori.adventure.text.Component title(); ++ ++ /** ++ * Sets the title of the book. ++ *

++ * Limited to 32 characters. Removes title when given null. ++ * ++ * @param title the title to set ++ * @return true if the title was successfully set ++ */ ++ @NotNull ++ @Override ++ BookMeta title(@Nullable net.kyori.adventure.text.Component title); ++ ++ /** ++ * Gets the author of the book. ++ *

++ * Plugins should check that hasAuthor() returns true before calling this ++ * method. ++ * ++ * @return the author of the book ++ */ ++ @Nullable ++ @Override ++ net.kyori.adventure.text.Component author(); ++ ++ /** ++ * Sets the author of the book. Removes author when given null. ++ * ++ * @param author the author to set ++ */ ++ @NotNull ++ @Override ++ BookMeta author(@Nullable net.kyori.adventure.text.Component author); ++ /** ++ * Gets the specified page in the book. The page must exist. ++ *

++ * Pages are 1-indexed. ++ * ++ * @param page the page number to get, in range [1, getPageCount()] ++ * @return the page from the book ++ */ ++ @NotNull net.kyori.adventure.text.Component page(int page); ++ ++ /** ++ * Sets the specified page in the book. Pages of the book must be ++ * contiguous. ++ *

++ * The data can be up to 256 characters in length, additional characters ++ * are truncated. ++ *

++ * Pages are 1-indexed. ++ * ++ * @param page the page number to set, in range [1, getPageCount()] ++ * @param data the data to set for that page ++ */ ++ void page(int page, @NotNull net.kyori.adventure.text.Component data); ++ ++ /** ++ * Adds new pages to the end of the book. Up to a maximum of 50 pages with ++ * 256 characters per page. ++ * ++ * @param pages A list of strings, each being a page ++ */ ++ void addPages(@NotNull net.kyori.adventure.text.Component... pages); ++ ++ interface BookMetaBuilder extends Builder { ++ ++ @NotNull ++ @Override ++ BookMetaBuilder title(@Nullable net.kyori.adventure.text.Component title); ++ ++ @NotNull ++ @Override ++ BookMetaBuilder author(@Nullable net.kyori.adventure.text.Component author); ++ ++ @NotNull ++ @Override ++ BookMetaBuilder addPage(@NotNull net.kyori.adventure.text.Component page); ++ ++ @NotNull ++ @Override ++ BookMetaBuilder pages(@NotNull net.kyori.adventure.text.Component... pages); ++ ++ @NotNull ++ @Override ++ BookMetaBuilder pages(@NotNull java.util.Collection pages); ++ ++ @NotNull ++ @Override ++ BookMeta build(); ++ } ++ // Paper end ++ + /** + * Gets the specified page in the book. The given page must exist. + *

+@@ -126,8 +231,10 @@ public interface BookMeta extends ItemMeta { + * + * @param page the page number to get, in range [1, getPageCount()] + * @return the page from the book ++ * @deprecated in favour of {@link #page(int)} + */ + @NotNull ++ @Deprecated // Paper + String getPage(int page); + + /** +@@ -141,15 +248,19 @@ public interface BookMeta extends ItemMeta { + * + * @param page the page number to set, in range [1, getPageCount()] + * @param data the data to set for that page ++ * @deprecated in favour of {@link #page(int, net.kyori.adventure.text.Component)} + */ ++ @Deprecated // Paper + void setPage(int page, @NotNull String data); + + /** + * Gets all the pages in the book. + * + * @return list of all the pages in the book ++ * @deprecated in favour of {@link #pages()} + */ + @NotNull ++ @Deprecated // Paper + List getPages(); + + /** +@@ -157,7 +268,9 @@ public interface BookMeta extends ItemMeta { + * pages. Maximum 100 pages with 256 characters per page. + * + * @param pages A list of pages to set the book to use ++ * @deprecated in favour of {@link #pages(List)} + */ ++ @Deprecated // Paper + void setPages(@NotNull List pages); + + /** +@@ -165,7 +278,9 @@ public interface BookMeta extends ItemMeta { + * pages. Maximum 50 pages with 256 characters per page. + * + * @param pages A list of strings, each being a page ++ * @deprecated in favour of {@link #pages(net.kyori.adventure.text.Component...)} + */ ++ @Deprecated // Paper + void setPages(@NotNull String... pages); + + /** +@@ -173,7 +288,9 @@ public interface BookMeta extends ItemMeta { + * 256 characters per page. + * + * @param pages A list of strings, each being a page ++ * @deprecated in favour of {@link #addPages(net.kyori.adventure.text.Component...)} + */ ++ @Deprecated // Paper + void addPage(@NotNull String... pages); + + /** +@@ -195,8 +312,10 @@ public interface BookMeta extends ItemMeta { + * + * @param page the page number to get + * @return the page from the book ++ * @deprecated in favour of {@link #page(int)} + */ + @NotNull ++ @Deprecated // Paper + public BaseComponent[] getPage(int page) { + throw new UnsupportedOperationException("Not supported yet."); + } +@@ -210,7 +329,9 @@ public interface BookMeta extends ItemMeta { + * + * @param page the page number to set + * @param data the data to set for that page ++ * @deprecated in favour of {@link #page(int, net.kyori.adventure.text.Component)} + */ ++ @Deprecated // Paper + public void setPage(int page, @Nullable BaseComponent... data) { + throw new UnsupportedOperationException("Not supported yet."); + } +@@ -219,8 +340,10 @@ public interface BookMeta extends ItemMeta { + * Gets all the pages in the book. + * + * @return list of all the pages in the book ++ * @deprecated in favour of {@link #pages()} + */ + @NotNull ++ @Deprecated // Paper + public List getPages() { + throw new UnsupportedOperationException("Not supported yet."); + } +@@ -230,7 +353,9 @@ public interface BookMeta extends ItemMeta { + * pages. Maximum 50 pages with 256 characters per page. + * + * @param pages A list of pages to set the book to use ++ * @deprecated in favour of {@link #pages(java.util.List)} + */ ++ @Deprecated // Paper + public void setPages(@NotNull List pages) { + throw new UnsupportedOperationException("Not supported yet."); + } +@@ -240,7 +365,9 @@ public interface BookMeta extends ItemMeta { + * pages. Maximum 50 pages with 256 characters per page. + * + * @param pages A list of component arrays, each being a page ++ * @deprecated in favour of {@link #pages(net.kyori.adventure.text.Component...)} + */ ++ @Deprecated // Paper + public void setPages(@NotNull BaseComponent[]... pages) { + throw new UnsupportedOperationException("Not supported yet."); + } +@@ -250,7 +377,9 @@ public interface BookMeta extends ItemMeta { + * with 256 characters per page. + * + * @param pages A list of component arrays, each being a page ++ * @deprecated in favour of {@link #addPages(net.kyori.adventure.text.Component...)} + */ ++ @Deprecated // Paper + public void addPage(@NotNull BaseComponent[]... pages) { + throw new UnsupportedOperationException("Not supported yet."); + } +diff --git a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java +index f2e9f2753ec92aa4a3e3f06ca6053bd70b9091d7..1c362636c56db0e6c118171ba367c43c4f7cff33 100644 +--- a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java ++++ b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java +@@ -31,6 +31,24 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste + */ + boolean hasDisplayName(); + ++ // Paper start ++ /** ++ * Gets the display name. ++ * ++ *

Plugins should check that {@link #hasDisplayName()} returns true before calling this method.

++ * ++ * @return the display name ++ */ ++ @Nullable net.kyori.adventure.text.Component displayName(); ++ ++ /** ++ * Sets the display name. ++ * ++ * @param displayName the display name to set ++ */ ++ void displayName(final @Nullable net.kyori.adventure.text.Component displayName); ++ // Paper end ++ + /** + * Gets the display name that is set. + *

+@@ -38,7 +56,9 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste + * before calling this method. + * + * @return the display name that is set ++ * @deprecated in favour of {@link #displayName()} + */ ++ @Deprecated // Paper + @NotNull + String getDisplayName(); + +@@ -46,7 +66,9 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste + * Sets the display name. + * + * @param name the name to set ++ * @deprecated in favour of {@link #displayName(net.kyori.adventure.text.Component)} + */ ++ @Deprecated // Paper + void setDisplayName(@Nullable String name); + + /** +@@ -81,6 +103,24 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste + */ + boolean hasLore(); + ++ // Paper start ++ /** ++ * Gets the lore. ++ * ++ *

Plugins should check that {@link #hasLore()} returns true before calling this method.

++ * ++ * @return the display name ++ */ ++ @Nullable List lore(); ++ ++ /** ++ * Sets the lore. ++ * ++ * @param lore the lore to set ++ */ ++ void lore(final @Nullable List lore); ++ // Paper end ++ + /** + * Gets the lore that is set. + *

+@@ -88,7 +128,9 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste + * calling this method. + * + * @return a list of lore that is set ++ * @deprecated in favour of {@link #lore()} + */ ++ @Deprecated // Paper + @Nullable + List getLore(); + +@@ -97,7 +139,9 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste + * Removes lore when given null. + * + * @param lore the lore that will be set ++ * @deprecated in favour of {@link #lore(List)} + */ ++ @Deprecated // Paper + void setLore(@Nullable List lore); + + /** +diff --git a/src/main/java/org/bukkit/map/MapCursor.java b/src/main/java/org/bukkit/map/MapCursor.java +index 83354b2a38b6261b172b91c1008dcf3313cc4a8f..ca763b231749f108b6773040a5c6109378b21b31 100644 +--- a/src/main/java/org/bukkit/map/MapCursor.java ++++ b/src/main/java/org/bukkit/map/MapCursor.java +@@ -10,7 +10,7 @@ public final class MapCursor { + private byte x, y; + private byte direction, type; + private boolean visible; +- private String caption; ++ private net.kyori.adventure.text.Component caption; // Paper + + /** + * Initialize the map cursor. +@@ -24,7 +24,7 @@ public final class MapCursor { + */ + @Deprecated + public MapCursor(byte x, byte y, byte direction, byte type, boolean visible) { +- this(x, y, direction, type, visible, null); ++ this(x, y, direction, type, visible, (String) null); // Paper + } + + /** +@@ -37,7 +37,7 @@ public final class MapCursor { + * @param visible Whether the cursor is visible by default. + */ + public MapCursor(byte x, byte y, byte direction, @NotNull Type type, boolean visible) { +- this(x, y, direction, type, visible, null); ++ this(x, y, direction, type, visible, (String) null); // Paper + } + + /** +@@ -49,7 +49,7 @@ public final class MapCursor { + * @param type The type (color/style) of the map cursor. + * @param visible Whether the cursor is visible by default. + * @param caption cursor caption +- * @deprecated Magic value ++ * @deprecated Magic value. Use {@link #MapCursor(byte, byte, byte, byte, boolean, net.kyori.adventure.text.Component)} + */ + @Deprecated + public MapCursor(byte x, byte y, byte direction, byte type, boolean visible, @Nullable String caption) { +@@ -58,8 +58,42 @@ public final class MapCursor { + setDirection(direction); + setRawType(type); + this.visible = visible; +- this.caption = caption; ++ this.caption = caption == null ? null : net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(caption); // Paper + } ++ // Paper start ++ /** ++ * Initialize the map cursor. ++ * ++ * @param x The x coordinate, from -128 to 127. ++ * @param y The y coordinate, from -128 to 127. ++ * @param direction The facing of the cursor, from 0 to 15. ++ * @param type The type (color/style) of the map cursor. ++ * @param visible Whether the cursor is visible by default. ++ * @param caption cursor caption ++ * @deprecated Magic value ++ */ ++ @Deprecated ++ public MapCursor(byte x, byte y, byte direction, byte type, boolean visible, @Nullable net.kyori.adventure.text.Component caption) { ++ this.x = x; this.y = y; this.visible = visible; this.caption = caption; ++ setDirection(direction); ++ setRawType(type); ++ } ++ /** ++ * Initialize the map cursor. ++ * ++ * @param x The x coordinate, from -128 to 127. ++ * @param y The y coordinate, from -128 to 127. ++ * @param direction The facing of the cursor, from 0 to 15. ++ * @param type The type (color/style) of the map cursor. ++ * @param visible Whether the cursor is visible by default. ++ * @param caption cursor caption ++ */ ++ public MapCursor(byte x, byte y, byte direction, @NotNull Type type, boolean visible, @Nullable net.kyori.adventure.text.Component caption) { ++ this.x = x; this.y = y; this.visible = visible; this.caption = caption; ++ setDirection(direction); ++ setType(type); ++ } ++ // Paper end + + /** + * Initialize the map cursor. +@@ -77,7 +111,7 @@ public final class MapCursor { + setDirection(direction); + setType(type); + this.visible = visible; +- this.caption = caption; ++ this.caption = caption == null ? null : net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(caption); // Paper + } + + /** +@@ -200,23 +234,45 @@ public final class MapCursor { + this.visible = visible; + } + ++ // Paper start ++ /** ++ * Gets the caption on this cursor. ++ * ++ * @return caption ++ */ ++ public @Nullable net.kyori.adventure.text.Component caption() { ++ return this.caption; ++ } ++ /** ++ * Sets the caption on this cursor. ++ * ++ * @param caption new caption ++ */ ++ public void caption(@Nullable net.kyori.adventure.text.Component caption) { ++ this.caption = caption; ++ } ++ // Paper end + /** + * Gets the caption on this cursor. + * + * @return caption ++ * @deprecated in favour of {@link #caption()} + */ + @Nullable ++ @Deprecated // Paper + public String getCaption() { +- return caption; ++ return this.caption == null ? null : net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().serialize(this.caption); // Paper + } + + /** + * Sets the caption on this cursor. + * + * @param caption new caption ++ * @deprecated in favour of {@link #caption(net.kyori.adventure.text.Component)} + */ ++ @Deprecated // Paper + public void setCaption(@Nullable String caption) { +- this.caption = caption; ++ this.caption = caption == null ? null : net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(caption); // Paper + } + + /** +diff --git a/src/main/java/org/bukkit/map/MapCursorCollection.java b/src/main/java/org/bukkit/map/MapCursorCollection.java +index 4dba721aefe4fc6699b3b4bfa7ecb0b19c2a2a1a..01dec2c877df58c9dc22445e8b1f9ce2e53066da 100644 +--- a/src/main/java/org/bukkit/map/MapCursorCollection.java ++++ b/src/main/java/org/bukkit/map/MapCursorCollection.java +@@ -117,4 +117,22 @@ public final class MapCursorCollection { + public MapCursor addCursor(int x, int y, byte direction, byte type, boolean visible, @Nullable String caption) { + return addCursor(new MapCursor((byte) x, (byte) y, direction, type, visible, caption)); + } ++ // Paper start ++ /** ++ * Add a cursor to the collection. ++ * ++ * @param x The x coordinate, from -128 to 127. ++ * @param y The y coordinate, from -128 to 127. ++ * @param direction The facing of the cursor, from 0 to 15. ++ * @param type The type (color/style) of the map cursor. ++ * @param visible Whether the cursor is visible. ++ * @param caption banner caption ++ * @return The newly added MapCursor. ++ * @deprecated Magic value ++ */ ++ @Deprecated ++ public @NotNull MapCursor addCursor(int x, int y, byte direction, byte type, boolean visible, @Nullable net.kyori.adventure.text.Component caption) { ++ return addCursor(new MapCursor((byte) x, (byte) y, direction, type, visible, caption)); ++ } ++ // Paper end + } +diff --git a/src/main/java/org/bukkit/scoreboard/Objective.java b/src/main/java/org/bukkit/scoreboard/Objective.java +index f5cbf6df32ef169cf0f2266f7c6e9c4f771ccb7d..58bddb11fd534e7c33a4ffd7b72b055ba92c767a 100644 +--- a/src/main/java/org/bukkit/scoreboard/Objective.java ++++ b/src/main/java/org/bukkit/scoreboard/Objective.java +@@ -19,14 +19,35 @@ public interface Objective { + */ + @NotNull + String getName() throws IllegalStateException; ++ // Paper start ++ /** ++ * Gets the name displayed to players for this objective ++ * ++ * @return this objective's display name ++ * @throws IllegalStateException if this objective has been unregistered ++ */ ++ @NotNull net.kyori.adventure.text.Component displayName() throws IllegalStateException; ++ /** ++ * Sets the name displayed to players for this objective. ++ * ++ * @param displayName Display name to set ++ * @throws IllegalStateException if this objective has been unregistered ++ * @throws IllegalArgumentException if displayName is null ++ * @throws IllegalArgumentException if displayName is longer than 128 ++ * characters. ++ */ ++ void displayName(@Nullable net.kyori.adventure.text.Component displayName) throws IllegalStateException, IllegalArgumentException; ++ // Paper end + + /** + * Gets the name displayed to players for this objective + * + * @return this objective's display name + * @throws IllegalStateException if this objective has been unregistered ++ * @deprecated in favour of {@link #displayName()} + */ + @NotNull ++ @Deprecated // Paper + String getDisplayName() throws IllegalStateException; + + /** +@@ -37,7 +58,9 @@ public interface Objective { + * @throws IllegalArgumentException if displayName is null + * @throws IllegalArgumentException if displayName is longer than 128 + * characters. ++ * @deprecated in favour of {@link #displayName(net.kyori.adventure.text.Component)} + */ ++ @Deprecated // Paper + void setDisplayName(@NotNull String displayName) throws IllegalStateException, IllegalArgumentException; + + /** +diff --git a/src/main/java/org/bukkit/scoreboard/Scoreboard.java b/src/main/java/org/bukkit/scoreboard/Scoreboard.java +index 4bfaaea78c9b6aa5d392629aa943d26dbe6a7d4a..f09ff32cc3ffc16af379a378b1948991435393e8 100644 +--- a/src/main/java/org/bukkit/scoreboard/Scoreboard.java ++++ b/src/main/java/org/bukkit/scoreboard/Scoreboard.java +@@ -27,6 +27,48 @@ public interface Scoreboard { + @Deprecated + @NotNull + Objective registerNewObjective(@NotNull String name, @NotNull String criteria) throws IllegalArgumentException; ++ // Paper start ++ /** ++ * Registers an Objective on this Scoreboard ++ * ++ * @param name Name of the Objective ++ * @param criteria Criteria for the Objective ++ * @param displayName Name displayed to players for the Objective. ++ * @return The registered Objective ++ * @throws IllegalArgumentException if name is null ++ * @throws IllegalArgumentException if name is longer than 16 ++ * characters. ++ * @throws IllegalArgumentException if criteria is null ++ * @throws IllegalArgumentException if displayName is null ++ * @throws IllegalArgumentException if displayName is longer than 128 ++ * characters. ++ * @throws IllegalArgumentException if an objective by that name already ++ * exists ++ */ ++ @NotNull ++ Objective registerNewObjective(@NotNull String name, @NotNull String criteria, @Nullable net.kyori.adventure.text.Component displayName) throws IllegalArgumentException; ++ /** ++ * Registers an Objective on this Scoreboard ++ * ++ * @param name Name of the Objective ++ * @param criteria Criteria for the Objective ++ * @param displayName Name displayed to players for the Objective. ++ * @param renderType Manner of rendering the Objective ++ * @return The registered Objective ++ * @throws IllegalArgumentException if name is null ++ * @throws IllegalArgumentException if name is longer than 16 ++ * characters. ++ * @throws IllegalArgumentException if criteria is null ++ * @throws IllegalArgumentException if displayName is null ++ * @throws IllegalArgumentException if displayName is longer than 128 ++ * characters. ++ * @throws IllegalArgumentException if renderType is null ++ * @throws IllegalArgumentException if an objective by that name already ++ * exists ++ */ ++ @NotNull ++ Objective registerNewObjective(@NotNull String name, @NotNull String criteria, @Nullable net.kyori.adventure.text.Component displayName, @NotNull RenderType renderType) throws IllegalArgumentException; ++ // Paper end + + /** + * Registers an Objective on this Scoreboard +@@ -44,8 +86,10 @@ public interface Scoreboard { + * characters. + * @throws IllegalArgumentException if an objective by that name already + * exists ++ * @deprecated in favour of {@link #registerNewObjective(String, String, net.kyori.adventure.text.Component)} + */ + @NotNull ++ @Deprecated // Paper + Objective registerNewObjective(@NotNull String name, @NotNull String criteria, @NotNull String displayName) throws IllegalArgumentException; + + /** +@@ -66,8 +110,10 @@ public interface Scoreboard { + * @throws IllegalArgumentException if renderType is null + * @throws IllegalArgumentException if an objective by that name already + * exists ++ * @deprecated in favour of {@link #registerNewObjective(String, String, net.kyori.adventure.text.Component, RenderType)} + */ + @NotNull ++ @Deprecated // Paper + Objective registerNewObjective(@NotNull String name, @NotNull String criteria, @NotNull String displayName, @NotNull RenderType renderType) throws IllegalArgumentException; + + /** +diff --git a/src/main/java/org/bukkit/scoreboard/Team.java b/src/main/java/org/bukkit/scoreboard/Team.java +index da01d2926cc8a2485a3349ac1ebb32cad20e287c..f0af10a5b9ad048be197ed5ec6c8ed2672eb3dd5 100644 +--- a/src/main/java/org/bukkit/scoreboard/Team.java ++++ b/src/main/java/org/bukkit/scoreboard/Team.java +@@ -22,14 +22,95 @@ public interface Team { + */ + @NotNull + String getName() throws IllegalStateException; ++ // Paper start ++ /** ++ * Gets the name displayed to entries for this team ++ * ++ * @return Team display name ++ * @throws IllegalStateException if this team has been unregistered ++ */ ++ @NotNull net.kyori.adventure.text.Component displayName() throws IllegalStateException; ++ ++ /** ++ * Sets the name displayed to entries for this team ++ * ++ * @param displayName New display name ++ * @throws IllegalArgumentException if displayName is longer than 128 ++ * characters. ++ * @throws IllegalStateException if this team has been unregistered ++ */ ++ void displayName(@Nullable net.kyori.adventure.text.Component displayName) throws IllegalStateException, IllegalArgumentException; ++ ++ /** ++ * Gets the prefix prepended to the display of entries on this team. ++ * ++ * @return Team prefix ++ * @throws IllegalStateException if this team has been unregistered ++ */ ++ @NotNull net.kyori.adventure.text.Component prefix() throws IllegalStateException; ++ ++ /** ++ * Sets the prefix prepended to the display of entries on this team. ++ * ++ * @param prefix New prefix ++ * @throws IllegalArgumentException if prefix is null ++ * @throws IllegalArgumentException if prefix is longer than 64 ++ * characters ++ * @throws IllegalStateException if this team has been unregistered ++ */ ++ void prefix(@Nullable net.kyori.adventure.text.Component prefix) throws IllegalStateException, IllegalArgumentException; ++ ++ /** ++ * Gets the suffix appended to the display of entries on this team. ++ * ++ * @return the team's current suffix ++ * @throws IllegalStateException if this team has been unregistered ++ */ ++ @NotNull net.kyori.adventure.text.Component suffix() throws IllegalStateException; ++ ++ /** ++ * Sets the suffix appended to the display of entries on this team. ++ * ++ * @param suffix the new suffix for this team. ++ * @throws IllegalArgumentException if suffix is null ++ * @throws IllegalArgumentException if suffix is longer than 64 ++ * characters ++ * @throws IllegalStateException if this team has been unregistered ++ */ ++ void suffix(@Nullable net.kyori.adventure.text.Component suffix) throws IllegalStateException, IllegalArgumentException; ++ ++ /** ++ * Gets the color of the team. ++ *
++ * This only sets the team outline, other occurrences of colors such as in ++ * names are handled by prefixes / suffixes. ++ * ++ * @return team color, defaults to {@link ChatColor#RESET} ++ * @throws IllegalStateException if this team has been unregistered ++ */ ++ @NotNull net.kyori.adventure.text.format.TextColor color() throws IllegalStateException; ++ ++ /** ++ * Sets the color of the team. ++ *
++ * This only sets the team outline, other occurrences of colors such as in ++ * names are handled by prefixes / suffixes. ++ * ++ * @param color new color, must be non-null. Use {@link ChatColor#RESET} for ++ * no color ++ */ ++ void color(@Nullable net.kyori.adventure.text.format.NamedTextColor color); ++ // Paper end + + /** + * Gets the name displayed to entries for this team + * + * @return Team display name + * @throws IllegalStateException if this team has been unregistered ++ * @deprecated in favour of {@link #displayName()} + */ + @NotNull ++ @Deprecated // Paper + String getDisplayName() throws IllegalStateException; + + /** +@@ -39,7 +120,9 @@ public interface Team { + * @throws IllegalArgumentException if displayName is longer than 128 + * characters. + * @throws IllegalStateException if this team has been unregistered ++ * @deprecated in favour of {@link #displayName(net.kyori.adventure.text.Component)} + */ ++ @Deprecated // Paper + void setDisplayName(@NotNull String displayName) throws IllegalStateException, IllegalArgumentException; + + /** +@@ -47,8 +130,10 @@ public interface Team { + * + * @return Team prefix + * @throws IllegalStateException if this team has been unregistered ++ * @deprecated in favour of {@link #prefix()} + */ + @NotNull ++ @Deprecated // Paper + String getPrefix() throws IllegalStateException; + + /** +@@ -59,7 +144,9 @@ public interface Team { + * @throws IllegalArgumentException if prefix is longer than 64 + * characters + * @throws IllegalStateException if this team has been unregistered ++ * @deprecated in favour of {@link #prefix(net.kyori.adventure.text.Component)} + */ ++ @Deprecated // Paper + void setPrefix(@NotNull String prefix) throws IllegalStateException, IllegalArgumentException; + + /** +@@ -67,8 +154,10 @@ public interface Team { + * + * @return the team's current suffix + * @throws IllegalStateException if this team has been unregistered ++ * @deprecated in favour of {@link #suffix()} + */ + @NotNull ++ @Deprecated // Paper + String getSuffix() throws IllegalStateException; + + /** +@@ -79,7 +168,9 @@ public interface Team { + * @throws IllegalArgumentException if suffix is longer than 64 + * characters + * @throws IllegalStateException if this team has been unregistered ++ * @deprecated in favour of {@link #suffix(net.kyori.adventure.text.Component)} + */ ++ @Deprecated // Paper + void setSuffix(@NotNull String suffix) throws IllegalStateException, IllegalArgumentException; + + /** +@@ -90,8 +181,10 @@ public interface Team { + * + * @return team color, defaults to {@link ChatColor#RESET} + * @throws IllegalStateException if this team has been unregistered ++ * @deprecated in favour of {@link #color()} + */ + @NotNull ++ @Deprecated // Paper + ChatColor getColor() throws IllegalStateException; + + /** +@@ -102,7 +195,9 @@ public interface Team { + * + * @param color new color, must be non-null. Use {@link ChatColor#RESET} for + * no color ++ * @deprecated in favour of {@link #color(net.kyori.adventure.text.format.NamedTextColor)} + */ ++ @Deprecated // Paper + void setColor(@NotNull ChatColor color); + + /** diff --git a/Spigot-API-Patches/0005-Player-affects-spawning-API.patch b/Spigot-API-Patches/0006-Player-affects-spawning-API.patch similarity index 84% rename from Spigot-API-Patches/0005-Player-affects-spawning-API.patch rename to Spigot-API-Patches/0006-Player-affects-spawning-API.patch index 3bd860ebe0..8acb6d65a7 100644 --- a/Spigot-API-Patches/0005-Player-affects-spawning-API.patch +++ b/Spigot-API-Patches/0006-Player-affects-spawning-API.patch @@ -5,11 +5,11 @@ Subject: [PATCH] Player affects spawning API diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index f22b21ee12496452f7b2125c131f56ecc74d439a..ab1a2816e3bc78be103823fd61cc5d01f8362552 100644 +index 447de8f7c1d871ef5fb1a06bace451e1de06d972..0ec05e160a8ebe2aea374b1225dbd8ea24a418e3 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -1272,6 +1272,22 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM - @NotNull +@@ -1404,6 +1404,22 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM + @Deprecated // Paper public String getLocale(); + // Paper start diff --git a/Spigot-API-Patches/0006-Add-getTPS-method.patch b/Spigot-API-Patches/0007-Add-getTPS-method.patch similarity index 78% rename from Spigot-API-Patches/0006-Add-getTPS-method.patch rename to Spigot-API-Patches/0007-Add-getTPS-method.patch index 198205c41f..b4bcd8fbba 100644 --- a/Spigot-API-Patches/0006-Add-getTPS-method.patch +++ b/Spigot-API-Patches/0007-Add-getTPS-method.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add getTPS method diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index 7c715fdc11ab7837552b1fe3ffd08b31cec0a63b..984bec345cbb8038d8756f5ab5553143f04a5044 100644 +index 426b1e83226e674ee4bf3ec05ddcd3ac4376b06d..cd1b4be422a3a4290579d5daed9466084f18ed60 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java -@@ -1421,6 +1421,17 @@ public final class Bukkit { +@@ -1531,6 +1531,17 @@ public final class Bukkit { return server.getEntity(uuid); } @@ -27,10 +27,10 @@ index 7c715fdc11ab7837552b1fe3ffd08b31cec0a63b..984bec345cbb8038d8756f5ab5553143 * Get the advancement specified by this key. * diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index a6b9e4f158583e5932bf8ca210d531857e9f5360..0be1d5d5fa5a6d687820d767e501a54f93fd72b4 100644 +index d9515a79dc7ed60c66960cd6c6bb4c108f206f3c..9ec374570e135a4ba14db7efdbb5c1bd213226eb 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -1192,6 +1192,16 @@ public interface Server extends PluginMessageRecipient { +@@ -1290,6 +1290,16 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi @Nullable Entity getEntity(@NotNull UUID uuid); diff --git a/Spigot-API-Patches/0007-Entity-Origin-API.patch b/Spigot-API-Patches/0008-Entity-Origin-API.patch similarity index 79% rename from Spigot-API-Patches/0007-Entity-Origin-API.patch rename to Spigot-API-Patches/0008-Entity-Origin-API.patch index 2f1d8aefa5..b26d5933f8 100644 --- a/Spigot-API-Patches/0007-Entity-Origin-API.patch +++ b/Spigot-API-Patches/0008-Entity-Origin-API.patch @@ -5,15 +5,14 @@ Subject: [PATCH] Entity Origin API diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java -index 344c14a5ed86e9ebe401bfb5ba3aedc0c0ed0b04..7c3100d44ca42fe9c9ffedad321be9f2e446491a 100644 +index 41a1bc45cc5eb7f19374115ade7f5328c7fc1dae..e9d0d507b47b0347b975b1a83f5ae70dca5587b8 100644 --- a/src/main/java/org/bukkit/entity/Entity.java +++ b/src/main/java/org/bukkit/entity/Entity.java -@@ -602,4 +602,16 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent - @Override - Spigot spigot(); - // Spigot end +@@ -609,5 +609,15 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent + default net.kyori.adventure.text.event.HoverEvent asHoverEvent(final @NotNull java.util.function.UnaryOperator op) { + return net.kyori.adventure.text.event.HoverEvent.showEntity(op.apply(net.kyori.adventure.text.event.HoverEvent.ShowEntity.of(this.getType().getKey(), this.getUniqueId(), this.customName()))); + } + -+ // Paper start + /** + * Gets the location where this entity originates from. + *

@@ -23,7 +22,7 @@ index 344c14a5ed86e9ebe401bfb5ba3aedc0c0ed0b04..7c3100d44ca42fe9c9ffedad321be9f2 + */ + @Nullable + Location getOrigin(); -+ // Paper end + // Paper end } diff --git a/src/main/java/org/bukkit/entity/FallingBlock.java b/src/main/java/org/bukkit/entity/FallingBlock.java index 64f9d3fd870d65afd2ee9a85625b149163eee144..14cb0d770561151570ab4399ca5facff43076819 100644 diff --git a/Spigot-API-Patches/0008-Version-Command-2.0.patch b/Spigot-API-Patches/0009-Version-Command-2.0.patch similarity index 100% rename from Spigot-API-Patches/0008-Version-Command-2.0.patch rename to Spigot-API-Patches/0009-Version-Command-2.0.patch diff --git a/Spigot-API-Patches/0009-Add-PlayerLocaleChangeEvent.patch b/Spigot-API-Patches/0010-Add-PlayerLocaleChangeEvent.patch similarity index 100% rename from Spigot-API-Patches/0009-Add-PlayerLocaleChangeEvent.patch rename to Spigot-API-Patches/0010-Add-PlayerLocaleChangeEvent.patch diff --git a/Spigot-API-Patches/0010-Add-player-view-distance-API.patch b/Spigot-API-Patches/0011-Add-player-view-distance-API.patch similarity index 90% rename from Spigot-API-Patches/0010-Add-player-view-distance-API.patch rename to Spigot-API-Patches/0011-Add-player-view-distance-API.patch index 141a4f18d7..24ba4f5bf7 100644 --- a/Spigot-API-Patches/0010-Add-player-view-distance-API.patch +++ b/Spigot-API-Patches/0011-Add-player-view-distance-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add player view distance API diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index ab1a2816e3bc78be103823fd61cc5d01f8362552..85c242034d125e5760952900557b10418ec5605b 100644 +index 0ec05e160a8ebe2aea374b1225dbd8ea24a418e3..e304ccf40047f6df290c8db6fde312eb88d85d7c 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -1286,6 +1286,28 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1418,6 +1418,28 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * @param affects Whether the player can affect mob spawning */ public void setAffectsSpawning(boolean affects); diff --git a/Spigot-API-Patches/0011-Add-BeaconEffectEvent.patch b/Spigot-API-Patches/0012-Add-BeaconEffectEvent.patch similarity index 100% rename from Spigot-API-Patches/0011-Add-BeaconEffectEvent.patch rename to Spigot-API-Patches/0012-Add-BeaconEffectEvent.patch diff --git a/Spigot-API-Patches/0012-Add-PlayerInitialSpawnEvent.patch b/Spigot-API-Patches/0013-Add-PlayerInitialSpawnEvent.patch similarity index 100% rename from Spigot-API-Patches/0012-Add-PlayerInitialSpawnEvent.patch rename to Spigot-API-Patches/0013-Add-PlayerInitialSpawnEvent.patch diff --git a/Spigot-API-Patches/0013-Automatically-disable-plugins-that-fail-to-load.patch b/Spigot-API-Patches/0014-Automatically-disable-plugins-that-fail-to-load.patch similarity index 100% rename from Spigot-API-Patches/0013-Automatically-disable-plugins-that-fail-to-load.patch rename to Spigot-API-Patches/0014-Automatically-disable-plugins-that-fail-to-load.patch diff --git a/Spigot-API-Patches/0014-Expose-server-CommandMap.patch b/Spigot-API-Patches/0015-Expose-server-CommandMap.patch similarity index 78% rename from Spigot-API-Patches/0014-Expose-server-CommandMap.patch rename to Spigot-API-Patches/0015-Expose-server-CommandMap.patch index 42a5375288..aa4d6d7b13 100644 --- a/Spigot-API-Patches/0014-Expose-server-CommandMap.patch +++ b/Spigot-API-Patches/0015-Expose-server-CommandMap.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Expose server CommandMap diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index 984bec345cbb8038d8756f5ab5553143f04a5044..4747afa841b4fa71328c480f836f9fefb2e0c118 100644 +index cd1b4be422a3a4290579d5daed9466084f18ed60..10274053320f1ec690a65d3794abb44b58658059 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java -@@ -1595,6 +1595,19 @@ public final class Bukkit { +@@ -1705,6 +1705,19 @@ public final class Bukkit { return server.getUnsafe(); } @@ -29,10 +29,10 @@ index 984bec345cbb8038d8756f5ab5553143f04a5044..4747afa841b4fa71328c480f836f9fef public static Server.Spigot spigot() { return server.spigot(); diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 0be1d5d5fa5a6d687820d767e501a54f93fd72b4..1f8095141bdbfabb1e487d93f33f636e83084386 100644 +index 9ec374570e135a4ba14db7efdbb5c1bd213226eb..7e4a728ceb943b6a32b9ba9b84bada34e71c0980 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -1202,6 +1202,15 @@ public interface Server extends PluginMessageRecipient { +@@ -1300,6 +1300,15 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi public double[] getTPS(); // Paper end diff --git a/Spigot-API-Patches/0015-Graduate-bungeecord-chat-API-from-spigot-subclasses.patch b/Spigot-API-Patches/0016-Graduate-bungeecord-chat-API-from-spigot-subclasses.patch similarity index 73% rename from Spigot-API-Patches/0015-Graduate-bungeecord-chat-API-from-spigot-subclasses.patch rename to Spigot-API-Patches/0016-Graduate-bungeecord-chat-API-from-spigot-subclasses.patch index c592c5ee44..9be8a9201c 100644 --- a/Spigot-API-Patches/0015-Graduate-bungeecord-chat-API-from-spigot-subclasses.patch +++ b/Spigot-API-Patches/0016-Graduate-bungeecord-chat-API-from-spigot-subclasses.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Graduate bungeecord chat API from spigot subclasses Change Javadoc to be accurate diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index 4747afa841b4fa71328c480f836f9fefb2e0c118..dcb3af5a6d4fedcb805928223e40c74fbea894a0 100644 +index 10274053320f1ec690a65d3794abb44b58658059..22b83b142de97dcba28fa9a49730de7880d0b5d2 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java -@@ -283,6 +283,26 @@ public final class Bukkit { +@@ -285,6 +285,30 @@ public final class Bukkit { return server.broadcastMessage(message); } @@ -18,7 +18,9 @@ index 4747afa841b4fa71328c480f836f9fefb2e0c118..dcb3af5a6d4fedcb805928223e40c74f + * Sends the component to all online players. + * + * @param component the component to send ++ * @deprecated use {@code sendMessage} methods on {@link #getServer()} that accept {@link net.kyori.adventure.text.Component} + */ ++ @Deprecated + public static void broadcast(@NotNull net.md_5.bungee.api.chat.BaseComponent component) { + server.broadcast(component); + } @@ -27,7 +29,9 @@ index 4747afa841b4fa71328c480f836f9fefb2e0c118..dcb3af5a6d4fedcb805928223e40c74f + * Sends an array of components as a single message to all online players. + * + * @param components the components to send ++ * @deprecated use {@code sendMessage} methods on {@link #getServer()} that accept {@link net.kyori.adventure.text.Component} + */ ++ @Deprecated + public static void broadcast(@NotNull net.md_5.bungee.api.chat.BaseComponent... components) { + server.broadcast(components); + } @@ -37,11 +41,11 @@ index 4747afa841b4fa71328c480f836f9fefb2e0c118..dcb3af5a6d4fedcb805928223e40c74f * Gets the name of the update folder. The update folder is used to safely * update plugins at the right moment on a plugin load. diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 1f8095141bdbfabb1e487d93f33f636e83084386..00738355e42704de583b60833d4fb39a8728e762 100644 +index 7e4a728ceb943b6a32b9ba9b84bada34e71c0980..9ce9b4ce2da6c57c62607502ae2042e30fc26d88 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -232,6 +232,26 @@ public interface Server extends PluginMessageRecipient { - */ +@@ -234,6 +234,30 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi + @Deprecated // Paper public int broadcastMessage(@NotNull String message); + // Paper start @@ -49,7 +53,9 @@ index 1f8095141bdbfabb1e487d93f33f636e83084386..00738355e42704de583b60833d4fb39a + * Sends the component to all online players. + * + * @param component the component to send ++ * @deprecated use {@code sendMessage} methods that accept {@link net.kyori.adventure.text.Component} + */ ++ @Deprecated + public default void broadcast(@NotNull net.md_5.bungee.api.chat.BaseComponent component) { + spigot().broadcast(component); + } @@ -58,7 +64,9 @@ index 1f8095141bdbfabb1e487d93f33f636e83084386..00738355e42704de583b60833d4fb39a + * Sends an array of components as a single message to all online players. + * + * @param components the components to send ++ * @deprecated use {@code sendMessage} methods that accept {@link net.kyori.adventure.text.Component} + */ ++ @Deprecated + public default void broadcast(@NotNull net.md_5.bungee.api.chat.BaseComponent... components) { + spigot().broadcast(components); + } @@ -68,10 +76,10 @@ index 1f8095141bdbfabb1e487d93f33f636e83084386..00738355e42704de583b60833d4fb39a * Gets the name of the update folder. The update folder is used to safely * update plugins at the right moment on a plugin load. diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index 85c242034d125e5760952900557b10418ec5605b..5553f465e45238b2f6c4041e2b5a58aea727543c 100644 +index e304ccf40047f6df290c8db6fde312eb88d85d7c..d504299c0e1dfec3f191dc10ebebbc595130e417 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -482,6 +482,38 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -604,6 +604,42 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM */ public void sendMap(@NotNull MapView map); @@ -80,8 +88,10 @@ index 85c242034d125e5760952900557b10418ec5605b..5553f465e45238b2f6c4041e2b5a58ae + * Sends the component to the player + * + * @param component the components to send ++ * @deprecated use {@code sendMessage} methods that accept {@link net.kyori.adventure.text.Component} + */ + @Override ++ @Deprecated + public default void sendMessage(@NotNull net.md_5.bungee.api.chat.BaseComponent component) { + spigot().sendMessage(component); + } @@ -90,8 +100,10 @@ index 85c242034d125e5760952900557b10418ec5605b..5553f465e45238b2f6c4041e2b5a58ae + * Sends an array of components as a single message to the player + * + * @param components the components to send ++ * @deprecated use {@code sendMessage} methods that accept {@link net.kyori.adventure.text.Component} + */ + @Override ++ @Deprecated + public default void sendMessage(@NotNull net.md_5.bungee.api.chat.BaseComponent... components) { + spigot().sendMessage(components); + } diff --git a/Spigot-API-Patches/0016-Player-Tab-List-and-Title-APIs.patch b/Spigot-API-Patches/0017-Player-Tab-List-and-Title-APIs.patch similarity index 91% rename from Spigot-API-Patches/0016-Player-Tab-List-and-Title-APIs.patch rename to Spigot-API-Patches/0017-Player-Tab-List-and-Title-APIs.patch index d5c136c182..e3ebfa1f81 100644 --- a/Spigot-API-Patches/0016-Player-Tab-List-and-Title-APIs.patch +++ b/Spigot-API-Patches/0017-Player-Tab-List-and-Title-APIs.patch @@ -7,10 +7,10 @@ Co-authored-by: Fruxz diff --git a/src/main/java/com/destroystokyo/paper/Title.java b/src/main/java/com/destroystokyo/paper/Title.java new file mode 100644 -index 0000000000000000000000000000000000000000..5105dfcee646718cd8abc79d1d8062a580b4e923 +index 0000000000000000000000000000000000000000..9e90c3df567a65b48a0b9341f784eb902cb35d8c --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/Title.java -@@ -0,0 +1,417 @@ +@@ -0,0 +1,420 @@ +package com.destroystokyo.paper; + +import net.md_5.bungee.api.chat.BaseComponent; @@ -34,7 +34,10 @@ index 0000000000000000000000000000000000000000..5105dfcee646718cd8abc79d1d8062a5 + * Represents a title to may be sent to a {@link Player}. + * + *

A title can be sent without subtitle text.

++ * ++ * @deprecated use {@link net.kyori.adventure.title.Title} + */ ++@Deprecated +public final class Title { + + /** @@ -429,7 +432,7 @@ index 0000000000000000000000000000000000000000..5105dfcee646718cd8abc79d1d8062a5 + } +} diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index 5553f465e45238b2f6c4041e2b5a58aea727543c..7889e98443d1192ae633ff64584f00255725c9bd 100644 +index d504299c0e1dfec3f191dc10ebebbc595130e417..57b8b776a9c882c7dc7b790c4cb5b1515e71d45b 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java @@ -2,6 +2,7 @@ package org.bukkit.entity; @@ -440,7 +443,7 @@ index 5553f465e45238b2f6c4041e2b5a58aea727543c..7889e98443d1192ae633ff64584f0025 import org.bukkit.DyeColor; import org.bukkit.Effect; import org.bukkit.GameMode; -@@ -512,6 +513,116 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -638,6 +639,131 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM public default void sendMessage(net.md_5.bungee.api.ChatMessageType position, net.md_5.bungee.api.chat.BaseComponent... components) { spigot().sendMessage(position, components); } @@ -450,7 +453,9 @@ index 5553f465e45238b2f6c4041e2b5a58aea727543c..7889e98443d1192ae633ff64584f0025 + * + * @param header content for the top of the player list + * @param footer content for the bottom of the player list ++ * @deprecated in favour of {@link #sendPlayerListHeaderAndFooter(net.kyori.adventure.text.Component, net.kyori.adventure.text.Component)} + */ ++ @Deprecated + public void setPlayerListHeaderFooter(@Nullable net.md_5.bungee.api.chat.BaseComponent[] header, @Nullable net.md_5.bungee.api.chat.BaseComponent[] footer); + + /** @@ -458,7 +463,9 @@ index 5553f465e45238b2f6c4041e2b5a58aea727543c..7889e98443d1192ae633ff64584f0025 + * + * @param header content for the top of the player list + * @param footer content for the bottom of the player list ++ * @deprecated in favour of {@link #sendPlayerListHeaderAndFooter(net.kyori.adventure.text.Component, net.kyori.adventure.text.Component)} + */ ++ @Deprecated + public void setPlayerListHeaderFooter(@Nullable net.md_5.bungee.api.chat.BaseComponent header, @Nullable net.md_5.bungee.api.chat.BaseComponent footer); + + /** @@ -467,7 +474,7 @@ index 5553f465e45238b2f6c4041e2b5a58aea727543c..7889e98443d1192ae633ff64584f0025 + * @param fadeInTicks ticks to fade-in + * @param stayTicks ticks to stay visible + * @param fadeOutTicks ticks to fade-out -+ * @deprecated Use {@link #updateTitle(Title)} ++ * @deprecated Use {@link #showTitle(net.kyori.adventure.title.Title)} + */ + @Deprecated + public void setTitleTimes(int fadeInTicks, int stayTicks, int fadeOutTicks); @@ -475,7 +482,8 @@ index 5553f465e45238b2f6c4041e2b5a58aea727543c..7889e98443d1192ae633ff64584f0025 + /** + * Update the subtitle of titles displayed to the player + * -+ * @deprecated Use {@link #updateTitle(Title)} ++ * @param subtitle Subtitle to set ++ * @deprecated Use {@link #showTitle(net.kyori.adventure.title.Title)} + */ + @Deprecated + public void setSubtitle(net.md_5.bungee.api.chat.BaseComponent[] subtitle); @@ -483,7 +491,8 @@ index 5553f465e45238b2f6c4041e2b5a58aea727543c..7889e98443d1192ae633ff64584f0025 + /** + * Update the subtitle of titles displayed to the player + * -+ * @deprecated Use {@link #updateTitle(Title)} ++ * @param subtitle Subtitle to set ++ * @deprecated Use {@link #showTitle(net.kyori.adventure.title.Title)} + */ + @Deprecated + public void setSubtitle(net.md_5.bungee.api.chat.BaseComponent subtitle); @@ -491,7 +500,8 @@ index 5553f465e45238b2f6c4041e2b5a58aea727543c..7889e98443d1192ae633ff64584f0025 + /** + * Show the given title to the player, along with the last subtitle set, using the last set times + * -+ * @deprecated Use {@link #sendTitle(Title)} or {@link #updateTitle(Title)} ++ * @param title Title to set ++ * @deprecated Use {@link #showTitle(net.kyori.adventure.title.Title)} + */ + @Deprecated + public void showTitle(@Nullable net.md_5.bungee.api.chat.BaseComponent[] title); @@ -499,7 +509,8 @@ index 5553f465e45238b2f6c4041e2b5a58aea727543c..7889e98443d1192ae633ff64584f0025 + /** + * Show the given title to the player, along with the last subtitle set, using the last set times + * -+ * @deprecated Use {@link #sendTitle(Title)} or {@link #updateTitle(Title)} ++ * @param title Title to set ++ * @deprecated Use {@link #showTitle(net.kyori.adventure.title.Title)} + */ + @Deprecated + public void showTitle(@Nullable net.md_5.bungee.api.chat.BaseComponent title); @@ -512,7 +523,7 @@ index 5553f465e45238b2f6c4041e2b5a58aea727543c..7889e98443d1192ae633ff64584f0025 + * @param fadeInTicks ticks to fade-in + * @param stayTicks ticks to stay visible + * @param fadeOutTicks ticks to fade-out -+ * @deprecated Use {@link #sendTitle(Title)} or {@link #updateTitle(Title)} ++ * @deprecated Use {@link #showTitle(net.kyori.adventure.title.Title)} + */ + @Deprecated + public void showTitle(@Nullable net.md_5.bungee.api.chat.BaseComponent[] title, @Nullable net.md_5.bungee.api.chat.BaseComponent[] subtitle, int fadeInTicks, int stayTicks, int fadeOutTicks); @@ -525,7 +536,7 @@ index 5553f465e45238b2f6c4041e2b5a58aea727543c..7889e98443d1192ae633ff64584f0025 + * @param fadeInTicks ticks to fade-in + * @param stayTicks ticks to stay visible + * @param fadeOutTicks ticks to fade-out -+ * @deprecated Use {@link #sendTitle(Title)} or {@link #updateTitle(Title)} ++ * @deprecated Use {@link #showTitle(net.kyori.adventure.title.Title)} + */ + @Deprecated + public void showTitle(@Nullable net.md_5.bungee.api.chat.BaseComponent title, @Nullable net.md_5.bungee.api.chat.BaseComponent subtitle, int fadeInTicks, int stayTicks, int fadeOutTicks); @@ -537,7 +548,9 @@ index 5553f465e45238b2f6c4041e2b5a58aea727543c..7889e98443d1192ae633ff64584f0025 + * + * @param title the title to send + * @throws NullPointerException if the title is null ++ * @deprecated Use {@link #showTitle(net.kyori.adventure.title.Title)} + */ ++ @Deprecated + void sendTitle(@NotNull Title title); + + /** @@ -547,12 +560,17 @@ index 5553f465e45238b2f6c4041e2b5a58aea727543c..7889e98443d1192ae633ff64584f0025 + * + * @param title the title to send + * @throws NullPointerException if title is null ++ * @deprecated use {@link #showTitle(net.kyori.adventure.title.Title)} + */ ++ @Deprecated + void updateTitle(@NotNull Title title); + + /** + * Hide any title that is currently visible to the player ++ * ++ * @deprecated use {@link #clearTitle()} + */ ++ @Deprecated + public void hideTitle(); // Paper end diff --git a/Spigot-API-Patches/0017-Add-exception-reporting-event.patch b/Spigot-API-Patches/0018-Add-exception-reporting-event.patch similarity index 100% rename from Spigot-API-Patches/0017-Add-exception-reporting-event.patch rename to Spigot-API-Patches/0018-Add-exception-reporting-event.patch diff --git a/Spigot-API-Patches/0018-Fix-ServerListPingEvent-flagging-as-Async.patch b/Spigot-API-Patches/0019-Fix-ServerListPingEvent-flagging-as-Async.patch similarity index 100% rename from Spigot-API-Patches/0018-Fix-ServerListPingEvent-flagging-as-Async.patch rename to Spigot-API-Patches/0019-Fix-ServerListPingEvent-flagging-as-Async.patch diff --git a/Spigot-API-Patches/0019-Add-BaseComponent-sendMessage-methods-to-CommandSend.patch b/Spigot-API-Patches/0020-Add-BaseComponent-sendMessage-methods-to-CommandSend.patch similarity index 54% rename from Spigot-API-Patches/0019-Add-BaseComponent-sendMessage-methods-to-CommandSend.patch rename to Spigot-API-Patches/0020-Add-BaseComponent-sendMessage-methods-to-CommandSend.patch index f1a7bd1c68..fe02234fb2 100644 --- a/Spigot-API-Patches/0019-Add-BaseComponent-sendMessage-methods-to-CommandSend.patch +++ b/Spigot-API-Patches/0020-Add-BaseComponent-sendMessage-methods-to-CommandSend.patch @@ -5,15 +5,24 @@ Subject: [PATCH] Add BaseComponent sendMessage methods to CommandSender diff --git a/src/main/java/org/bukkit/command/CommandSender.java b/src/main/java/org/bukkit/command/CommandSender.java -index ac772bf349e0ffe9cab1df165d9460b387f2fe69..de4370233e0358da30d3704145044a99d8369f52 100644 +index 2588edf75483855e0c843834f39ca371770730b9..6aa795fe79ceca03c1725c36f2b0d3a63acd134e 100644 --- a/src/main/java/org/bukkit/command/CommandSender.java +++ b/src/main/java/org/bukkit/command/CommandSender.java -@@ -99,4 +99,30 @@ public interface CommandSender extends Permissible { - @NotNull - Spigot spigot(); - // Spigot end +@@ -1,6 +1,9 @@ + package org.bukkit.command; + + import java.util.UUID; ++import net.kyori.adventure.audience.MessageType; ++import net.kyori.adventure.identity.Identity; ++import net.kyori.adventure.text.Component; + import org.bukkit.Server; + import org.bukkit.permissions.Permissible; + import org.jetbrains.annotations.NotNull; +@@ -117,5 +120,33 @@ public interface CommandSender extends net.kyori.adventure.audience.Audience, Pe + default void sendMessage(final @NotNull net.kyori.adventure.identity.Identity identity, final @NotNull net.kyori.adventure.text.Component message, final @NotNull net.kyori.adventure.audience.MessageType type) { + this.sendMessage(net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().serialize(message)); + } + -+ // Paper start + /** + * Sends the component to the sender + * @@ -21,7 +30,9 @@ index ac772bf349e0ffe9cab1df165d9460b387f2fe69..de4370233e0358da30d3704145044a99 + * the component will be sent as legacy text.

+ * + * @param component the component to send ++ * @deprecated use {@link #sendMessage(Identity, Component, MessageType)} instead + */ ++ @Deprecated + default void sendMessage(@NotNull net.md_5.bungee.api.chat.BaseComponent component) { + this.sendMessage(component.toLegacyText()); + } @@ -33,9 +44,11 @@ index ac772bf349e0ffe9cab1df165d9460b387f2fe69..de4370233e0358da30d3704145044a99 + * the components will be sent as legacy text.

+ * + * @param components the components to send ++ * @deprecated use {@link #sendMessage(Identity, Component, MessageType)} instead + */ ++ @Deprecated + default void sendMessage(@NotNull net.md_5.bungee.api.chat.BaseComponent... components) { + this.sendMessage(new net.md_5.bungee.api.chat.TextComponent(components).toLegacyText()); + } -+ // Paper end + // Paper end } diff --git a/Spigot-API-Patches/0020-Add-methods-for-working-with-arrows-stuck-in-living-.patch b/Spigot-API-Patches/0021-Add-methods-for-working-with-arrows-stuck-in-living-.patch similarity index 100% rename from Spigot-API-Patches/0020-Add-methods-for-working-with-arrows-stuck-in-living-.patch rename to Spigot-API-Patches/0021-Add-methods-for-working-with-arrows-stuck-in-living-.patch diff --git a/Spigot-API-Patches/0021-Complete-resource-pack-API.patch b/Spigot-API-Patches/0022-Complete-resource-pack-API.patch similarity index 88% rename from Spigot-API-Patches/0021-Complete-resource-pack-API.patch rename to Spigot-API-Patches/0022-Complete-resource-pack-API.patch index bb9884c261..f8cad31727 100644 --- a/Spigot-API-Patches/0021-Complete-resource-pack-API.patch +++ b/Spigot-API-Patches/0022-Complete-resource-pack-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Complete resource pack API diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index 7889e98443d1192ae633ff64584f00255725c9bd..b4874655e167c6459c823d5d79baeffdb690533a 100644 +index 57b8b776a9c882c7dc7b790c4cb5b1515e71d45b..a7cdc67738dc2b7f9a67118bb0b5372ae16966e7 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -1022,7 +1022,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1163,7 +1163,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * @throws IllegalArgumentException Thrown if the URL is null. * @throws IllegalArgumentException Thrown if the URL is too long. The * length restriction is an implementation specific arbitrary value. @@ -18,11 +18,11 @@ index 7889e98443d1192ae633ff64584f00255725c9bd..b4874655e167c6459c823d5d79baeffd public void setResourcePack(@NotNull String url); /** -@@ -1468,6 +1470,62 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM - */ - public void openBook(@NotNull ItemStack book); - -+ // Paper start +@@ -1625,6 +1627,60 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM + default net.kyori.adventure.text.event.HoverEvent asHoverEvent(final @NotNull java.util.function.UnaryOperator op) { + return net.kyori.adventure.text.event.HoverEvent.showEntity(this.getType().getKey(), this.getUniqueId(), this.displayName()); + } ++ + /** + * Request that the player's client download and switch resource packs. + *

@@ -76,11 +76,9 @@ index 7889e98443d1192ae633ff64584f00255725c9bd..b4874655e167c6459c823d5d79baeffd + * was {@link org.bukkit.event.player.PlayerResourcePackStatusEvent.Status#SUCCESSFULLY_LOADED} + */ + boolean hasResourcePack(); -+ // Paper end -+ - // Spigot start - public class Spigot extends Entity.Spigot { + // Paper end + // Spigot start diff --git a/src/main/java/org/bukkit/event/player/PlayerResourcePackStatusEvent.java b/src/main/java/org/bukkit/event/player/PlayerResourcePackStatusEvent.java index b98195650d49d78ec35970ca0376b6289b861e4b..4c2102a11c3d682d98f0db4ccafa35231e66bcdd 100644 --- a/src/main/java/org/bukkit/event/player/PlayerResourcePackStatusEvent.java diff --git a/Spigot-API-Patches/0022-Use-ASM-for-event-executors.patch b/Spigot-API-Patches/0023-Use-ASM-for-event-executors.patch similarity index 99% rename from Spigot-API-Patches/0022-Use-ASM-for-event-executors.patch rename to Spigot-API-Patches/0023-Use-ASM-for-event-executors.patch index b69c18ab03..a90d0d9977 100644 --- a/Spigot-API-Patches/0022-Use-ASM-for-event-executors.patch +++ b/Spigot-API-Patches/0023-Use-ASM-for-event-executors.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Use ASM for event executors. Uses method handles for private or static methods. diff --git a/pom.xml b/pom.xml -index 58fc279186e01a4703102227f387e96272fcf0a7..e040e0e37276295a0b7404357679e80fbbb618a3 100644 +index a6565a93848213a39694dc84be75aebcc327b1b8..aa893ec821f7c54ecf430b4b95aa52ccbfebf898 100644 --- a/pom.xml +++ b/pom.xml -@@ -128,6 +128,17 @@ +@@ -150,6 +150,17 @@ 9.0 test diff --git a/Spigot-API-Patches/0023-Add-a-call-helper-to-Event.patch b/Spigot-API-Patches/0024-Add-a-call-helper-to-Event.patch similarity index 100% rename from Spigot-API-Patches/0023-Add-a-call-helper-to-Event.patch rename to Spigot-API-Patches/0024-Add-a-call-helper-to-Event.patch diff --git a/Spigot-API-Patches/0024-Add-sender-name-to-commands.yml-replacement.patch b/Spigot-API-Patches/0025-Add-sender-name-to-commands.yml-replacement.patch similarity index 100% rename from Spigot-API-Patches/0024-Add-sender-name-to-commands.yml-replacement.patch rename to Spigot-API-Patches/0025-Add-sender-name-to-commands.yml-replacement.patch diff --git a/Spigot-API-Patches/0025-Add-command-to-reload-permissions.yml-and-require-co.patch b/Spigot-API-Patches/0026-Add-command-to-reload-permissions.yml-and-require-co.patch similarity index 93% rename from Spigot-API-Patches/0025-Add-command-to-reload-permissions.yml-and-require-co.patch rename to Spigot-API-Patches/0026-Add-command-to-reload-permissions.yml-and-require-co.patch index ecf212c902..ebb524d781 100644 --- a/Spigot-API-Patches/0025-Add-command-to-reload-permissions.yml-and-require-co.patch +++ b/Spigot-API-Patches/0026-Add-command-to-reload-permissions.yml-and-require-co.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add command to reload permissions.yml and require confirm to diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index dcb3af5a6d4fedcb805928223e40c74fbea894a0..ffa6be2424774960e36288d02f06d591e30d49d0 100644 +index 22b83b142de97dcba28fa9a49730de7880d0b5d2..945d75525465739dd30610dff985ea0fb0f1c8df 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java -@@ -1626,6 +1626,13 @@ public final class Bukkit { +@@ -1740,6 +1740,13 @@ public final class Bukkit { public static org.bukkit.command.CommandMap getCommandMap() { return server.getCommandMap(); } @@ -24,10 +24,10 @@ index dcb3af5a6d4fedcb805928223e40c74fbea894a0..ffa6be2424774960e36288d02f06d591 @NotNull diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 00738355e42704de583b60833d4fb39a8728e762..7b2eb7b8a77a4ca8ae6e4e8c66597f83627bd199 100644 +index 9ce9b4ce2da6c57c62607502ae2042e30fc26d88..f69c30ebea9c9e9add0b6c97994be0ce64a80ad3 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -1432,4 +1432,6 @@ public interface Server extends PluginMessageRecipient { +@@ -1538,4 +1538,6 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi @NotNull Spigot spigot(); // Spigot end diff --git a/Spigot-API-Patches/0026-Custom-replacement-for-eaten-items.patch b/Spigot-API-Patches/0027-Custom-replacement-for-eaten-items.patch similarity index 100% rename from Spigot-API-Patches/0026-Custom-replacement-for-eaten-items.patch rename to Spigot-API-Patches/0027-Custom-replacement-for-eaten-items.patch diff --git a/Spigot-API-Patches/0027-Entity-AddTo-RemoveFrom-World-Events.patch b/Spigot-API-Patches/0028-Entity-AddTo-RemoveFrom-World-Events.patch similarity index 100% rename from Spigot-API-Patches/0027-Entity-AddTo-RemoveFrom-World-Events.patch rename to Spigot-API-Patches/0028-Entity-AddTo-RemoveFrom-World-Events.patch diff --git a/Spigot-API-Patches/0028-EntityPathfindEvent.patch b/Spigot-API-Patches/0029-EntityPathfindEvent.patch similarity index 100% rename from Spigot-API-Patches/0028-EntityPathfindEvent.patch rename to Spigot-API-Patches/0029-EntityPathfindEvent.patch diff --git a/Spigot-API-Patches/0029-Reduce-thread-synchronization-in-MetadataStoreBase.patch b/Spigot-API-Patches/0030-Reduce-thread-synchronization-in-MetadataStoreBase.patch similarity index 100% rename from Spigot-API-Patches/0029-Reduce-thread-synchronization-in-MetadataStoreBase.patch rename to Spigot-API-Patches/0030-Reduce-thread-synchronization-in-MetadataStoreBase.patch diff --git a/Spigot-API-Patches/0030-Add-MetadataStoreBase.removeAll-Plugin.patch b/Spigot-API-Patches/0031-Add-MetadataStoreBase.removeAll-Plugin.patch similarity index 100% rename from Spigot-API-Patches/0030-Add-MetadataStoreBase.removeAll-Plugin.patch rename to Spigot-API-Patches/0031-Add-MetadataStoreBase.removeAll-Plugin.patch diff --git a/Spigot-API-Patches/0031-Add-PlayerUseUnknownEntityEvent.patch b/Spigot-API-Patches/0032-Add-PlayerUseUnknownEntityEvent.patch similarity index 100% rename from Spigot-API-Patches/0031-Add-PlayerUseUnknownEntityEvent.patch rename to Spigot-API-Patches/0032-Add-PlayerUseUnknownEntityEvent.patch diff --git a/Spigot-API-Patches/0032-Add-handshake-event-to-allow-plugins-to-handle-clien.patch b/Spigot-API-Patches/0033-Add-handshake-event-to-allow-plugins-to-handle-clien.patch similarity index 84% rename from Spigot-API-Patches/0032-Add-handshake-event-to-allow-plugins-to-handle-clien.patch rename to Spigot-API-Patches/0033-Add-handshake-event-to-allow-plugins-to-handle-clien.patch index 9163e5813e..4f347fd156 100644 --- a/Spigot-API-Patches/0032-Add-handshake-event-to-allow-plugins-to-handle-clien.patch +++ b/Spigot-API-Patches/0033-Add-handshake-event-to-allow-plugins-to-handle-clien.patch @@ -7,12 +7,15 @@ Subject: [PATCH] Add handshake event to allow plugins to handle client diff --git a/src/main/java/com/destroystokyo/paper/event/player/PlayerHandshakeEvent.java b/src/main/java/com/destroystokyo/paper/event/player/PlayerHandshakeEvent.java new file mode 100644 -index 0000000000000000000000000000000000000000..f0bb4e31cc25eab2359fa9873bbf960346721701 +index 0000000000000000000000000000000000000000..d67dade3af3fb0f8b7e5c267087abf6320b433e7 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/event/player/PlayerHandshakeEvent.java -@@ -0,0 +1,222 @@ +@@ -0,0 +1,248 @@ +package com.destroystokyo.paper.event.player; + ++import net.kyori.adventure.text.Component; ++import net.kyori.adventure.text.format.NamedTextColor; ++import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer; +import org.apache.commons.lang.Validate; +import org.bukkit.event.Cancellable; +import org.bukkit.event.Event; @@ -40,7 +43,7 @@ index 0000000000000000000000000000000000000000..f0bb4e31cc25eab2359fa9873bbf9603 + @Nullable private UUID uniqueId; + @Nullable private String propertiesJson; + private boolean failed; -+ private String failMessage = "If you wish to use IP forwarding, please enable it in your BungeeCord config as well!"; ++ private Component failMessage = Component.text("If you wish to use IP forwarding, please enable it in your BungeeCord config as well!", NamedTextColor.YELLOW); + + /** + * Creates a new {@link PlayerHandshakeEvent}. @@ -208,7 +211,7 @@ index 0000000000000000000000000000000000000000..f0bb4e31cc25eab2359fa9873bbf9603 + * @return the message to display to the client + */ + @NotNull -+ public String getFailMessage() { ++ public Component failMessage() { + return this.failMessage; + } + @@ -217,9 +220,32 @@ index 0000000000000000000000000000000000000000..f0bb4e31cc25eab2359fa9873bbf9603 + * + * @param failMessage the message to display to the client + */ ++ public void failMessage(@NotNull Component failMessage) { ++ this.failMessage = failMessage; ++ } ++ ++ /** ++ * Gets the message to display to the client when authentication fails. ++ * ++ * @return the message to display to the client ++ * @deprecated use {@link #failMessage()} ++ */ ++ @NotNull ++ @Deprecated ++ public String getFailMessage() { ++ return LegacyComponentSerializer.legacySection().serialize(this.failMessage()); ++ } ++ ++ /** ++ * Sets the message to display to the client when authentication fails. ++ * ++ * @param failMessage the message to display to the client ++ * @deprecated use {@link #failMessage(Component)} ++ */ ++ @Deprecated + public void setFailMessage(@NotNull String failMessage) { + Validate.notEmpty(failMessage, "fail message cannot be null or empty"); -+ this.failMessage = failMessage; ++ this.failMessage(LegacyComponentSerializer.legacySection().deserialize(failMessage)); + } + + @NotNull diff --git a/Spigot-API-Patches/0033-Arrow-pickup-rule-API.patch b/Spigot-API-Patches/0034-Arrow-pickup-rule-API.patch similarity index 100% rename from Spigot-API-Patches/0033-Arrow-pickup-rule-API.patch rename to Spigot-API-Patches/0034-Arrow-pickup-rule-API.patch diff --git a/Spigot-API-Patches/0034-EntityRegainHealthEvent-isFastRegen-API.patch b/Spigot-API-Patches/0035-EntityRegainHealthEvent-isFastRegen-API.patch similarity index 100% rename from Spigot-API-Patches/0034-EntityRegainHealthEvent-isFastRegen-API.patch rename to Spigot-API-Patches/0035-EntityRegainHealthEvent-isFastRegen-API.patch diff --git a/Spigot-API-Patches/0035-LootTable-API.patch b/Spigot-API-Patches/0036-LootTable-API.patch similarity index 100% rename from Spigot-API-Patches/0035-LootTable-API.patch rename to Spigot-API-Patches/0036-LootTable-API.patch diff --git a/Spigot-API-Patches/0036-Add-EntityZapEvent.patch b/Spigot-API-Patches/0037-Add-EntityZapEvent.patch similarity index 100% rename from Spigot-API-Patches/0036-Add-EntityZapEvent.patch rename to Spigot-API-Patches/0037-Add-EntityZapEvent.patch diff --git a/Spigot-API-Patches/0037-Misc-Utils.patch b/Spigot-API-Patches/0038-Misc-Utils.patch similarity index 100% rename from Spigot-API-Patches/0037-Misc-Utils.patch rename to Spigot-API-Patches/0038-Misc-Utils.patch diff --git a/Spigot-API-Patches/0038-Allow-Reloading-of-Command-Aliases.patch b/Spigot-API-Patches/0039-Allow-Reloading-of-Command-Aliases.patch similarity index 93% rename from Spigot-API-Patches/0038-Allow-Reloading-of-Command-Aliases.patch rename to Spigot-API-Patches/0039-Allow-Reloading-of-Command-Aliases.patch index 2f0f0b848f..69796b5859 100644 --- a/Spigot-API-Patches/0038-Allow-Reloading-of-Command-Aliases.patch +++ b/Spigot-API-Patches/0039-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/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index ffa6be2424774960e36288d02f06d591e30d49d0..84ac91aa533f9c3e5c1e9107404fda5ec519ca02 100644 +index 945d75525465739dd30610dff985ea0fb0f1c8df..555ef4c187ce0c83cc29af145694ec9c448d452e 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java -@@ -1633,6 +1633,15 @@ public final class Bukkit { +@@ -1747,6 +1747,15 @@ public final class Bukkit { public static void reloadPermissions() { server.reloadPermissions(); } @@ -26,10 +26,10 @@ index ffa6be2424774960e36288d02f06d591e30d49d0..84ac91aa533f9c3e5c1e9107404fda5e @NotNull diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 7b2eb7b8a77a4ca8ae6e4e8c66597f83627bd199..75800dc49b66c240da92430f1defc9f63966e0b6 100644 +index f69c30ebea9c9e9add0b6c97994be0ce64a80ad3..9d81f25e39d345b797f73855a802b186d77f6d12 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -1434,4 +1434,6 @@ public interface Server extends PluginMessageRecipient { +@@ -1540,4 +1540,6 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi // Spigot end void reloadPermissions(); // Paper diff --git a/Spigot-API-Patches/0039-Add-source-to-PlayerExpChangeEvent.patch b/Spigot-API-Patches/0040-Add-source-to-PlayerExpChangeEvent.patch similarity index 100% rename from Spigot-API-Patches/0039-Add-source-to-PlayerExpChangeEvent.patch rename to Spigot-API-Patches/0040-Add-source-to-PlayerExpChangeEvent.patch diff --git a/Spigot-API-Patches/0040-Add-ProjectileCollideEvent.patch b/Spigot-API-Patches/0041-Add-ProjectileCollideEvent.patch similarity index 100% rename from Spigot-API-Patches/0040-Add-ProjectileCollideEvent.patch rename to Spigot-API-Patches/0041-Add-ProjectileCollideEvent.patch diff --git a/Spigot-API-Patches/0041-Add-String-based-Action-Bar-API.patch b/Spigot-API-Patches/0042-Add-String-based-Action-Bar-API.patch similarity index 71% rename from Spigot-API-Patches/0041-Add-String-based-Action-Bar-API.patch rename to Spigot-API-Patches/0042-Add-String-based-Action-Bar-API.patch index b58a05df4e..cd7d8333ce 100644 --- a/Spigot-API-Patches/0041-Add-String-based-Action-Bar-API.patch +++ b/Spigot-API-Patches/0042-Add-String-based-Action-Bar-API.patch @@ -5,10 +5,18 @@ Subject: [PATCH] Add String based Action Bar API diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index b4874655e167c6459c823d5d79baeffdb690533a..fd235f7ac71b0243d2189e89efb232915991f9ff 100644 +index a7cdc67738dc2b7f9a67118bb0b5372ae16966e7..a94d7fcb841c9ddae7d5521c2a2fed382b4d2aed 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -484,6 +484,33 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -3,6 +3,7 @@ package org.bukkit.entity; + import java.net.InetSocketAddress; + import java.util.UUID; + import com.destroystokyo.paper.Title; // Paper ++import net.kyori.adventure.text.Component; + import org.bukkit.DyeColor; + import org.bukkit.Effect; + import org.bukkit.GameMode; +@@ -606,6 +607,39 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM public void sendMap(@NotNull MapView map); // Paper start @@ -19,7 +27,9 @@ index b4874655e167c6459c823d5d79baeffdb690533a..fd235f7ac71b0243d2189e89efb23291 + * Use Section symbols for legacy color codes to send formatting. + * + * @param message The message to send ++ * @deprecated use {@link #sendActionBar(Component)} + */ ++ @Deprecated + public void sendActionBar(@NotNull String message); + + /** @@ -29,20 +39,24 @@ index b4874655e167c6459c823d5d79baeffdb690533a..fd235f7ac71b0243d2189e89efb23291 + * + * @param alternateChar Alternate symbol such as '&' + * @param message The message to send ++ * @deprecated use {@link #sendActionBar(Component)} + */ ++ @Deprecated + public void sendActionBar(char alternateChar, @NotNull String message); + + /** + * Sends an Action Bar message to the client. + * + * @param message The components to send ++ * @deprecated use {@link #sendActionBar(Component)} + */ ++ @Deprecated + public void sendActionBar(@NotNull net.md_5.bungee.api.chat.BaseComponent... message); + /** * Sends the component to the player * -@@ -507,9 +534,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -633,9 +667,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM /** * Sends an array of components as a single message to the specified screen position of this player * @@ -54,27 +68,19 @@ index b4874655e167c6459c823d5d79baeffdb690533a..fd235f7ac71b0243d2189e89efb23291 public default void sendMessage(net.md_5.bungee.api.ChatMessageType position, net.md_5.bungee.api.chat.BaseComponent... components) { spigot().sendMessage(position, components); } -@@ -1593,9 +1622,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1752,6 +1788,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM /** * Sends the component to the specified screen position of this player * + * @deprecated This is unlikely the API you want to use. See {@link #sendActionBar(String)} for a more proper Action Bar API. This deprecated API may send unsafe items to the client. * @param position the screen position * @param component the components to send - */ -+ @Deprecated - public void sendMessage(@NotNull net.md_5.bungee.api.ChatMessageType position, @NotNull net.md_5.bungee.api.chat.BaseComponent component) { - throw new UnsupportedOperationException("Not supported yet."); - } -@@ -1603,9 +1634,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM + * @deprecated use {@code sendMessage} methods that accept {@link net.kyori.adventure.text.Component} +@@ -1764,6 +1801,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM /** * Sends an array of components as a single message to the specified screen position of this player * + * @deprecated This is unlikely the API you want to use. See {@link #sendActionBar(String)} for a more proper Action Bar API. This deprecated API may send unsafe items to the client. * @param position the screen position * @param components the components to send - */ -+ @Deprecated - public void sendMessage(@NotNull net.md_5.bungee.api.ChatMessageType position, @NotNull net.md_5.bungee.api.chat.BaseComponent... components) { - throw new UnsupportedOperationException("Not supported yet."); - } + * @deprecated use {@code sendMessage} methods that accept {@link net.kyori.adventure.text.Component} diff --git a/Spigot-API-Patches/0042-Add-API-methods-to-control-if-armour-stands-can-move.patch b/Spigot-API-Patches/0043-Add-API-methods-to-control-if-armour-stands-can-move.patch similarity index 100% rename from Spigot-API-Patches/0042-Add-API-methods-to-control-if-armour-stands-can-move.patch rename to Spigot-API-Patches/0043-Add-API-methods-to-control-if-armour-stands-can-move.patch diff --git a/Spigot-API-Patches/0043-IllegalPacketEvent.patch b/Spigot-API-Patches/0044-IllegalPacketEvent.patch similarity index 100% rename from Spigot-API-Patches/0043-IllegalPacketEvent.patch rename to Spigot-API-Patches/0044-IllegalPacketEvent.patch diff --git a/Spigot-API-Patches/0044-Fireworks-API-s.patch b/Spigot-API-Patches/0045-Fireworks-API-s.patch similarity index 100% rename from Spigot-API-Patches/0044-Fireworks-API-s.patch rename to Spigot-API-Patches/0045-Fireworks-API-s.patch diff --git a/Spigot-API-Patches/0045-PlayerTeleportEndGatewayEvent.patch b/Spigot-API-Patches/0046-PlayerTeleportEndGatewayEvent.patch similarity index 100% rename from Spigot-API-Patches/0045-PlayerTeleportEndGatewayEvent.patch rename to Spigot-API-Patches/0046-PlayerTeleportEndGatewayEvent.patch diff --git a/Spigot-API-Patches/0046-Provide-E-TE-Chunk-count-stat-methods.patch b/Spigot-API-Patches/0047-Provide-E-TE-Chunk-count-stat-methods.patch similarity index 88% rename from Spigot-API-Patches/0046-Provide-E-TE-Chunk-count-stat-methods.patch rename to Spigot-API-Patches/0047-Provide-E-TE-Chunk-count-stat-methods.patch index 220a8e621d..fc838a6f02 100644 --- a/Spigot-API-Patches/0046-Provide-E-TE-Chunk-count-stat-methods.patch +++ b/Spigot-API-Patches/0047-Provide-E-TE-Chunk-count-stat-methods.patch @@ -7,12 +7,12 @@ Provides counts without the ineffeciency of using .getEntities().size() which creates copy of the collections. diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index b8a33ac504da73ec990550bdd23e4548f6ccba95..5432b2713ab110a1d41bdf7372a5807426ab5443 100644 +index 6b5dbe4ea711807a1944cfe2aae2ce415d4f2638..789e070f6aee83e4b6426def784e05df98e1bc65 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java @@ -40,6 +40,33 @@ import org.jetbrains.annotations.Nullable; */ - public interface World extends PluginMessageRecipient, Metadatable { + public interface World extends PluginMessageRecipient, Metadatable, net.kyori.adventure.audience.ForwardingAudience { // Paper + // Paper start + /** diff --git a/Spigot-API-Patches/0047-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch b/Spigot-API-Patches/0048-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch similarity index 100% rename from Spigot-API-Patches/0047-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch rename to Spigot-API-Patches/0048-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch diff --git a/Spigot-API-Patches/0048-Expose-WorldBorder-isInBounds-Location-check.patch b/Spigot-API-Patches/0049-Expose-WorldBorder-isInBounds-Location-check.patch similarity index 100% rename from Spigot-API-Patches/0048-Expose-WorldBorder-isInBounds-Location-check.patch rename to Spigot-API-Patches/0049-Expose-WorldBorder-isInBounds-Location-check.patch diff --git a/Spigot-API-Patches/0049-Add-configuration-option-to-prevent-player-names-fro.patch b/Spigot-API-Patches/0050-Add-configuration-option-to-prevent-player-names-fro.patch similarity index 86% rename from Spigot-API-Patches/0049-Add-configuration-option-to-prevent-player-names-fro.patch rename to Spigot-API-Patches/0050-Add-configuration-option-to-prevent-player-names-fro.patch index 81f833af14..929cd00666 100644 --- a/Spigot-API-Patches/0049-Add-configuration-option-to-prevent-player-names-fro.patch +++ b/Spigot-API-Patches/0050-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/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index 84ac91aa533f9c3e5c1e9107404fda5ec519ca02..777352a820b21bc013b671b62f89ae4c6418e3cb 100644 +index 555ef4c187ce0c83cc29af145694ec9c448d452e..2527e896a4409326ea2612723b829696d44fc199 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java -@@ -1642,6 +1642,16 @@ public final class Bukkit { +@@ -1756,6 +1756,16 @@ public final class Bukkit { public static boolean reloadCommandAliases() { return server.reloadCommandAliases(); } @@ -27,10 +27,10 @@ index 84ac91aa533f9c3e5c1e9107404fda5ec519ca02..777352a820b21bc013b671b62f89ae4c @NotNull diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 75800dc49b66c240da92430f1defc9f63966e0b6..02c1d054744cb0564c6593938af278e6388adfb4 100644 +index 9d81f25e39d345b797f73855a802b186d77f6d12..7d94242b2f8ecb537b3140f9d6f706d3e266c456 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -1436,4 +1436,14 @@ public interface Server extends PluginMessageRecipient { +@@ -1542,4 +1542,14 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi void reloadPermissions(); // Paper boolean reloadCommandAliases(); // Paper diff --git a/Spigot-API-Patches/0050-Fix-upstream-javadoc-warnings-and-errors.patch b/Spigot-API-Patches/0050-Fix-upstream-javadoc-warnings-and-errors.patch deleted file mode 100644 index db9e23ffb2..0000000000 --- a/Spigot-API-Patches/0050-Fix-upstream-javadoc-warnings-and-errors.patch +++ /dev/null @@ -1,102 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Zach Brown -Date: Sat, 10 Jun 2017 16:59:40 -0500 -Subject: [PATCH] Fix upstream javadoc warnings and errors - -Upstream still refuses to use Java 8 with the API so they are likely unaware these are even issues. - -diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index fd235f7ac71b0243d2189e89efb232915991f9ff..b422abde1a504aa36c726e1c0597da11c1b6afd0 100644 ---- a/src/main/java/org/bukkit/entity/Player.java -+++ b/src/main/java/org/bukkit/entity/Player.java -@@ -499,7 +499,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM - * - * Use supplied alternative character to the section symbol to represent legacy color codes. - * -- * @param alternateChar Alternate symbol such as '&' -+ * @param alternateChar Alternate symbol such as '&' - * @param message The message to send - */ - public void sendActionBar(char alternateChar, @NotNull String message); -@@ -573,6 +573,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM - /** - * Update the subtitle of titles displayed to the player - * -+ * @param subtitle Subtitle to set - * @deprecated Use {@link #updateTitle(Title)} - */ - @Deprecated -@@ -581,6 +582,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM - /** - * Update the subtitle of titles displayed to the player - * -+ * @param subtitle Subtitle to set - * @deprecated Use {@link #updateTitle(Title)} - */ - @Deprecated -@@ -589,6 +591,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM - /** - * Show the given title to the player, along with the last subtitle set, using the last set times - * -+ * @param title Title to set - * @deprecated Use {@link #sendTitle(Title)} or {@link #updateTitle(Title)} - */ - @Deprecated -@@ -597,6 +600,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM - /** - * Show the given title to the player, along with the last subtitle set, using the last set times - * -+ * @param title Title to set - * @deprecated Use {@link #sendTitle(Title)} or {@link #updateTitle(Title)} - */ - @Deprecated -diff --git a/src/main/java/org/bukkit/event/player/PlayerBedLeaveEvent.java b/src/main/java/org/bukkit/event/player/PlayerBedLeaveEvent.java -index 1cb70b5c8776863f44f1c4cdde152c35cb51edb5..da26531c42abb074c805352e0f8467a970195a01 100644 ---- a/src/main/java/org/bukkit/event/player/PlayerBedLeaveEvent.java -+++ b/src/main/java/org/bukkit/event/player/PlayerBedLeaveEvent.java -@@ -43,7 +43,9 @@ public class PlayerBedLeaveEvent extends PlayerEvent implements Cancellable { - * {@link Player#setBedSpawnLocation(Location)}. - * - * @return true if the spawn location will be changed -+ * @deprecated NOT IMPLEMENTED - */ -+ @Deprecated // Paper - public boolean shouldSetSpawnLocation() { - return setBedSpawn; - } -@@ -59,7 +61,9 @@ public class PlayerBedLeaveEvent extends PlayerEvent implements Cancellable { - * {@link Player#setBedSpawnLocation(Location)}. - * - * @param setBedSpawn true to change the new spawn location -+ * @deprecated NOT IMPLEMENTED - */ -+ @Deprecated // Paper - public void setSpawnLocation(boolean setBedSpawn) { - this.setBedSpawn = setBedSpawn; - } -diff --git a/src/main/java/org/bukkit/event/player/PlayerMoveEvent.java b/src/main/java/org/bukkit/event/player/PlayerMoveEvent.java -index 1b2267f4e8ebded198773ec80e2bff2c861c7084..1a58734d919fae247eeb85dd785fd59990856505 100644 ---- a/src/main/java/org/bukkit/event/player/PlayerMoveEvent.java -+++ b/src/main/java/org/bukkit/event/player/PlayerMoveEvent.java -@@ -78,7 +78,7 @@ public class PlayerMoveEvent extends PlayerEvent implements Cancellable { - * - * @return Location the player moved to - */ -- @Nullable -+ @NotNull // Paper - public Location getTo() { - return to; - } -diff --git a/src/main/java/org/bukkit/inventory/PlayerInventory.java b/src/main/java/org/bukkit/inventory/PlayerInventory.java -index 91afd844dafec4ed9ab9e2e16b220ffbd35e7495..1e45c9078ffffe9d3c25538fdd433780ae751270 100644 ---- a/src/main/java/org/bukkit/inventory/PlayerInventory.java -+++ b/src/main/java/org/bukkit/inventory/PlayerInventory.java -@@ -106,7 +106,7 @@ public interface PlayerInventory extends Inventory { - * - * @return the ItemStack in the given slot - */ -- @NotNull -+ @Nullable - public ItemStack getItem(@NotNull EquipmentSlot slot); - - /** diff --git a/Spigot-API-Patches/0051-Fix-upstream-javadoc-warnings-and-errors.patch b/Spigot-API-Patches/0051-Fix-upstream-javadoc-warnings-and-errors.patch new file mode 100644 index 0000000000..bc4557c69b --- /dev/null +++ b/Spigot-API-Patches/0051-Fix-upstream-javadoc-warnings-and-errors.patch @@ -0,0 +1,46 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Zach Brown +Date: Sat, 10 Jun 2017 16:59:40 -0500 +Subject: [PATCH] Fix upstream javadoc warnings and errors + +Upstream still refuses to use Java 8 with the API so they are likely unaware these are even issues. + +diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java +index a94d7fcb841c9ddae7d5521c2a2fed382b4d2aed..9cf7adf244335ac7dccbdf11f605a8c6910f7414 100644 +--- a/src/main/java/org/bukkit/entity/Player.java ++++ b/src/main/java/org/bukkit/entity/Player.java +@@ -624,7 +624,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM + * + * Use supplied alternative character to the section symbol to represent legacy color codes. + * +- * @param alternateChar Alternate symbol such as '&' ++ * @param alternateChar Alternate symbol such as '&' + * @param message The message to send + * @deprecated use {@link #sendActionBar(Component)} + */ +diff --git a/src/main/java/org/bukkit/event/player/PlayerMoveEvent.java b/src/main/java/org/bukkit/event/player/PlayerMoveEvent.java +index 1b2267f4e8ebded198773ec80e2bff2c861c7084..1a58734d919fae247eeb85dd785fd59990856505 100644 +--- a/src/main/java/org/bukkit/event/player/PlayerMoveEvent.java ++++ b/src/main/java/org/bukkit/event/player/PlayerMoveEvent.java +@@ -78,7 +78,7 @@ public class PlayerMoveEvent extends PlayerEvent implements Cancellable { + * + * @return Location the player moved to + */ +- @Nullable ++ @NotNull // Paper + public Location getTo() { + return to; + } +diff --git a/src/main/java/org/bukkit/inventory/PlayerInventory.java b/src/main/java/org/bukkit/inventory/PlayerInventory.java +index 91afd844dafec4ed9ab9e2e16b220ffbd35e7495..1e45c9078ffffe9d3c25538fdd433780ae751270 100644 +--- a/src/main/java/org/bukkit/inventory/PlayerInventory.java ++++ b/src/main/java/org/bukkit/inventory/PlayerInventory.java +@@ -106,7 +106,7 @@ public interface PlayerInventory extends Inventory { + * + * @return the ItemStack in the given slot + */ +- @NotNull ++ @Nullable + public ItemStack getItem(@NotNull EquipmentSlot slot); + + /** diff --git a/Spigot-API-Patches/0051-Item-canEntityPickup.patch b/Spigot-API-Patches/0052-Item-canEntityPickup.patch similarity index 100% rename from Spigot-API-Patches/0051-Item-canEntityPickup.patch rename to Spigot-API-Patches/0052-Item-canEntityPickup.patch diff --git a/Spigot-API-Patches/0052-PlayerPickupItemEvent-setFlyAtPlayer.patch b/Spigot-API-Patches/0053-PlayerPickupItemEvent-setFlyAtPlayer.patch similarity index 100% rename from Spigot-API-Patches/0052-PlayerPickupItemEvent-setFlyAtPlayer.patch rename to Spigot-API-Patches/0053-PlayerPickupItemEvent-setFlyAtPlayer.patch diff --git a/Spigot-API-Patches/0053-PlayerAttemptPickupItemEvent.patch b/Spigot-API-Patches/0054-PlayerAttemptPickupItemEvent.patch similarity index 100% rename from Spigot-API-Patches/0053-PlayerAttemptPickupItemEvent.patch rename to Spigot-API-Patches/0054-PlayerAttemptPickupItemEvent.patch diff --git a/Spigot-API-Patches/0054-Add-UnknownCommandEvent.patch b/Spigot-API-Patches/0055-Add-UnknownCommandEvent.patch similarity index 62% rename from Spigot-API-Patches/0054-Add-UnknownCommandEvent.patch rename to Spigot-API-Patches/0055-Add-UnknownCommandEvent.patch index 6cb95e95c4..353aa59450 100644 --- a/Spigot-API-Patches/0054-Add-UnknownCommandEvent.patch +++ b/Spigot-API-Patches/0055-Add-UnknownCommandEvent.patch @@ -6,12 +6,14 @@ Subject: [PATCH] Add UnknownCommandEvent diff --git a/src/main/java/org/bukkit/event/command/UnknownCommandEvent.java b/src/main/java/org/bukkit/event/command/UnknownCommandEvent.java new file mode 100644 -index 0000000000000000000000000000000000000000..251342c3cc6204f47ef1efb5724302a776359f4d +index 0000000000000000000000000000000000000000..4643b7e640e5c1b53de8ee575b3a760fa9b1d2e8 --- /dev/null +++ b/src/main/java/org/bukkit/event/command/UnknownCommandEvent.java -@@ -0,0 +1,82 @@ +@@ -0,0 +1,114 @@ +package org.bukkit.event.command; + ++import net.kyori.adventure.text.Component; ++import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer; +import org.bukkit.command.CommandSender; +import org.bukkit.event.HandlerList; +import org.bukkit.event.Event; @@ -26,9 +28,14 @@ index 0000000000000000000000000000000000000000..251342c3cc6204f47ef1efb5724302a7 + private static final HandlerList handlers = new HandlerList(); + @NotNull private CommandSender sender; + @NotNull private String commandLine; -+ @Nullable private String message; ++ @Nullable private Component message; + ++ @Deprecated + public UnknownCommandEvent(@NotNull final CommandSender sender, @NotNull final String commandLine, @Nullable final String message) { ++ this(sender, commandLine, message == null ? null : LegacyComponentSerializer.legacySection().deserialize(message)); ++ } ++ ++ public UnknownCommandEvent(@NotNull final CommandSender sender, @NotNull final String commandLine, @Nullable final Component message) { + super(false); + this.sender = sender; + this.commandLine = commandLine; @@ -62,12 +69,37 @@ index 0000000000000000000000000000000000000000..251342c3cc6204f47ef1efb5724302a7 + *

+ * + * @return Unknown command message ++ * @deprecated use {@link #message()} + */ + @Nullable ++ @Deprecated + public String getMessage() { -+ return message; ++ return this.message == null ? null : LegacyComponentSerializer.legacySection().serialize(this.message); + } + ++ /** ++ * Sets message that will be returned ++ *

++ * Set to null to avoid any message being sent ++ * ++ * @param message the message to be returned, or null ++ * @deprecated use {@link #message(Component)} ++ */ ++ @Deprecated ++ public void setMessage(@Nullable String message) { ++ this.message(message == null ? null : LegacyComponentSerializer.legacySection().deserialize(message)); ++ } ++ ++ /** ++ * Gets message that will be returned ++ *

++ * ++ * @return Unknown command message ++ */ ++ @Nullable ++ public Component message() { ++ return this.message; ++ } + + /** + * Sets message that will be returned @@ -76,7 +108,7 @@ index 0000000000000000000000000000000000000000..251342c3cc6204f47ef1efb5724302a7 + * + * @param message the message to be returned, or null + */ -+ public void setMessage(@Nullable String message) { ++ public void message(@Nullable Component message) { + this.message = message; + } + diff --git a/Spigot-API-Patches/0055-Basic-PlayerProfile-API.patch b/Spigot-API-Patches/0056-Basic-PlayerProfile-API.patch similarity index 97% rename from Spigot-API-Patches/0055-Basic-PlayerProfile-API.patch rename to Spigot-API-Patches/0056-Basic-PlayerProfile-API.patch index f8607d60ba..96944d3449 100644 --- a/Spigot-API-Patches/0055-Basic-PlayerProfile-API.patch +++ b/Spigot-API-Patches/0056-Basic-PlayerProfile-API.patch @@ -267,10 +267,10 @@ index 0000000000000000000000000000000000000000..7b3b6ef533d32169fbeca389bd61cfc6 + } +} diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index 777352a820b21bc013b671b62f89ae4c6418e3cb..c7019397923f9f9349bb5fdd15455f2dbf99bfd5 100644 +index 2527e896a4409326ea2612723b829696d44fc199..f5d3a7370390871d1b6075f32846d1a942b05b7f 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java -@@ -1652,6 +1652,40 @@ public final class Bukkit { +@@ -1766,6 +1766,40 @@ public final class Bukkit { public static boolean suggestPlayerNamesWhenNullTabCompletions() { return server.suggestPlayerNamesWhenNullTabCompletions(); } @@ -312,10 +312,10 @@ index 777352a820b21bc013b671b62f89ae4c6418e3cb..c7019397923f9f9349bb5fdd15455f2d @NotNull diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 02c1d054744cb0564c6593938af278e6388adfb4..66d0a3c6de2ea3c0a2fe3cd160a52f0cabe58ef3 100644 +index 7d94242b2f8ecb537b3140f9d6f706d3e266c456..38d138b217734e598581ed14065ff2015135ee9a 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -1445,5 +1445,33 @@ public interface Server extends PluginMessageRecipient { +@@ -1551,5 +1551,33 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi * @return true if player names should be suggested */ boolean suggestPlayerNamesWhenNullTabCompletions(); diff --git a/Spigot-API-Patches/0056-Shoulder-Entities-Release-API.patch b/Spigot-API-Patches/0057-Shoulder-Entities-Release-API.patch similarity index 100% rename from Spigot-API-Patches/0056-Shoulder-Entities-Release-API.patch rename to Spigot-API-Patches/0057-Shoulder-Entities-Release-API.patch diff --git a/Spigot-API-Patches/0057-Profile-Lookup-Events.patch b/Spigot-API-Patches/0058-Profile-Lookup-Events.patch similarity index 100% rename from Spigot-API-Patches/0057-Profile-Lookup-Events.patch rename to Spigot-API-Patches/0058-Profile-Lookup-Events.patch diff --git a/Spigot-API-Patches/0058-Entity-fromMobSpawner.patch b/Spigot-API-Patches/0059-Entity-fromMobSpawner.patch similarity index 81% rename from Spigot-API-Patches/0058-Entity-fromMobSpawner.patch rename to Spigot-API-Patches/0059-Entity-fromMobSpawner.patch index 6c7a3ee9a5..6912236f76 100644 --- a/Spigot-API-Patches/0058-Entity-fromMobSpawner.patch +++ b/Spigot-API-Patches/0059-Entity-fromMobSpawner.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Entity#fromMobSpawner() diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java -index 7c3100d44ca42fe9c9ffedad321be9f2e446491a..a73af8caad4014fecbca9c1c09cb519cb1fc3eb1 100644 +index e9d0d507b47b0347b975b1a83f5ae70dca5587b8..feb9507a972bf797144a01adeeaac83ec2bd165a 100644 --- a/src/main/java/org/bukkit/entity/Entity.java +++ b/src/main/java/org/bukkit/entity/Entity.java -@@ -613,5 +613,12 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent +@@ -619,5 +619,12 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent */ @Nullable Location getOrigin(); diff --git a/Spigot-API-Patches/0059-Improve-the-Saddle-API-for-Horses.patch b/Spigot-API-Patches/0060-Improve-the-Saddle-API-for-Horses.patch similarity index 100% rename from Spigot-API-Patches/0059-Improve-the-Saddle-API-for-Horses.patch rename to Spigot-API-Patches/0060-Improve-the-Saddle-API-for-Horses.patch diff --git a/Spigot-API-Patches/0060-ensureServerConversions-API.patch b/Spigot-API-Patches/0061-ensureServerConversions-API.patch similarity index 67% rename from Spigot-API-Patches/0060-ensureServerConversions-API.patch rename to Spigot-API-Patches/0061-ensureServerConversions-API.patch index 5ecaed96cd..56030876f6 100644 --- a/Spigot-API-Patches/0060-ensureServerConversions-API.patch +++ b/Spigot-API-Patches/0061-ensureServerConversions-API.patch @@ -7,14 +7,14 @@ This will take a Bukkit ItemStack and run it through any conversions a server pr to ensure it meets latest minecraft expectations. diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java -index 4ff149fd98895dd8ba45939a37c223b1f8d7281f..bb3f7cdc13dc015f88d3eaf5997f391528599d2a 100644 +index 3dba4c361993e143e511b4f108ac0b444a84d964..30ab5d38197bccfc06f6f5554b162f8bdbfe2a45 100644 --- a/src/main/java/org/bukkit/inventory/ItemFactory.java +++ b/src/main/java/org/bukkit/inventory/ItemFactory.java -@@ -141,4 +141,17 @@ public interface ItemFactory { - @Deprecated +@@ -151,5 +151,17 @@ public interface ItemFactory { + */ @NotNull - Material updateMaterial(@NotNull final ItemMeta meta, @NotNull final Material material) throws IllegalArgumentException; -+ // Paper start + net.kyori.adventure.text.event.HoverEvent asHoverEvent(final @NotNull ItemStack item, final @NotNull java.util.function.UnaryOperator op); ++ + /** + * Minecart updates are converting simple item stacks into more complex NBT oriented Item Stacks. + * @@ -26,13 +26,13 @@ index 4ff149fd98895dd8ba45939a37c223b1f8d7281f..bb3f7cdc13dc015f88d3eaf5997f3915 + */ + @NotNull + ItemStack ensureServerConversions(@NotNull ItemStack item); -+ // Paper end + // Paper end } diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java -index f70a6a22b85ff0da76e67e9b223ad4e0b020b5c4..07aa65d1a2056422b7b5ec98be970d5b064f3b81 100644 +index 4b20b557eaa958cf1ad1baf8d6cc17f38b180ff1..c31f667c466ba80bd88ae560d14dbd18a84118b4 100644 --- a/src/main/java/org/bukkit/inventory/ItemStack.java +++ b/src/main/java/org/bukkit/inventory/ItemStack.java -@@ -536,7 +536,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable { +@@ -536,7 +536,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, net.kyor } } @@ -41,12 +41,11 @@ index f70a6a22b85ff0da76e67e9b223ad4e0b020b5c4..07aa65d1a2056422b7b5ec98be970d5b } /** -@@ -595,4 +595,19 @@ public class ItemStack implements Cloneable, ConfigurationSerializable { - - return true; +@@ -602,5 +602,18 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, net.kyor + public net.kyori.adventure.text.event.HoverEvent asHoverEvent(final @NotNull java.util.function.UnaryOperator op) { + return org.bukkit.Bukkit.getServer().getItemFactory().asHoverEvent(this, op); } + -+ // Paper start + /** + * Minecart updates are converting simple item stacks into more complex NBT oriented Item Stacks. + * @@ -59,5 +58,5 @@ index f70a6a22b85ff0da76e67e9b223ad4e0b020b5c4..07aa65d1a2056422b7b5ec98be970d5b + public ItemStack ensureServerConversions() { + return Bukkit.getServer().getItemFactory().ensureServerConversions(this); + } -+ // Paper end + // Paper end } diff --git a/Spigot-API-Patches/0061-Add-getI18NDisplayName-API.patch b/Spigot-API-Patches/0062-Add-getI18NDisplayName-API.patch similarity index 84% rename from Spigot-API-Patches/0061-Add-getI18NDisplayName-API.patch rename to Spigot-API-Patches/0062-Add-getI18NDisplayName-API.patch index 3964a1e0f5..a655a8a501 100644 --- a/Spigot-API-Patches/0061-Add-getI18NDisplayName-API.patch +++ b/Spigot-API-Patches/0062-Add-getI18NDisplayName-API.patch @@ -8,10 +8,10 @@ Currently the server only supports the English language. To override this, You must replace the language file embedded in the server jar. diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java -index bb3f7cdc13dc015f88d3eaf5997f391528599d2a..3cada34873e6da92363c8d920f3bbbd0670a32e0 100644 +index 30ab5d38197bccfc06f6f5554b162f8bdbfe2a45..3578f491a053154789ad696e93c70fdde74912e6 100644 --- a/src/main/java/org/bukkit/inventory/ItemFactory.java +++ b/src/main/java/org/bukkit/inventory/ItemFactory.java -@@ -153,5 +153,16 @@ public interface ItemFactory { +@@ -163,5 +163,16 @@ public interface ItemFactory { */ @NotNull ItemStack ensureServerConversions(@NotNull ItemStack item); @@ -29,10 +29,10 @@ index bb3f7cdc13dc015f88d3eaf5997f391528599d2a..3cada34873e6da92363c8d920f3bbbd0 // Paper end } diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java -index 07aa65d1a2056422b7b5ec98be970d5b064f3b81..e9ba311522a50572e6f1cb4554ba8e24a55cbb8a 100644 +index c31f667c466ba80bd88ae560d14dbd18a84118b4..77d6b2ed68d8ce30b5cadb156941d2d1f7dcf5b1 100644 --- a/src/main/java/org/bukkit/inventory/ItemStack.java +++ b/src/main/java/org/bukkit/inventory/ItemStack.java -@@ -609,5 +609,17 @@ public class ItemStack implements Cloneable, ConfigurationSerializable { +@@ -615,5 +615,17 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, net.kyor public ItemStack ensureServerConversions() { return Bukkit.getServer().getItemFactory().ensureServerConversions(this); } diff --git a/Spigot-API-Patches/0062-ProfileWhitelistVerifyEvent.patch b/Spigot-API-Patches/0063-ProfileWhitelistVerifyEvent.patch similarity index 75% rename from Spigot-API-Patches/0062-ProfileWhitelistVerifyEvent.patch rename to Spigot-API-Patches/0063-ProfileWhitelistVerifyEvent.patch index 041a3ca81f..9bf74b4d3e 100644 --- a/Spigot-API-Patches/0062-ProfileWhitelistVerifyEvent.patch +++ b/Spigot-API-Patches/0063-ProfileWhitelistVerifyEvent.patch @@ -9,10 +9,10 @@ Allows you to do dynamic whitelisting and change of kick message diff --git a/src/main/java/com/destroystokyo/paper/event/profile/ProfileWhitelistVerifyEvent.java b/src/main/java/com/destroystokyo/paper/event/profile/ProfileWhitelistVerifyEvent.java new file mode 100644 -index 0000000000000000000000000000000000000000..b1017628967f40db9766bc7cf85a488535e84b9e +index 0000000000000000000000000000000000000000..c6f5e2b5459368ad1e4db9929ca14568a25793fa --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/event/profile/ProfileWhitelistVerifyEvent.java -@@ -0,0 +1,117 @@ +@@ -0,0 +1,142 @@ +/* + * Copyright (c) 2017 - Daniel Ennis (Aikar) - MIT License + * @@ -39,6 +39,8 @@ index 0000000000000000000000000000000000000000..b1017628967f40db9766bc7cf85a4885 +package com.destroystokyo.paper.event.profile; + +import com.destroystokyo.paper.profile.PlayerProfile; ++import net.kyori.adventure.text.Component; ++import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer; +import org.bukkit.event.Event; +import org.bukkit.event.HandlerList; +import org.jetbrains.annotations.NotNull; @@ -49,7 +51,6 @@ index 0000000000000000000000000000000000000000..b1017628967f40db9766bc7cf85a4885 + * + * Plugins may override/control the servers whitelist with this event, + * and dynamically change the kick message. -+ * + */ +public class ProfileWhitelistVerifyEvent extends Event { + private static final HandlerList handlers = new HandlerList(); @@ -57,9 +58,14 @@ index 0000000000000000000000000000000000000000..b1017628967f40db9766bc7cf85a4885 + private final boolean whitelistEnabled; + private boolean whitelisted; + private final boolean isOp; -+ @Nullable private String kickMessage; ++ @Nullable private Component kickMessage; + ++ @Deprecated + public ProfileWhitelistVerifyEvent(@NotNull final PlayerProfile profile, boolean whitelistEnabled, boolean whitelisted, boolean isOp, @Nullable String kickMessage) { ++ this(profile, whitelistEnabled, whitelisted, isOp, kickMessage == null ? null : LegacyComponentSerializer.legacySection().deserialize(kickMessage)); ++ } ++ ++ public ProfileWhitelistVerifyEvent(@NotNull final PlayerProfile profile, boolean whitelistEnabled, boolean whitelisted, boolean isOp, @Nullable Component kickMessage) { + this.profile = profile; + this.whitelistEnabled = whitelistEnabled; + this.whitelisted = whitelisted; @@ -69,16 +75,35 @@ index 0000000000000000000000000000000000000000..b1017628967f40db9766bc7cf85a4885 + + /** + * @return the currently planned message to send to the user if they are not whitelisted ++ * @deprecated use {@link #kickMessage()} + */ ++ @Deprecated + @Nullable + public String getKickMessage() { -+ return kickMessage; ++ return this.kickMessage == null ? null : LegacyComponentSerializer.legacySection().serialize(kickMessage); ++ } ++ ++ /** ++ * @param kickMessage The message to send to the player on kick if not whitelisted. May set to null to use the server configured default ++ * @deprecated Use {@link #kickMessage(Component)} ++ */ ++ @Deprecated ++ public void setKickMessage(@Nullable String kickMessage) { ++ this.kickMessage(kickMessage == null ? null : LegacyComponentSerializer.legacySection().deserialize(kickMessage)); ++ } ++ ++ /** ++ * @return the currently planned message to send to the user if they are not whitelisted ++ */ ++ @Nullable ++ public Component kickMessage() { ++ return this.kickMessage; + } + + /** + * @param kickMessage The message to send to the player on kick if not whitelisted. May set to null to use the server configured default + */ -+ public void setKickMessage(@Nullable String kickMessage) { ++ public void kickMessage(@Nullable Component kickMessage) { + this.kickMessage = kickMessage; + } + diff --git a/Spigot-API-Patches/0063-Make-plugins-list-alphabetical.patch b/Spigot-API-Patches/0064-Make-plugins-list-alphabetical.patch similarity index 100% rename from Spigot-API-Patches/0063-Make-plugins-list-alphabetical.patch rename to Spigot-API-Patches/0064-Make-plugins-list-alphabetical.patch diff --git a/Spigot-API-Patches/0064-LivingEntity-setKiller.patch b/Spigot-API-Patches/0065-LivingEntity-setKiller.patch similarity index 100% rename from Spigot-API-Patches/0064-LivingEntity-setKiller.patch rename to Spigot-API-Patches/0065-LivingEntity-setKiller.patch diff --git a/Spigot-API-Patches/0065-Handle-plugin-prefixes-in-implementation-logging-con.patch b/Spigot-API-Patches/0066-Handle-plugin-prefixes-in-implementation-logging-con.patch similarity index 100% rename from Spigot-API-Patches/0065-Handle-plugin-prefixes-in-implementation-logging-con.patch rename to Spigot-API-Patches/0066-Handle-plugin-prefixes-in-implementation-logging-con.patch diff --git a/Spigot-API-Patches/0066-Allow-plugins-to-use-SLF4J-for-logging.patch b/Spigot-API-Patches/0067-Allow-plugins-to-use-SLF4J-for-logging.patch similarity index 94% rename from Spigot-API-Patches/0066-Allow-plugins-to-use-SLF4J-for-logging.patch rename to Spigot-API-Patches/0067-Allow-plugins-to-use-SLF4J-for-logging.patch index e81c853587..efe476bac5 100644 --- a/Spigot-API-Patches/0066-Allow-plugins-to-use-SLF4J-for-logging.patch +++ b/Spigot-API-Patches/0067-Allow-plugins-to-use-SLF4J-for-logging.patch @@ -14,10 +14,10 @@ it without having to shade it in the plugin and going through several layers of logging abstraction. diff --git a/pom.xml b/pom.xml -index e040e0e37276295a0b7404357679e80fbbb618a3..7747189d49727eea039f3994e186b34480025144 100644 +index aa893ec821f7c54ecf430b4b95aa52ccbfebf898..78d13b0487ea6876b19e07d186f273dedefda9bf 100644 --- a/pom.xml +++ b/pom.xml -@@ -109,6 +109,13 @@ +@@ -131,6 +131,13 @@ 20.1.0 provided diff --git a/Spigot-API-Patches/0067-Add-workaround-for-plugins-modifying-the-parent-of-t.patch b/Spigot-API-Patches/0068-Add-workaround-for-plugins-modifying-the-parent-of-t.patch similarity index 100% rename from Spigot-API-Patches/0067-Add-workaround-for-plugins-modifying-the-parent-of-t.patch rename to Spigot-API-Patches/0068-Add-workaround-for-plugins-modifying-the-parent-of-t.patch diff --git a/Spigot-API-Patches/0068-Add-PlayerJumpEvent.patch b/Spigot-API-Patches/0069-Add-PlayerJumpEvent.patch similarity index 100% rename from Spigot-API-Patches/0068-Add-PlayerJumpEvent.patch rename to Spigot-API-Patches/0069-Add-PlayerJumpEvent.patch diff --git a/Spigot-API-Patches/0069-Expose-client-protocol-version-and-virtual-host.patch b/Spigot-API-Patches/0070-Expose-client-protocol-version-and-virtual-host.patch similarity index 84% rename from Spigot-API-Patches/0069-Expose-client-protocol-version-and-virtual-host.patch rename to Spigot-API-Patches/0070-Expose-client-protocol-version-and-virtual-host.patch index 217e735525..ff8f83ac14 100644 --- a/Spigot-API-Patches/0069-Expose-client-protocol-version-and-virtual-host.patch +++ b/Spigot-API-Patches/0070-Expose-client-protocol-version-and-virtual-host.patch @@ -57,15 +57,15 @@ index 0000000000000000000000000000000000000000..7b2af1bd72dfbcf4e962a982940fc49b + +} diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index b422abde1a504aa36c726e1c0597da11c1b6afd0..7295e8c12cb1333da4f954b2c77e5794141839f8 100644 +index 9cf7adf244335ac7dccbdf11f605a8c6910f7414..04f1a6513711dde8576c9b5c2b04619c56b48d8a 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -31,7 +31,7 @@ import org.jetbrains.annotations.Nullable; +@@ -32,7 +32,7 @@ import org.jetbrains.annotations.Nullable; /** * Represents a player, connected or not */ --public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginMessageRecipient { -+public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginMessageRecipient, com.destroystokyo.paper.network.NetworkClient { // Paper - Extend NetworkClient +-public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginMessageRecipient, net.kyori.adventure.identity.Identified { // Paper ++public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginMessageRecipient, net.kyori.adventure.identity.Identified, com.destroystokyo.paper.network.NetworkClient { // Paper - /** - * Gets the "friendly" name to display of this player. This may include + // Paper start + @Override diff --git a/Spigot-API-Patches/0070-Add-PlayerArmorChangeEvent.patch b/Spigot-API-Patches/0071-Add-PlayerArmorChangeEvent.patch similarity index 100% rename from Spigot-API-Patches/0070-Add-PlayerArmorChangeEvent.patch rename to Spigot-API-Patches/0071-Add-PlayerArmorChangeEvent.patch diff --git a/Spigot-API-Patches/0071-API-to-get-a-BlockState-without-a-snapshot.patch b/Spigot-API-Patches/0072-API-to-get-a-BlockState-without-a-snapshot.patch similarity index 100% rename from Spigot-API-Patches/0071-API-to-get-a-BlockState-without-a-snapshot.patch rename to Spigot-API-Patches/0072-API-to-get-a-BlockState-without-a-snapshot.patch diff --git a/Spigot-API-Patches/0072-AsyncTabCompleteEvent.patch b/Spigot-API-Patches/0073-AsyncTabCompleteEvent.patch similarity index 100% rename from Spigot-API-Patches/0072-AsyncTabCompleteEvent.patch rename to Spigot-API-Patches/0073-AsyncTabCompleteEvent.patch diff --git a/Spigot-API-Patches/0073-Display-warning-on-deprecated-recipe-API.patch b/Spigot-API-Patches/0074-Display-warning-on-deprecated-recipe-API.patch similarity index 100% rename from Spigot-API-Patches/0073-Display-warning-on-deprecated-recipe-API.patch rename to Spigot-API-Patches/0074-Display-warning-on-deprecated-recipe-API.patch diff --git a/Spigot-API-Patches/0074-PlayerPickupExperienceEvent.patch b/Spigot-API-Patches/0075-PlayerPickupExperienceEvent.patch similarity index 100% rename from Spigot-API-Patches/0074-PlayerPickupExperienceEvent.patch rename to Spigot-API-Patches/0075-PlayerPickupExperienceEvent.patch diff --git a/Spigot-API-Patches/0075-ExperienceOrbMergeEvent.patch b/Spigot-API-Patches/0076-ExperienceOrbMergeEvent.patch similarity index 100% rename from Spigot-API-Patches/0075-ExperienceOrbMergeEvent.patch rename to Spigot-API-Patches/0076-ExperienceOrbMergeEvent.patch diff --git a/Spigot-API-Patches/0076-Ability-to-apply-mending-to-XP-API.patch b/Spigot-API-Patches/0077-Ability-to-apply-mending-to-XP-API.patch similarity index 91% rename from Spigot-API-Patches/0076-Ability-to-apply-mending-to-XP-API.patch rename to Spigot-API-Patches/0077-Ability-to-apply-mending-to-XP-API.patch index ed05f83832..726e2fac6e 100644 --- a/Spigot-API-Patches/0076-Ability-to-apply-mending-to-XP-API.patch +++ b/Spigot-API-Patches/0077-Ability-to-apply-mending-to-XP-API.patch @@ -10,10 +10,10 @@ of giving the player experience points. Both an API To standalone mend, and apply mending logic to .giveExp has been added. diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index 7295e8c12cb1333da4f954b2c77e5794141839f8..86a7ba58ef26ef0053c516408b47f7ba4cb0b80b 100644 +index 04f1a6513711dde8576c9b5c2b04619c56b48d8a..02f1c1646be730fc70f235e79323963d90c2cda8 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -738,12 +738,33 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -882,12 +882,33 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM */ public void resetPlayerWeather(); diff --git a/Spigot-API-Patches/0077-PreCreatureSpawnEvent.patch b/Spigot-API-Patches/0078-PreCreatureSpawnEvent.patch similarity index 100% rename from Spigot-API-Patches/0077-PreCreatureSpawnEvent.patch rename to Spigot-API-Patches/0078-PreCreatureSpawnEvent.patch diff --git a/Spigot-API-Patches/0078-PlayerNaturallySpawnCreaturesEvent.patch b/Spigot-API-Patches/0079-PlayerNaturallySpawnCreaturesEvent.patch similarity index 100% rename from Spigot-API-Patches/0078-PlayerNaturallySpawnCreaturesEvent.patch rename to Spigot-API-Patches/0079-PlayerNaturallySpawnCreaturesEvent.patch diff --git a/Spigot-API-Patches/0079-Add-setPlayerProfile-API-for-Skulls.patch b/Spigot-API-Patches/0080-Add-setPlayerProfile-API-for-Skulls.patch similarity index 100% rename from Spigot-API-Patches/0079-Add-setPlayerProfile-API-for-Skulls.patch rename to Spigot-API-Patches/0080-Add-setPlayerProfile-API-for-Skulls.patch diff --git a/Spigot-API-Patches/0080-Fill-Profile-Property-Events.patch b/Spigot-API-Patches/0081-Fill-Profile-Property-Events.patch similarity index 100% rename from Spigot-API-Patches/0080-Fill-Profile-Property-Events.patch rename to Spigot-API-Patches/0081-Fill-Profile-Property-Events.patch diff --git a/Spigot-API-Patches/0081-PlayerAdvancementCriterionGrantEvent.patch b/Spigot-API-Patches/0082-PlayerAdvancementCriterionGrantEvent.patch similarity index 100% rename from Spigot-API-Patches/0081-PlayerAdvancementCriterionGrantEvent.patch rename to Spigot-API-Patches/0082-PlayerAdvancementCriterionGrantEvent.patch diff --git a/Spigot-API-Patches/0082-Add-ArmorStand-Item-Meta.patch b/Spigot-API-Patches/0083-Add-ArmorStand-Item-Meta.patch similarity index 100% rename from Spigot-API-Patches/0082-Add-ArmorStand-Item-Meta.patch rename to Spigot-API-Patches/0083-Add-ArmorStand-Item-Meta.patch diff --git a/Spigot-API-Patches/0083-Optimize-Hoppers.patch b/Spigot-API-Patches/0084-Optimize-Hoppers.patch similarity index 100% rename from Spigot-API-Patches/0083-Optimize-Hoppers.patch rename to Spigot-API-Patches/0084-Optimize-Hoppers.patch diff --git a/Spigot-API-Patches/0084-Tameable-getOwnerUniqueId-API.patch b/Spigot-API-Patches/0085-Tameable-getOwnerUniqueId-API.patch similarity index 100% rename from Spigot-API-Patches/0084-Tameable-getOwnerUniqueId-API.patch rename to Spigot-API-Patches/0085-Tameable-getOwnerUniqueId-API.patch diff --git a/Spigot-API-Patches/0085-Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch b/Spigot-API-Patches/0086-Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch similarity index 89% rename from Spigot-API-Patches/0085-Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch rename to Spigot-API-Patches/0086-Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch index 2bbaa66d15..a2a9f5270f 100644 --- a/Spigot-API-Patches/0085-Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch +++ b/Spigot-API-Patches/0086-Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Ability to change PlayerProfile in AsyncPreLoginEvent This will allow you to change the players name or skin on login. diff --git a/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java b/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java -index c8384da69af61e1970f254a3a9c206ee81d7a989..16352c7dab042c5042020a06208270200f576c02 100644 +index 992d1025ca02020e87a9ab5db83d249427f41d69..a40b57edb1aeff71fc0b9767d410950da5c06283 100644 --- a/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java +++ b/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java @@ -2,6 +2,9 @@ package org.bukkit.event.player; @@ -22,7 +22,7 @@ index c8384da69af61e1970f254a3a9c206ee81d7a989..16352c7dab042c5042020a0620827020 @@ -15,9 +18,9 @@ public class AsyncPlayerPreLoginEvent extends Event { private static final HandlerList handlers = new HandlerList(); private Result result; - private String message; + private net.kyori.adventure.text.Component message; // Paper - private final String name; + //private String name; // Paper - Not used anymore private final InetAddress ipAddress; @@ -62,7 +62,7 @@ index c8384da69af61e1970f254a3a9c206ee81d7a989..16352c7dab042c5042020a0620827020 + this.profile = profile; + // Paper end this.result = Result.ALLOWED; - this.message = ""; + this.message = net.kyori.adventure.text.Component.empty(); // Paper - this.name = name; + //this.name = name; // Paper - Not used anymore this.ipAddress = ipAddress; @@ -71,7 +71,7 @@ index c8384da69af61e1970f254a3a9c206ee81d7a989..16352c7dab042c5042020a0620827020 } /** -@@ -140,7 +168,7 @@ public class AsyncPlayerPreLoginEvent extends Event { +@@ -193,7 +221,7 @@ public class AsyncPlayerPreLoginEvent extends Event { */ @NotNull public String getName() { @@ -80,7 +80,7 @@ index c8384da69af61e1970f254a3a9c206ee81d7a989..16352c7dab042c5042020a0620827020 } /** -@@ -160,7 +188,7 @@ public class AsyncPlayerPreLoginEvent extends Event { +@@ -213,7 +241,7 @@ public class AsyncPlayerPreLoginEvent extends Event { */ @NotNull public UUID getUniqueId() { diff --git a/Spigot-API-Patches/0086-Add-extended-PaperServerListPingEvent.patch b/Spigot-API-Patches/0087-Add-extended-PaperServerListPingEvent.patch similarity index 94% rename from Spigot-API-Patches/0086-Add-extended-PaperServerListPingEvent.patch rename to Spigot-API-Patches/0087-Add-extended-PaperServerListPingEvent.patch index 8199a19db7..f35ae4323f 100644 --- a/Spigot-API-Patches/0086-Add-extended-PaperServerListPingEvent.patch +++ b/Spigot-API-Patches/0087-Add-extended-PaperServerListPingEvent.patch @@ -8,10 +8,10 @@ and allows full control of the response sent to the client. diff --git a/src/main/java/com/destroystokyo/paper/event/server/PaperServerListPingEvent.java b/src/main/java/com/destroystokyo/paper/event/server/PaperServerListPingEvent.java new file mode 100644 -index 0000000000000000000000000000000000000000..0cc5dd57342c12c0561c2b6ea0f803efb236855e +index 0000000000000000000000000000000000000000..baac2e4f090a490372ef4aed92c8a5771955e921 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/event/server/PaperServerListPingEvent.java -@@ -0,0 +1,323 @@ +@@ -0,0 +1,334 @@ +package com.destroystokyo.paper.event.server; + +import static java.util.Objects.requireNonNull; @@ -55,6 +55,7 @@ index 0000000000000000000000000000000000000000..0cc5dd57342c12c0561c2b6ea0f803ef + private boolean originalPlayerCount = true; + private Object[] players; + ++ @Deprecated + public PaperServerListPingEvent(@NotNull StatusClient client, @NotNull String motd, int numPlayers, int maxPlayers, + @NotNull String version, int protocolVersion, @Nullable CachedServerIcon favicon) { + super(client.getAddress().getAddress(), motd, numPlayers, maxPlayers); @@ -65,6 +66,16 @@ index 0000000000000000000000000000000000000000..0cc5dd57342c12c0561c2b6ea0f803ef + setServerIcon(favicon); + } + ++ public PaperServerListPingEvent(@NotNull StatusClient client, @NotNull net.kyori.adventure.text.Component motd, int numPlayers, int maxPlayers, ++ @NotNull String version, int protocolVersion, @Nullable CachedServerIcon favicon) { ++ super(client.getAddress().getAddress(), motd, numPlayers, maxPlayers); ++ this.client = client; ++ this.numPlayers = numPlayers; ++ this.version = version; ++ this.protocolVersion = protocolVersion; ++ setServerIcon(favicon); ++ } ++ + /** + * Returns the {@link StatusClient} pinging the server. + * diff --git a/Spigot-API-Patches/0087-Player.setPlayerProfile-API.patch b/Spigot-API-Patches/0088-Player.setPlayerProfile-API.patch similarity index 84% rename from Spigot-API-Patches/0087-Player.setPlayerProfile-API.patch rename to Spigot-API-Patches/0088-Player.setPlayerProfile-API.patch index 1f26019090..0c97e2a46b 100644 --- a/Spigot-API-Patches/0087-Player.setPlayerProfile-API.patch +++ b/Spigot-API-Patches/0088-Player.setPlayerProfile-API.patch @@ -6,18 +6,18 @@ Subject: [PATCH] Player.setPlayerProfile API This can be useful for changing name or skins after a player has logged in. diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index 86a7ba58ef26ef0053c516408b47f7ba4cb0b80b..7d3bf348e4a4b0b68042df4d72a98285c0e0da94 100644 +index 02f1c1646be730fc70f235e79323963d90c2cda8..34a810ad1b259ada407785dd7083f1fef20d7495 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -3,6 +3,7 @@ package org.bukkit.entity; - import java.net.InetSocketAddress; +@@ -4,6 +4,7 @@ import java.net.InetSocketAddress; import java.util.UUID; import com.destroystokyo.paper.Title; // Paper + import net.kyori.adventure.text.Component; +import com.destroystokyo.paper.profile.PlayerProfile; // Paper import org.bukkit.DyeColor; import org.bukkit.Effect; import org.bukkit.GameMode; -@@ -1578,6 +1579,20 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1738,6 +1739,20 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * was {@link org.bukkit.event.player.PlayerResourcePackStatusEvent.Status#SUCCESSFULLY_LOADED} */ boolean hasResourcePack(); diff --git a/Spigot-API-Patches/0088-getPlayerUniqueId-API.patch b/Spigot-API-Patches/0089-getPlayerUniqueId-API.patch similarity index 85% rename from Spigot-API-Patches/0088-getPlayerUniqueId-API.patch rename to Spigot-API-Patches/0089-getPlayerUniqueId-API.patch index 1728e5f09a..6586351ea9 100644 --- a/Spigot-API-Patches/0088-getPlayerUniqueId-API.patch +++ b/Spigot-API-Patches/0089-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/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index c7019397923f9f9349bb5fdd15455f2dbf99bfd5..9ea3d8695dbfbfffb02919531a86b713cade7bec 100644 +index f5d3a7370390871d1b6075f32846d1a942b05b7f..2d7f8e128e23934a8fe26baf19198b7ffc8447bb 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java -@@ -498,6 +498,20 @@ public final class Bukkit { +@@ -504,6 +504,20 @@ public final class Bukkit { return server.getPlayer(id); } @@ -34,10 +34,10 @@ index c7019397923f9f9349bb5fdd15455f2dbf99bfd5..9ea3d8695dbfbfffb02919531a86b713 * Gets the plugin manager for interfacing with plugins. * diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 66d0a3c6de2ea3c0a2fe3cd160a52f0cabe58ef3..89deb6890e008832df06c4b6392ffb32d88a9c2d 100644 +index 38d138b217734e598581ed14065ff2015135ee9a..01657abaff86cf7bb3ffb857024c5032781b8660 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -423,6 +423,18 @@ public interface Server extends PluginMessageRecipient { +@@ -429,6 +429,18 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi @Nullable public Player getPlayer(@NotNull UUID id); diff --git a/Spigot-API-Patches/0089-Add-legacy-ping-support-to-PaperServerListPingEvent.patch b/Spigot-API-Patches/0090-Add-legacy-ping-support-to-PaperServerListPingEvent.patch similarity index 100% rename from Spigot-API-Patches/0089-Add-legacy-ping-support-to-PaperServerListPingEvent.patch rename to Spigot-API-Patches/0090-Add-legacy-ping-support-to-PaperServerListPingEvent.patch diff --git a/Spigot-API-Patches/0090-Add-method-to-open-already-placed-sign.patch b/Spigot-API-Patches/0091-Add-method-to-open-already-placed-sign.patch similarity index 100% rename from Spigot-API-Patches/0090-Add-method-to-open-already-placed-sign.patch rename to Spigot-API-Patches/0091-Add-method-to-open-already-placed-sign.patch diff --git a/Spigot-API-Patches/0091-Add-Ban-Methods-to-Player-Objects.patch b/Spigot-API-Patches/0092-Add-Ban-Methods-to-Player-Objects.patch similarity index 97% rename from Spigot-API-Patches/0091-Add-Ban-Methods-to-Player-Objects.patch rename to Spigot-API-Patches/0092-Add-Ban-Methods-to-Player-Objects.patch index 7ac708ba3d..f53602aad1 100644 --- a/Spigot-API-Patches/0091-Add-Ban-Methods-to-Player-Objects.patch +++ b/Spigot-API-Patches/0092-Add-Ban-Methods-to-Player-Objects.patch @@ -74,12 +74,12 @@ index 58313929f81509030216a0e5e3869da63e11108e..6cf05fed701c67a2c797a4e0839c7958 /** * Checks if this player is whitelisted or not diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index 7d3bf348e4a4b0b68042df4d72a98285c0e0da94..1ba7e5c66159d8ff208f3e796a3e6569e060967c 100644 +index 34a810ad1b259ada407785dd7083f1fef20d7495..443f657dcd7906d48fe656bce601ff5a2365bd3d 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -4,6 +4,10 @@ import java.net.InetSocketAddress; - import java.util.UUID; +@@ -5,6 +5,10 @@ import java.util.UUID; import com.destroystokyo.paper.Title; // Paper + import net.kyori.adventure.text.Component; import com.destroystokyo.paper.profile.PlayerProfile; // Paper +import java.util.Date; // Paper +import org.bukkit.BanEntry; // Paper @@ -88,7 +88,7 @@ index 7d3bf348e4a4b0b68042df4d72a98285c0e0da94..1ba7e5c66159d8ff208f3e796a3e6569 import org.bukkit.DyeColor; import org.bukkit.Effect; import org.bukkit.GameMode; -@@ -485,6 +489,162 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -608,6 +612,162 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM public void sendMap(@NotNull MapView map); // Paper start diff --git a/Spigot-API-Patches/0092-EndermanEscapeEvent.patch b/Spigot-API-Patches/0093-EndermanEscapeEvent.patch similarity index 100% rename from Spigot-API-Patches/0092-EndermanEscapeEvent.patch rename to Spigot-API-Patches/0093-EndermanEscapeEvent.patch diff --git a/Spigot-API-Patches/0093-Enderman.teleportRandomly.patch b/Spigot-API-Patches/0094-Enderman.teleportRandomly.patch similarity index 100% rename from Spigot-API-Patches/0093-Enderman.teleportRandomly.patch rename to Spigot-API-Patches/0094-Enderman.teleportRandomly.patch diff --git a/Spigot-API-Patches/0094-Additional-world.getNearbyEntities-API-s.patch b/Spigot-API-Patches/0095-Additional-world.getNearbyEntities-API-s.patch similarity index 98% rename from Spigot-API-Patches/0094-Additional-world.getNearbyEntities-API-s.patch rename to Spigot-API-Patches/0095-Additional-world.getNearbyEntities-API-s.patch index 585c1a35ca..fb62b8633e 100644 --- a/Spigot-API-Patches/0094-Additional-world.getNearbyEntities-API-s.patch +++ b/Spigot-API-Patches/0095-Additional-world.getNearbyEntities-API-s.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Additional world.getNearbyEntities API's Provides more methods to get nearby entities, and filter by types and predicates diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index 5432b2713ab110a1d41bdf7372a5807426ab5443..4bffb3cadebb2081e8caae6b9d127591345411e6 100644 +index 789e070f6aee83e4b6426def784e05df98e1bc65..96e985eb98ab620e315aec13222b8f0334e5fe0a 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java @@ -1,6 +1,9 @@ @@ -19,7 +19,7 @@ index 5432b2713ab110a1d41bdf7372a5807426ab5443..4bffb3cadebb2081e8caae6b9d127591 import java.util.Collection; import java.util.HashMap; import java.util.List; -@@ -635,6 +638,256 @@ public interface World extends PluginMessageRecipient, Metadatable { +@@ -635,6 +638,256 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad @NotNull public Collection getEntitiesByClasses(@NotNull Class... classes); @@ -277,7 +277,7 @@ index 5432b2713ab110a1d41bdf7372a5807426ab5443..4bffb3cadebb2081e8caae6b9d127591 * Get a list of all players in this World * diff --git a/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java b/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java -index 16352c7dab042c5042020a06208270200f576c02..e5b811229830e4d55b08ab18bedec1494ff342ac 100644 +index a40b57edb1aeff71fc0b9767d410950da5c06283..184d9462ebbc500d8b81aaf14fe138d247bf2470 100644 --- a/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java +++ b/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java @@ -42,8 +42,7 @@ public class AsyncPlayerPreLoginEvent extends Event { diff --git a/Spigot-API-Patches/0095-Location.isChunkLoaded-API.patch b/Spigot-API-Patches/0096-Location.isChunkLoaded-API.patch similarity index 100% rename from Spigot-API-Patches/0095-Location.isChunkLoaded-API.patch rename to Spigot-API-Patches/0096-Location.isChunkLoaded-API.patch diff --git a/Spigot-API-Patches/0096-Expand-World.spawnParticle-API-and-add-Builder.patch b/Spigot-API-Patches/0097-Expand-World.spawnParticle-API-and-add-Builder.patch similarity index 99% rename from Spigot-API-Patches/0096-Expand-World.spawnParticle-API-and-add-Builder.patch rename to Spigot-API-Patches/0097-Expand-World.spawnParticle-API-and-add-Builder.patch index 233b4b8b62..ae0859d537 100644 --- a/Spigot-API-Patches/0096-Expand-World.spawnParticle-API-and-add-Builder.patch +++ b/Spigot-API-Patches/0097-Expand-World.spawnParticle-API-and-add-Builder.patch @@ -515,10 +515,10 @@ index b32de827cf8d1780861c271b4215276fdaab7165..1020002ff7127877db2d7e096f2c5217 * Options which can be applied to redstone dust particles - a particle * color and size. diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index 4bffb3cadebb2081e8caae6b9d127591345411e6..994e289fcbfef03a56d005f9d1b91151f2cecfaa 100644 +index 96e985eb98ab620e315aec13222b8f0334e5fe0a..1473b1ef341f13fbd634b81a058bf3148de7b2c6 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java -@@ -2551,7 +2551,57 @@ public interface World extends PluginMessageRecipient, Metadatable { +@@ -2550,7 +2550,57 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad * @param data the data to use for the particle or null, * the type of this depends on {@link Particle#getDataType()} */ diff --git a/Spigot-API-Patches/0097-EndermanAttackPlayerEvent.patch b/Spigot-API-Patches/0098-EndermanAttackPlayerEvent.patch similarity index 100% rename from Spigot-API-Patches/0097-EndermanAttackPlayerEvent.patch rename to Spigot-API-Patches/0098-EndermanAttackPlayerEvent.patch diff --git a/Spigot-API-Patches/0098-Close-Plugin-Class-Loaders-on-Disable.patch b/Spigot-API-Patches/0099-Close-Plugin-Class-Loaders-on-Disable.patch similarity index 100% rename from Spigot-API-Patches/0098-Close-Plugin-Class-Loaders-on-Disable.patch rename to Spigot-API-Patches/0099-Close-Plugin-Class-Loaders-on-Disable.patch diff --git a/Spigot-API-Patches/0099-WitchConsumePotionEvent.patch b/Spigot-API-Patches/0100-WitchConsumePotionEvent.patch similarity index 100% rename from Spigot-API-Patches/0099-WitchConsumePotionEvent.patch rename to Spigot-API-Patches/0100-WitchConsumePotionEvent.patch diff --git a/Spigot-API-Patches/0100-WitchThrowPotionEvent.patch b/Spigot-API-Patches/0101-WitchThrowPotionEvent.patch similarity index 100% rename from Spigot-API-Patches/0100-WitchThrowPotionEvent.patch rename to Spigot-API-Patches/0101-WitchThrowPotionEvent.patch diff --git a/Spigot-API-Patches/0101-Location.toBlockLocation-toCenterLocation.patch b/Spigot-API-Patches/0102-Location.toBlockLocation-toCenterLocation.patch similarity index 100% rename from Spigot-API-Patches/0101-Location.toBlockLocation-toCenterLocation.patch rename to Spigot-API-Patches/0102-Location.toBlockLocation-toCenterLocation.patch diff --git a/Spigot-API-Patches/0102-PotionEffect-clone-methods.patch b/Spigot-API-Patches/0103-PotionEffect-clone-methods.patch similarity index 100% rename from Spigot-API-Patches/0102-PotionEffect-clone-methods.patch rename to Spigot-API-Patches/0103-PotionEffect-clone-methods.patch diff --git a/Spigot-API-Patches/0103-WitchReadyPotionEvent.patch b/Spigot-API-Patches/0104-WitchReadyPotionEvent.patch similarity index 100% rename from Spigot-API-Patches/0103-WitchReadyPotionEvent.patch rename to Spigot-API-Patches/0104-WitchReadyPotionEvent.patch diff --git a/Spigot-API-Patches/0104-ItemStack-getMaxItemUseDuration.patch b/Spigot-API-Patches/0105-ItemStack-getMaxItemUseDuration.patch similarity index 81% rename from Spigot-API-Patches/0104-ItemStack-getMaxItemUseDuration.patch rename to Spigot-API-Patches/0105-ItemStack-getMaxItemUseDuration.patch index f8637b5acb..a9bb661918 100644 --- a/Spigot-API-Patches/0104-ItemStack-getMaxItemUseDuration.patch +++ b/Spigot-API-Patches/0105-ItemStack-getMaxItemUseDuration.patch @@ -6,10 +6,10 @@ Subject: [PATCH] ItemStack#getMaxItemUseDuration Allows you to determine how long it takes to use a usable/consumable item diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java -index e9ba311522a50572e6f1cb4554ba8e24a55cbb8a..125b74dd8263ab04a5df51764726efda15c1fca7 100644 +index 77d6b2ed68d8ce30b5cadb156941d2d1f7dcf5b1..cc065602db56c51b87d273a52d9ef82439fcaa7a 100644 --- a/src/main/java/org/bukkit/inventory/ItemStack.java +++ b/src/main/java/org/bukkit/inventory/ItemStack.java -@@ -621,5 +621,13 @@ public class ItemStack implements Cloneable, ConfigurationSerializable { +@@ -627,5 +627,13 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, net.kyor public String getI18NDisplayName() { return Bukkit.getServer().getItemFactory().getI18NDisplayName(this); } diff --git a/Spigot-API-Patches/0105-Add-EntityTeleportEndGatewayEvent.patch b/Spigot-API-Patches/0106-Add-EntityTeleportEndGatewayEvent.patch similarity index 100% rename from Spigot-API-Patches/0105-Add-EntityTeleportEndGatewayEvent.patch rename to Spigot-API-Patches/0106-Add-EntityTeleportEndGatewayEvent.patch diff --git a/Spigot-API-Patches/0106-Make-shield-blocking-delay-configurable.patch b/Spigot-API-Patches/0107-Make-shield-blocking-delay-configurable.patch similarity index 100% rename from Spigot-API-Patches/0106-Make-shield-blocking-delay-configurable.patch rename to Spigot-API-Patches/0107-Make-shield-blocking-delay-configurable.patch diff --git a/Spigot-API-Patches/0107-EntityShootBowEvent-consumeArrow-and-getArrowItem-AP.patch b/Spigot-API-Patches/0108-EntityShootBowEvent-consumeArrow-and-getArrowItem-AP.patch similarity index 100% rename from Spigot-API-Patches/0107-EntityShootBowEvent-consumeArrow-and-getArrowItem-AP.patch rename to Spigot-API-Patches/0108-EntityShootBowEvent-consumeArrow-and-getArrowItem-AP.patch diff --git a/Spigot-API-Patches/0108-Add-getNearbyXXX-methods-to-Location.patch b/Spigot-API-Patches/0109-Add-getNearbyXXX-methods-to-Location.patch similarity index 100% rename from Spigot-API-Patches/0108-Add-getNearbyXXX-methods-to-Location.patch rename to Spigot-API-Patches/0109-Add-getNearbyXXX-methods-to-Location.patch diff --git a/Spigot-API-Patches/0109-PlayerReadyArrowEvent.patch b/Spigot-API-Patches/0110-PlayerReadyArrowEvent.patch similarity index 100% rename from Spigot-API-Patches/0109-PlayerReadyArrowEvent.patch rename to Spigot-API-Patches/0110-PlayerReadyArrowEvent.patch diff --git a/Spigot-API-Patches/0110-Add-EntityKnockbackByEntityEvent.patch b/Spigot-API-Patches/0111-Add-EntityKnockbackByEntityEvent.patch similarity index 100% rename from Spigot-API-Patches/0110-Add-EntityKnockbackByEntityEvent.patch rename to Spigot-API-Patches/0111-Add-EntityKnockbackByEntityEvent.patch diff --git a/Spigot-API-Patches/0111-Expand-Explosions-API.patch b/Spigot-API-Patches/0112-Expand-Explosions-API.patch similarity index 97% rename from Spigot-API-Patches/0111-Expand-Explosions-API.patch rename to Spigot-API-Patches/0112-Expand-Explosions-API.patch index 4c543ede8b..bacc01b5da 100644 --- a/Spigot-API-Patches/0111-Expand-Explosions-API.patch +++ b/Spigot-API-Patches/0112-Expand-Explosions-API.patch @@ -106,10 +106,10 @@ index 4cf22afc3c1f1cc19b6e5350043431215908a612..af2ee43f2c5133668c18710f526a107d * Returns a list of entities within a bounding box centered around a Location. * diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index 994e289fcbfef03a56d005f9d1b91151f2cecfaa..aa0e0b6d916e5ba01470ea94f9fd6fe0b2a7b4cf 100644 +index 1473b1ef341f13fbd634b81a058bf3148de7b2c6..432367560c572e3fa77c4c36cde5bf7d7e157846 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java -@@ -1410,6 +1410,88 @@ public interface World extends PluginMessageRecipient, Metadatable { +@@ -1409,6 +1409,88 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad */ public boolean createExplosion(@NotNull Location loc, float power, boolean setFire); diff --git a/Spigot-API-Patches/0112-ItemStack-API-additions-for-quantity-flags-lore.patch b/Spigot-API-Patches/0113-ItemStack-API-additions-for-quantity-flags-lore.patch similarity index 95% rename from Spigot-API-Patches/0112-ItemStack-API-additions-for-quantity-flags-lore.patch rename to Spigot-API-Patches/0113-ItemStack-API-additions-for-quantity-flags-lore.patch index 418951be55..083874bbd4 100644 --- a/Spigot-API-Patches/0112-ItemStack-API-additions-for-quantity-flags-lore.patch +++ b/Spigot-API-Patches/0113-ItemStack-API-additions-for-quantity-flags-lore.patch @@ -5,7 +5,7 @@ Subject: [PATCH] ItemStack API additions for quantity/flags/lore diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java -index 125b74dd8263ab04a5df51764726efda15c1fca7..4940ba6a979cec5bea0edc24b94149298c256bc3 100644 +index cc065602db56c51b87d273a52d9ef82439fcaa7a..41db4fdbf25d7a2a7b6db373cf2eecc8cd9a5aa7 100644 --- a/src/main/java/org/bukkit/inventory/ItemStack.java +++ b/src/main/java/org/bukkit/inventory/ItemStack.java @@ -2,7 +2,9 @@ package org.bukkit.inventory; @@ -18,7 +18,7 @@ index 125b74dd8263ab04a5df51764726efda15c1fca7..4940ba6a979cec5bea0edc24b9414929 import org.apache.commons.lang.Validate; import org.bukkit.Bukkit; import org.bukkit.Material; -@@ -629,5 +631,140 @@ public class ItemStack implements Cloneable, ConfigurationSerializable { +@@ -635,5 +637,140 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, net.kyor // Requires access to NMS return ensureServerConversions().getMaxItemUseDuration(); } diff --git a/Spigot-API-Patches/0113-LivingEntity-Hand-Raised-Item-Use-API.patch b/Spigot-API-Patches/0114-LivingEntity-Hand-Raised-Item-Use-API.patch similarity index 100% rename from Spigot-API-Patches/0113-LivingEntity-Hand-Raised-Item-Use-API.patch rename to Spigot-API-Patches/0114-LivingEntity-Hand-Raised-Item-Use-API.patch diff --git a/Spigot-API-Patches/0114-RangedEntity-API.patch b/Spigot-API-Patches/0115-RangedEntity-API.patch similarity index 100% rename from Spigot-API-Patches/0114-RangedEntity-API.patch rename to Spigot-API-Patches/0115-RangedEntity-API.patch diff --git a/Spigot-API-Patches/0115-Add-World.getEntity-UUID-API.patch b/Spigot-API-Patches/0116-Add-World.getEntity-UUID-API.patch similarity index 82% rename from Spigot-API-Patches/0115-Add-World.getEntity-UUID-API.patch rename to Spigot-API-Patches/0116-Add-World.getEntity-UUID-API.patch index 454f312e72..2cbc7a43ca 100644 --- a/Spigot-API-Patches/0115-Add-World.getEntity-UUID-API.patch +++ b/Spigot-API-Patches/0116-Add-World.getEntity-UUID-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add World.getEntity(UUID) API diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index aa0e0b6d916e5ba01470ea94f9fd6fe0b2a7b4cf..ab4f09cf5651a260c23e53da9576767462b62c7c 100644 +index 432367560c572e3fa77c4c36cde5bf7d7e157846..9c4f2d9e1a4011e3a9860d913e1a718030696bed 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java -@@ -914,6 +914,17 @@ public interface World extends PluginMessageRecipient, Metadatable { +@@ -922,6 +922,17 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad @NotNull public Collection getNearbyEntities(@NotNull Location location, double x, double y, double z); diff --git a/Spigot-API-Patches/0116-InventoryCloseEvent-Reason-API.patch b/Spigot-API-Patches/0117-InventoryCloseEvent-Reason-API.patch similarity index 100% rename from Spigot-API-Patches/0116-InventoryCloseEvent-Reason-API.patch rename to Spigot-API-Patches/0117-InventoryCloseEvent-Reason-API.patch diff --git a/Spigot-API-Patches/0117-Entity-getChunk-API.patch b/Spigot-API-Patches/0118-Entity-getChunk-API.patch similarity index 86% rename from Spigot-API-Patches/0117-Entity-getChunk-API.patch rename to Spigot-API-Patches/0118-Entity-getChunk-API.patch index aebaf9083b..8eaf47d2a6 100644 --- a/Spigot-API-Patches/0117-Entity-getChunk-API.patch +++ b/Spigot-API-Patches/0118-Entity-getChunk-API.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Entity#getChunk API Get the chunk the entity is currently registered to diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java -index a73af8caad4014fecbca9c1c09cb519cb1fc3eb1..6d010cdebcb490b57618d3865fdb776a023853bf 100644 +index feb9507a972bf797144a01adeeaac83ec2bd165a..9b8823279524d1c1566176c589aa5794eb8aafbc 100644 --- a/src/main/java/org/bukkit/entity/Entity.java +++ b/src/main/java/org/bukkit/entity/Entity.java @@ -3,6 +3,7 @@ package org.bukkit.entity; @@ -17,7 +17,7 @@ index a73af8caad4014fecbca9c1c09cb519cb1fc3eb1..6d010cdebcb490b57618d3865fdb776a import org.bukkit.EntityEffect; import org.bukkit.Location; import org.bukkit.Nameable; -@@ -620,5 +621,13 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent +@@ -626,5 +627,13 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent * @return True if entity spawned from a mob spawner */ boolean fromMobSpawner(); diff --git a/Spigot-API-Patches/0118-Add-an-asterisk-to-legacy-API-plugins.patch b/Spigot-API-Patches/0119-Add-an-asterisk-to-legacy-API-plugins.patch similarity index 100% rename from Spigot-API-Patches/0118-Add-an-asterisk-to-legacy-API-plugins.patch rename to Spigot-API-Patches/0119-Add-an-asterisk-to-legacy-API-plugins.patch diff --git a/Spigot-API-Patches/0119-EnderDragon-Events.patch b/Spigot-API-Patches/0120-EnderDragon-Events.patch similarity index 100% rename from Spigot-API-Patches/0119-EnderDragon-Events.patch rename to Spigot-API-Patches/0120-EnderDragon-Events.patch diff --git a/Spigot-API-Patches/0120-PlayerLaunchProjectileEvent.patch b/Spigot-API-Patches/0121-PlayerLaunchProjectileEvent.patch similarity index 100% rename from Spigot-API-Patches/0120-PlayerLaunchProjectileEvent.patch rename to Spigot-API-Patches/0121-PlayerLaunchProjectileEvent.patch diff --git a/Spigot-API-Patches/0121-PlayerElytraBoostEvent.patch b/Spigot-API-Patches/0122-PlayerElytraBoostEvent.patch similarity index 100% rename from Spigot-API-Patches/0121-PlayerElytraBoostEvent.patch rename to Spigot-API-Patches/0122-PlayerElytraBoostEvent.patch diff --git a/Spigot-API-Patches/0122-EntityTransformedEvent.patch b/Spigot-API-Patches/0123-EntityTransformedEvent.patch similarity index 100% rename from Spigot-API-Patches/0122-EntityTransformedEvent.patch rename to Spigot-API-Patches/0123-EntityTransformedEvent.patch diff --git a/Spigot-API-Patches/0123-Allow-disabling-armour-stand-ticking.patch b/Spigot-API-Patches/0124-Allow-disabling-armour-stand-ticking.patch similarity index 100% rename from Spigot-API-Patches/0123-Allow-disabling-armour-stand-ticking.patch rename to Spigot-API-Patches/0124-Allow-disabling-armour-stand-ticking.patch diff --git a/Spigot-API-Patches/0124-SkeletonHorse-Additions.patch b/Spigot-API-Patches/0125-SkeletonHorse-Additions.patch similarity index 100% rename from Spigot-API-Patches/0124-SkeletonHorse-Additions.patch rename to Spigot-API-Patches/0125-SkeletonHorse-Additions.patch diff --git a/Spigot-API-Patches/0125-Expand-Location-Manipulation-API.patch b/Spigot-API-Patches/0126-Expand-Location-Manipulation-API.patch similarity index 100% rename from Spigot-API-Patches/0125-Expand-Location-Manipulation-API.patch rename to Spigot-API-Patches/0126-Expand-Location-Manipulation-API.patch diff --git a/Spigot-API-Patches/0126-Expand-ArmorStand-API.patch b/Spigot-API-Patches/0127-Expand-ArmorStand-API.patch similarity index 100% rename from Spigot-API-Patches/0126-Expand-ArmorStand-API.patch rename to Spigot-API-Patches/0127-Expand-ArmorStand-API.patch diff --git a/Spigot-API-Patches/0127-AnvilDamageEvent.patch b/Spigot-API-Patches/0128-AnvilDamageEvent.patch similarity index 100% rename from Spigot-API-Patches/0127-AnvilDamageEvent.patch rename to Spigot-API-Patches/0128-AnvilDamageEvent.patch diff --git a/Spigot-API-Patches/0128-Remove-deadlock-risk-in-firing-async-events.patch b/Spigot-API-Patches/0129-Remove-deadlock-risk-in-firing-async-events.patch similarity index 96% rename from Spigot-API-Patches/0128-Remove-deadlock-risk-in-firing-async-events.patch rename to Spigot-API-Patches/0129-Remove-deadlock-risk-in-firing-async-events.patch index fc6755e6dc..2725c79f2e 100644 --- a/Spigot-API-Patches/0128-Remove-deadlock-risk-in-firing-async-events.patch +++ b/Spigot-API-Patches/0129-Remove-deadlock-risk-in-firing-async-events.patch @@ -16,12 +16,12 @@ which results in a hard crash. This change removes the synchronize and adds some protection around enable/disable diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java -index 6d010cdebcb490b57618d3865fdb776a023853bf..cd46036960aac542a3ced9a8cdfcb1d35913cb76 100644 +index 9b8823279524d1c1566176c589aa5794eb8aafbc..707638c327077a74c777a603b9f2392f46b51c0c 100644 --- a/src/main/java/org/bukkit/entity/Entity.java +++ b/src/main/java/org/bukkit/entity/Entity.java @@ -28,7 +28,7 @@ import org.jetbrains.annotations.Nullable; */ - public interface Entity extends Metadatable, CommandSender, Nameable, PersistentDataHolder { + public interface Entity extends Metadatable, CommandSender, Nameable, PersistentDataHolder, net.kyori.adventure.text.event.HoverEventSource { // Paper - /** + /* diff --git a/Spigot-API-Patches/0129-Add-hand-to-bucket-events.patch b/Spigot-API-Patches/0130-Add-hand-to-bucket-events.patch similarity index 100% rename from Spigot-API-Patches/0129-Add-hand-to-bucket-events.patch rename to Spigot-API-Patches/0130-Add-hand-to-bucket-events.patch diff --git a/Spigot-API-Patches/0130-Add-TNTPrimeEvent.patch b/Spigot-API-Patches/0131-Add-TNTPrimeEvent.patch similarity index 100% rename from Spigot-API-Patches/0130-Add-TNTPrimeEvent.patch rename to Spigot-API-Patches/0131-Add-TNTPrimeEvent.patch diff --git a/Spigot-API-Patches/0131-Provide-Chunk-Coordinates-as-a-Long-API.patch b/Spigot-API-Patches/0132-Provide-Chunk-Coordinates-as-a-Long-API.patch similarity index 94% rename from Spigot-API-Patches/0131-Provide-Chunk-Coordinates-as-a-Long-API.patch rename to Spigot-API-Patches/0132-Provide-Chunk-Coordinates-as-a-Long-API.patch index 8fa7fd5adb..3616f82f03 100644 --- a/Spigot-API-Patches/0131-Provide-Chunk-Coordinates-as-a-Long-API.patch +++ b/Spigot-API-Patches/0132-Provide-Chunk-Coordinates-as-a-Long-API.patch @@ -44,10 +44,10 @@ index beac1439c71fb28f1a3baecf56157237e12ccfd5..fa576096e908f8fbdbef53e1bd91215a * Gets the world containing this chunk * diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index ab4f09cf5651a260c23e53da9576767462b62c7c..0b77f7f0a27743e1c1ce4283ed53958845f9f9cc 100644 +index 9c4f2d9e1a4011e3a9860d913e1a718030696bed..e372b3d43960ac7df58985609ef729c68fca0533 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java -@@ -207,6 +207,22 @@ public interface World extends PluginMessageRecipient, Metadatable { +@@ -207,6 +207,22 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad @NotNull public Chunk getChunkAt(@NotNull Block block); diff --git a/Spigot-API-Patches/0132-Async-Chunks-API.patch b/Spigot-API-Patches/0133-Async-Chunks-API.patch similarity index 99% rename from Spigot-API-Patches/0132-Async-Chunks-API.patch rename to Spigot-API-Patches/0133-Async-Chunks-API.patch index 3aa2d93b75..992af6f95b 100644 --- a/Spigot-API-Patches/0132-Async-Chunks-API.patch +++ b/Spigot-API-Patches/0133-Async-Chunks-API.patch @@ -8,10 +8,10 @@ Adds API's to load or generate chunks asynchronously. Also adds utility methods to Entity to teleport asynchronously. diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index 0b77f7f0a27743e1c1ce4283ed53958845f9f9cc..6851a96be62815ffb2d129ec3b98495dffa508ce 100644 +index e372b3d43960ac7df58985609ef729c68fca0533..3f231c28842f02f80fd3136c36fe99b41726137f 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java -@@ -221,6 +221,482 @@ public interface World extends PluginMessageRecipient, Metadatable { +@@ -221,6 +221,482 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad public default Chunk getChunkAt(long chunkKey) { return getChunkAt((int) chunkKey, (int) (chunkKey >> 32)); } @@ -495,7 +495,7 @@ index 0b77f7f0a27743e1c1ce4283ed53958845f9f9cc..6851a96be62815ffb2d129ec3b98495d /** diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java -index cd46036960aac542a3ced9a8cdfcb1d35913cb76..71bda0f3be3c0b8b7fbb95e564101330d91f90c0 100644 +index 707638c327077a74c777a603b9f2392f46b51c0c..c137199ed0537874010f1abf311a9cbee56831ac 100644 --- a/src/main/java/org/bukkit/entity/Entity.java +++ b/src/main/java/org/bukkit/entity/Entity.java @@ -163,6 +163,33 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent diff --git a/Spigot-API-Patches/0133-Make-EnderDragon-extend-Mob.patch b/Spigot-API-Patches/0134-Make-EnderDragon-extend-Mob.patch similarity index 100% rename from Spigot-API-Patches/0133-Make-EnderDragon-extend-Mob.patch rename to Spigot-API-Patches/0134-Make-EnderDragon-extend-Mob.patch diff --git a/Spigot-API-Patches/0134-Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch b/Spigot-API-Patches/0135-Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch similarity index 100% rename from Spigot-API-Patches/0134-Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch rename to Spigot-API-Patches/0135-Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch diff --git a/Spigot-API-Patches/0135-Don-t-use-snapshots-for-Timings-Tile-Entity-reports.patch b/Spigot-API-Patches/0136-Don-t-use-snapshots-for-Timings-Tile-Entity-reports.patch similarity index 100% rename from Spigot-API-Patches/0135-Don-t-use-snapshots-for-Timings-Tile-Entity-reports.patch rename to Spigot-API-Patches/0136-Don-t-use-snapshots-for-Timings-Tile-Entity-reports.patch diff --git a/Spigot-API-Patches/0136-Allow-Blocks-to-be-accessed-via-a-long-key.patch b/Spigot-API-Patches/0137-Allow-Blocks-to-be-accessed-via-a-long-key.patch similarity index 97% rename from Spigot-API-Patches/0136-Allow-Blocks-to-be-accessed-via-a-long-key.patch rename to Spigot-API-Patches/0137-Allow-Blocks-to-be-accessed-via-a-long-key.patch index 6f2260aab6..568d6bcd6e 100644 --- a/Spigot-API-Patches/0136-Allow-Blocks-to-be-accessed-via-a-long-key.patch +++ b/Spigot-API-Patches/0137-Allow-Blocks-to-be-accessed-via-a-long-key.patch @@ -48,10 +48,10 @@ index 369ce9ff6c8bb97a64a8e229115564412e6e7654..e700875beb76dadd55b585aca748338d * @return A new location where X/Y/Z are the center of the block */ diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index 6851a96be62815ffb2d129ec3b98495dffa508ce..accee84428cb16be47dc5cf75993622c96958e62 100644 +index 3f231c28842f02f80fd3136c36fe99b41726137f..d8674c773d61517f79d0fe77276392e47fd3e1e1 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java -@@ -90,6 +90,38 @@ public interface World extends PluginMessageRecipient, Metadatable { +@@ -90,6 +90,38 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad @NotNull public Block getBlockAt(@NotNull Location location); diff --git a/Spigot-API-Patches/0137-Slime-Pathfinder-Events.patch b/Spigot-API-Patches/0138-Slime-Pathfinder-Events.patch similarity index 100% rename from Spigot-API-Patches/0137-Slime-Pathfinder-Events.patch rename to Spigot-API-Patches/0138-Slime-Pathfinder-Events.patch diff --git a/Spigot-API-Patches/0138-isChunkGenerated-API.patch b/Spigot-API-Patches/0139-isChunkGenerated-API.patch similarity index 94% rename from Spigot-API-Patches/0138-isChunkGenerated-API.patch rename to Spigot-API-Patches/0139-isChunkGenerated-API.patch index 7184c02bf4..a26301e9c3 100644 --- a/Spigot-API-Patches/0138-isChunkGenerated-API.patch +++ b/Spigot-API-Patches/0139-isChunkGenerated-API.patch @@ -34,10 +34,10 @@ index e700875beb76dadd55b585aca748338def286908..9c91c49ed7302c12fcb1d8e9bc58712e /** * Sets the position of this Location and returns itself diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index accee84428cb16be47dc5cf75993622c96958e62..de607fe0a2e864dc66d9341b233d0d8b120db1f9 100644 +index d8674c773d61517f79d0fe77276392e47fd3e1e1..cf831f96efa302f789cf26a384a091df51215a76 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java -@@ -254,6 +254,17 @@ public interface World extends PluginMessageRecipient, Metadatable { +@@ -254,6 +254,17 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad return getChunkAt((int) chunkKey, (int) (chunkKey >> 32)); } diff --git a/Spigot-API-Patches/0139-Add-More-Creeper-API.patch b/Spigot-API-Patches/0140-Add-More-Creeper-API.patch similarity index 100% rename from Spigot-API-Patches/0139-Add-More-Creeper-API.patch rename to Spigot-API-Patches/0140-Add-More-Creeper-API.patch diff --git a/Spigot-API-Patches/0140-Add-PhantomPreSpawnEvent.patch b/Spigot-API-Patches/0141-Add-PhantomPreSpawnEvent.patch similarity index 100% rename from Spigot-API-Patches/0140-Add-PhantomPreSpawnEvent.patch rename to Spigot-API-Patches/0141-Add-PhantomPreSpawnEvent.patch diff --git a/Spigot-API-Patches/0141-Add-source-block-to-BlockPhysicsEvent.patch b/Spigot-API-Patches/0142-Add-source-block-to-BlockPhysicsEvent.patch similarity index 100% rename from Spigot-API-Patches/0141-Add-source-block-to-BlockPhysicsEvent.patch rename to Spigot-API-Patches/0142-Add-source-block-to-BlockPhysicsEvent.patch diff --git a/Spigot-API-Patches/0142-Inventory-removeItemAnySlot.patch b/Spigot-API-Patches/0143-Inventory-removeItemAnySlot.patch similarity index 100% rename from Spigot-API-Patches/0142-Inventory-removeItemAnySlot.patch rename to Spigot-API-Patches/0143-Inventory-removeItemAnySlot.patch diff --git a/Spigot-API-Patches/0143-Add-ray-tracing-methods-to-LivingEntity.patch b/Spigot-API-Patches/0144-Add-ray-tracing-methods-to-LivingEntity.patch similarity index 100% rename from Spigot-API-Patches/0143-Add-ray-tracing-methods-to-LivingEntity.patch rename to Spigot-API-Patches/0144-Add-ray-tracing-methods-to-LivingEntity.patch diff --git a/Spigot-API-Patches/0144-Improve-death-events.patch b/Spigot-API-Patches/0145-Improve-death-events.patch similarity index 100% rename from Spigot-API-Patches/0144-Improve-death-events.patch rename to Spigot-API-Patches/0145-Improve-death-events.patch diff --git a/Spigot-API-Patches/0145-Mob-Pathfinding-API.patch b/Spigot-API-Patches/0146-Mob-Pathfinding-API.patch similarity index 100% rename from Spigot-API-Patches/0145-Mob-Pathfinding-API.patch rename to Spigot-API-Patches/0146-Mob-Pathfinding-API.patch diff --git a/Spigot-API-Patches/0146-Expose-attack-cooldown-methods-for-Player.patch b/Spigot-API-Patches/0147-Expose-attack-cooldown-methods-for-Player.patch similarity index 88% rename from Spigot-API-Patches/0146-Expose-attack-cooldown-methods-for-Player.patch rename to Spigot-API-Patches/0147-Expose-attack-cooldown-methods-for-Player.patch index 2c760cec49..ece2850c8b 100644 --- a/Spigot-API-Patches/0146-Expose-attack-cooldown-methods-for-Player.patch +++ b/Spigot-API-Patches/0147-Expose-attack-cooldown-methods-for-Player.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Expose attack cooldown methods for Player diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index 1ba7e5c66159d8ff208f3e796a3e6569e060967c..61989130ba8d72a39002ce81eec7f4aa1943fba0 100644 +index 443f657dcd7906d48fe656bce601ff5a2365bd3d..aff3e3ec0f9ef649196d7896be926f9f5681186e 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -1753,6 +1753,26 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1913,6 +1913,26 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * @param profile The new profile to use */ void setPlayerProfile(@NotNull PlayerProfile profile); diff --git a/Spigot-API-Patches/0147-Add-an-API-for-CanPlaceOn-and-CanDestroy-NBT-values.patch b/Spigot-API-Patches/0148-Add-an-API-for-CanPlaceOn-and-CanDestroy-NBT-values.patch similarity index 94% rename from Spigot-API-Patches/0147-Add-an-API-for-CanPlaceOn-and-CanDestroy-NBT-values.patch rename to Spigot-API-Patches/0148-Add-an-API-for-CanPlaceOn-and-CanDestroy-NBT-values.patch index fa392f242b..4395c41fa1 100644 --- a/Spigot-API-Patches/0147-Add-an-API-for-CanPlaceOn-and-CanDestroy-NBT-values.patch +++ b/Spigot-API-Patches/0148-Add-an-API-for-CanPlaceOn-and-CanDestroy-NBT-values.patch @@ -199,19 +199,19 @@ index 0000000000000000000000000000000000000000..28f3fda950999a9c964a3608042ca605 + } +} diff --git a/src/main/java/org/bukkit/NamespacedKey.java b/src/main/java/org/bukkit/NamespacedKey.java -index 803fa0019869127ee8c7e4fb1777a59c43e66f8a..549b2342b8b63c00b402e6cf8a7c612ac6b45fe7 100644 +index abb7448ee8fe1152623794d3b806eef9a9e17abc..f49569d50510807570b51d894369fcffe180cc56 100644 --- a/src/main/java/org/bukkit/NamespacedKey.java +++ b/src/main/java/org/bukkit/NamespacedKey.java -@@ -19,7 +19,7 @@ import org.jetbrains.annotations.Nullable; +@@ -18,7 +18,7 @@ import org.jetbrains.annotations.NotNull; * underscores, hyphens, and forward slashes. * */ --public final class NamespacedKey { -+public final class NamespacedKey implements com.destroystokyo.paper.Namespaced { // Paper - implement namespaced +-public final class NamespacedKey implements net.kyori.adventure.key.Key { // Paper - implement Key ++public final class NamespacedKey implements net.kyori.adventure.key.Key, com.destroystokyo.paper.Namespaced { // Paper - implement Key and Namespaced /** * The namespace representing all inbuilt keys. -@@ -84,11 +84,13 @@ public final class NamespacedKey { +@@ -83,11 +83,13 @@ public final class NamespacedKey implements net.kyori.adventure.key.Key { // Pap } @NotNull @@ -226,10 +226,10 @@ index 803fa0019869127ee8c7e4fb1777a59c43e66f8a..549b2342b8b63c00b402e6cf8a7c612a return key; } diff --git a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java -index f2e9f2753ec92aa4a3e3f06ca6053bd70b9091d7..7e0b1d363829031075b6822d7b35ccde9fc05da9 100644 +index 1c362636c56db0e6c118171ba367c43c4f7cff33..01b462fccce71cef3398dd43944046f322b8e57e 100644 --- a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java +++ b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java -@@ -388,4 +388,87 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste +@@ -432,4 +432,87 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste @SuppressWarnings("javadoc") @NotNull ItemMeta clone(); diff --git a/Spigot-API-Patches/0148-Performance-Concurrency-Improvements-to-Permissions.patch b/Spigot-API-Patches/0149-Performance-Concurrency-Improvements-to-Permissions.patch similarity index 100% rename from Spigot-API-Patches/0148-Performance-Concurrency-Improvements-to-Permissions.patch rename to Spigot-API-Patches/0149-Performance-Concurrency-Improvements-to-Permissions.patch diff --git a/Spigot-API-Patches/0149-Add-ItemStackRecipeChoice-Draft-API.patch b/Spigot-API-Patches/0150-Add-ItemStackRecipeChoice-Draft-API.patch similarity index 100% rename from Spigot-API-Patches/0149-Add-ItemStackRecipeChoice-Draft-API.patch rename to Spigot-API-Patches/0150-Add-ItemStackRecipeChoice-Draft-API.patch diff --git a/Spigot-API-Patches/0150-Implement-furnace-cook-speed-multiplier-API.patch b/Spigot-API-Patches/0151-Implement-furnace-cook-speed-multiplier-API.patch similarity index 100% rename from Spigot-API-Patches/0150-Implement-furnace-cook-speed-multiplier-API.patch rename to Spigot-API-Patches/0151-Implement-furnace-cook-speed-multiplier-API.patch diff --git a/Spigot-API-Patches/0151-PreSpawnerSpawnEvent.patch b/Spigot-API-Patches/0152-PreSpawnerSpawnEvent.patch similarity index 100% rename from Spigot-API-Patches/0151-PreSpawnerSpawnEvent.patch rename to Spigot-API-Patches/0152-PreSpawnerSpawnEvent.patch diff --git a/Spigot-API-Patches/0152-Material-API-additions.patch b/Spigot-API-Patches/0153-Material-API-additions.patch similarity index 87% rename from Spigot-API-Patches/0152-Material-API-additions.patch rename to Spigot-API-Patches/0153-Material-API-additions.patch index 077025f677..eaa11edcc9 100644 --- a/Spigot-API-Patches/0152-Material-API-additions.patch +++ b/Spigot-API-Patches/0153-Material-API-additions.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Material API additions diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java -index 27adc7afae3d32c36762b9355cb5210e187df795..2e959d195f7a5e723952e421aeaeeb463f07d3f5 100644 +index f66cd342c2ec3e5d4f4ae5e68dda797c793c76a7..e203c5bfc1d1bf6b500ef8a4446d3aef182b8ecb 100644 --- a/src/main/java/org/bukkit/Material.java +++ b/src/main/java/org/bukkit/Material.java @@ -86,6 +86,7 @@ import org.jetbrains.annotations.Nullable; @@ -16,7 +16,7 @@ index 27adc7afae3d32c36762b9355cb5210e187df795..2e959d195f7a5e723952e421aeaeeb46 public enum Material implements Keyed { // AIR(9648, 0), -@@ -3562,6 +3563,22 @@ public enum Material implements Keyed { +@@ -3565,6 +3566,22 @@ public enum Material implements Keyed { } } diff --git a/Spigot-API-Patches/0153-Add-Material-Tags.patch b/Spigot-API-Patches/0154-Add-Material-Tags.patch similarity index 100% rename from Spigot-API-Patches/0153-Add-Material-Tags.patch rename to Spigot-API-Patches/0154-Add-Material-Tags.patch diff --git a/Spigot-API-Patches/0154-Allow-setting-the-vex-s-summoner.patch b/Spigot-API-Patches/0155-Allow-setting-the-vex-s-summoner.patch similarity index 100% rename from Spigot-API-Patches/0154-Allow-setting-the-vex-s-summoner.patch rename to Spigot-API-Patches/0155-Allow-setting-the-vex-s-summoner.patch diff --git a/Spigot-API-Patches/0155-Add-LivingEntity-getTargetEntity.patch b/Spigot-API-Patches/0156-Add-LivingEntity-getTargetEntity.patch similarity index 100% rename from Spigot-API-Patches/0155-Add-LivingEntity-getTargetEntity.patch rename to Spigot-API-Patches/0156-Add-LivingEntity-getTargetEntity.patch diff --git a/Spigot-API-Patches/0156-Add-sun-related-API.patch b/Spigot-API-Patches/0157-Add-sun-related-API.patch similarity index 82% rename from Spigot-API-Patches/0156-Add-sun-related-API.patch rename to Spigot-API-Patches/0157-Add-sun-related-API.patch index 1c6589f86a..4872e743ff 100644 --- a/Spigot-API-Patches/0156-Add-sun-related-API.patch +++ b/Spigot-API-Patches/0157-Add-sun-related-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add sun related API diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index de607fe0a2e864dc66d9341b233d0d8b120db1f9..ad915c2a190fa5bb50cbf88dfd99798918c75a47 100644 +index cf831f96efa302f789cf26a384a091df51215a76..19060c7d9c74b9b2808103f3d5627444aece6ccb 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java -@@ -1780,6 +1780,16 @@ public interface World extends PluginMessageRecipient, Metadatable { +@@ -1788,6 +1788,16 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad */ public void setFullTime(long time); @@ -23,7 +23,7 @@ index de607fe0a2e864dc66d9341b233d0d8b120db1f9..ad915c2a190fa5bb50cbf88dfd997989 + // Paper end + /** - * Gets the full in-game time on this world since the world generation + * Returns whether the world has an ongoing storm. * diff --git a/src/main/java/org/bukkit/entity/Mob.java b/src/main/java/org/bukkit/entity/Mob.java index b132287817d35579ca5128a1ed5c242bf229771a..d726453c041a980576312b6bee96a07837f37974 100644 diff --git a/Spigot-API-Patches/0157-Here-s-Johnny.patch b/Spigot-API-Patches/0158-Here-s-Johnny.patch similarity index 100% rename from Spigot-API-Patches/0157-Here-s-Johnny.patch rename to Spigot-API-Patches/0158-Here-s-Johnny.patch diff --git a/Spigot-API-Patches/0158-Turtle-API.patch b/Spigot-API-Patches/0159-Turtle-API.patch similarity index 100% rename from Spigot-API-Patches/0158-Turtle-API.patch rename to Spigot-API-Patches/0159-Turtle-API.patch diff --git a/Spigot-API-Patches/0159-Add-spectator-target-events.patch b/Spigot-API-Patches/0160-Add-spectator-target-events.patch similarity index 100% rename from Spigot-API-Patches/0159-Add-spectator-target-events.patch rename to Spigot-API-Patches/0160-Add-spectator-target-events.patch diff --git a/Spigot-API-Patches/0160-Add-more-Witch-API.patch b/Spigot-API-Patches/0161-Add-more-Witch-API.patch similarity index 100% rename from Spigot-API-Patches/0160-Add-more-Witch-API.patch rename to Spigot-API-Patches/0161-Add-more-Witch-API.patch diff --git a/Spigot-API-Patches/0161-Make-the-default-permission-message-configurable.patch b/Spigot-API-Patches/0162-Make-the-default-permission-message-configurable.patch similarity index 86% rename from Spigot-API-Patches/0161-Make-the-default-permission-message-configurable.patch rename to Spigot-API-Patches/0162-Make-the-default-permission-message-configurable.patch index b096e44dfa..d6094643d2 100644 --- a/Spigot-API-Patches/0161-Make-the-default-permission-message-configurable.patch +++ b/Spigot-API-Patches/0162-Make-the-default-permission-message-configurable.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Make the default permission message configurable diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index 9ea3d8695dbfbfffb02919531a86b713cade7bec..91fe826435978591d0852986dedfbf6885f5588c 100644 +index 2d7f8e128e23934a8fe26baf19198b7ffc8447bb..908b75f0b9897ce830ed7c0a2c1dd0a458a872f1 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java -@@ -1667,6 +1667,15 @@ public final class Bukkit { +@@ -1781,6 +1781,15 @@ public final class Bukkit { return server.suggestPlayerNamesWhenNullTabCompletions(); } @@ -25,10 +25,10 @@ index 9ea3d8695dbfbfffb02919531a86b713cade7bec..91fe826435978591d0852986dedfbf68 * Creates a PlayerProfile for the specified uuid, with name as null * @param uuid UUID to create profile for diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 89deb6890e008832df06c4b6392ffb32d88a9c2d..836f94398cdd08003c58eee8ade53c5634da5be9 100644 +index 01657abaff86cf7bb3ffb857024c5032781b8660..a68b973e7574cae3ee7be7cfc51786589280408a 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -1458,6 +1458,13 @@ public interface Server extends PluginMessageRecipient { +@@ -1564,6 +1564,13 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi */ boolean suggestPlayerNamesWhenNullTabCompletions(); diff --git a/Spigot-API-Patches/0162-Support-cancellation-supression-of-EntityDismount-Ve.patch b/Spigot-API-Patches/0163-Support-cancellation-supression-of-EntityDismount-Ve.patch similarity index 100% rename from Spigot-API-Patches/0162-Support-cancellation-supression-of-EntityDismount-Ve.patch rename to Spigot-API-Patches/0163-Support-cancellation-supression-of-EntityDismount-Ve.patch diff --git a/Spigot-API-Patches/0163-Add-more-Zombie-API.patch b/Spigot-API-Patches/0164-Add-more-Zombie-API.patch similarity index 100% rename from Spigot-API-Patches/0163-Add-more-Zombie-API.patch rename to Spigot-API-Patches/0164-Add-more-Zombie-API.patch diff --git a/Spigot-API-Patches/0164-Change-the-reserved-channel-check-to-be-sensible.patch b/Spigot-API-Patches/0165-Change-the-reserved-channel-check-to-be-sensible.patch similarity index 100% rename from Spigot-API-Patches/0164-Change-the-reserved-channel-check-to-be-sensible.patch rename to Spigot-API-Patches/0165-Change-the-reserved-channel-check-to-be-sensible.patch diff --git a/Spigot-API-Patches/0165-Add-PlayerConnectionCloseEvent.patch b/Spigot-API-Patches/0166-Add-PlayerConnectionCloseEvent.patch similarity index 100% rename from Spigot-API-Patches/0165-Add-PlayerConnectionCloseEvent.patch rename to Spigot-API-Patches/0166-Add-PlayerConnectionCloseEvent.patch diff --git a/Spigot-API-Patches/0166-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch b/Spigot-API-Patches/0167-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch similarity index 100% rename from Spigot-API-Patches/0166-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch rename to Spigot-API-Patches/0167-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch diff --git a/Spigot-API-Patches/0167-BlockDestroyEvent.patch b/Spigot-API-Patches/0168-BlockDestroyEvent.patch similarity index 100% rename from Spigot-API-Patches/0167-BlockDestroyEvent.patch rename to Spigot-API-Patches/0168-BlockDestroyEvent.patch diff --git a/Spigot-API-Patches/0168-Add-ItemStack-Recipe-API-helper-methods.patch b/Spigot-API-Patches/0169-Add-ItemStack-Recipe-API-helper-methods.patch similarity index 100% rename from Spigot-API-Patches/0168-Add-ItemStack-Recipe-API-helper-methods.patch rename to Spigot-API-Patches/0169-Add-ItemStack-Recipe-API-helper-methods.patch diff --git a/Spigot-API-Patches/0169-Add-WhitelistToggleEvent.patch b/Spigot-API-Patches/0170-Add-WhitelistToggleEvent.patch similarity index 100% rename from Spigot-API-Patches/0169-Add-WhitelistToggleEvent.patch rename to Spigot-API-Patches/0170-Add-WhitelistToggleEvent.patch diff --git a/Spigot-API-Patches/0170-Annotation-Test-changes.patch b/Spigot-API-Patches/0171-Annotation-Test-changes.patch similarity index 100% rename from Spigot-API-Patches/0170-Annotation-Test-changes.patch rename to Spigot-API-Patches/0171-Annotation-Test-changes.patch diff --git a/Spigot-API-Patches/0171-Entity-getEntitySpawnReason.patch b/Spigot-API-Patches/0172-Entity-getEntitySpawnReason.patch similarity index 85% rename from Spigot-API-Patches/0171-Entity-getEntitySpawnReason.patch rename to Spigot-API-Patches/0172-Entity-getEntitySpawnReason.patch index b58744f1e4..cf940ce2fe 100644 --- a/Spigot-API-Patches/0171-Entity-getEntitySpawnReason.patch +++ b/Spigot-API-Patches/0172-Entity-getEntitySpawnReason.patch @@ -10,10 +10,10 @@ persistenting Living Entity, SPAWNER for spawners, or DEFAULT since data was not stored. diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java -index 71bda0f3be3c0b8b7fbb95e564101330d91f90c0..52144f9ddbe700dc4e7201642511219c47a334ed 100644 +index c137199ed0537874010f1abf311a9cbee56831ac..2622a2f5c9e2cb43aff7ef9eac2dcdb3fd8fad04 100644 --- a/src/main/java/org/bukkit/entity/Entity.java +++ b/src/main/java/org/bukkit/entity/Entity.java -@@ -656,5 +656,11 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent +@@ -662,5 +662,11 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent */ @NotNull Chunk getChunk(); diff --git a/Spigot-API-Patches/0172-Add-GS4-Query-event.patch b/Spigot-API-Patches/0173-Add-GS4-Query-event.patch similarity index 100% rename from Spigot-API-Patches/0172-Add-GS4-Query-event.patch rename to Spigot-API-Patches/0173-Add-GS4-Query-event.patch diff --git a/Spigot-API-Patches/0173-Add-PlayerPostRespawnEvent.patch b/Spigot-API-Patches/0174-Add-PlayerPostRespawnEvent.patch similarity index 100% rename from Spigot-API-Patches/0173-Add-PlayerPostRespawnEvent.patch rename to Spigot-API-Patches/0174-Add-PlayerPostRespawnEvent.patch diff --git a/Spigot-API-Patches/0174-Ignore-package-private-methods-for-nullability-annot.patch b/Spigot-API-Patches/0175-Ignore-package-private-methods-for-nullability-annot.patch similarity index 100% rename from Spigot-API-Patches/0174-Ignore-package-private-methods-for-nullability-annot.patch rename to Spigot-API-Patches/0175-Ignore-package-private-methods-for-nullability-annot.patch diff --git a/Spigot-API-Patches/0175-Flip-some-Spigot-API-null-annotations.patch b/Spigot-API-Patches/0176-Flip-some-Spigot-API-null-annotations.patch similarity index 87% rename from Spigot-API-Patches/0175-Flip-some-Spigot-API-null-annotations.patch rename to Spigot-API-Patches/0176-Flip-some-Spigot-API-null-annotations.patch index a4708c756d..44fe9be2e0 100644 --- a/Spigot-API-Patches/0175-Flip-some-Spigot-API-null-annotations.patch +++ b/Spigot-API-Patches/0176-Flip-some-Spigot-API-null-annotations.patch @@ -9,10 +9,10 @@ a ton of noise to plugin developers. These do not help plugin developers if they bring moise noise than value. diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index 91fe826435978591d0852986dedfbf6885f5588c..3025bd30bc345dd8c895aab012280f11e1d46fc8 100644 +index 908b75f0b9897ce830ed7c0a2c1dd0a458a872f1..1f5bcda86990d7c336db21d9c927bbf6b1b6d74d 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java -@@ -1263,7 +1263,7 @@ public final class Bukkit { +@@ -1377,7 +1377,7 @@ public final class Bukkit { * * @return the scoreboard manager or null if no worlds are loaded. */ @@ -21,7 +21,7 @@ index 91fe826435978591d0852986dedfbf6885f5588c..3025bd30bc345dd8c895aab012280f11 public static ScoreboardManager getScoreboardManager() { return server.getScoreboardManager(); } -@@ -1560,7 +1560,7 @@ public final class Bukkit { +@@ -1674,7 +1674,7 @@ public final class Bukkit { * @param clazz the class of the tag entries * @return the tag or null */ @@ -62,10 +62,10 @@ index 9c91c49ed7302c12fcb1d8e9bc58712efc199954..d5d67b3d84cd88ed0f858497e68535ec if (this.world == null) { return null; diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 836f94398cdd08003c58eee8ade53c5634da5be9..f1e3246b42794577272fb9ddb70ca62664f02d1d 100644 +index a68b973e7574cae3ee7be7cfc51786589280408a..39188fcf95beff906c68a822f6aa5e19ad3ad08c 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -1058,7 +1058,7 @@ public interface Server extends PluginMessageRecipient { +@@ -1160,7 +1160,7 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi * * @return the scoreboard manager or null if no worlds are loaded. */ @@ -74,7 +74,7 @@ index 836f94398cdd08003c58eee8ade53c5634da5be9..f1e3246b42794577272fb9ddb70ca626 ScoreboardManager getScoreboardManager(); /** -@@ -1328,7 +1328,7 @@ public interface Server extends PluginMessageRecipient { +@@ -1430,7 +1430,7 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi * @param clazz the class of the tag entries * @return the tag or null */ @@ -84,7 +84,7 @@ index 836f94398cdd08003c58eee8ade53c5634da5be9..f1e3246b42794577272fb9ddb70ca626 /** diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java -index 3cada34873e6da92363c8d920f3bbbd0670a32e0..03ba2265908d35bded0f38ed31187e5500e1b1f0 100644 +index 3578f491a053154789ad696e93c70fdde74912e6..0654873eef22d1e35c7430f098ff9e8f00b870e3 100644 --- a/src/main/java/org/bukkit/inventory/ItemFactory.java +++ b/src/main/java/org/bukkit/inventory/ItemFactory.java @@ -3,6 +3,7 @@ package org.bukkit.inventory; @@ -105,7 +105,7 @@ index 3cada34873e6da92363c8d920f3bbbd0670a32e0..03ba2265908d35bded0f38ed31187e55 /** diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java -index 4940ba6a979cec5bea0edc24b94149298c256bc3..d7d6a3e83dfd88359708749f5c12be02815c3580 100644 +index 41db4fdbf25d7a2a7b6db373cf2eecc8cd9a5aa7..699aa48312f2183f7d11655fe59e12d51d148afe 100644 --- a/src/main/java/org/bukkit/inventory/ItemStack.java +++ b/src/main/java/org/bukkit/inventory/ItemStack.java @@ -8,6 +8,7 @@ import java.util.Set; // Paper @@ -116,7 +116,7 @@ index 4940ba6a979cec5bea0edc24b94149298c256bc3..d7d6a3e83dfd88359708749f5c12be02 import org.bukkit.Utility; import org.bukkit.configuration.serialization.ConfigurationSerializable; import org.bukkit.enchantments.Enchantment; -@@ -546,7 +547,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable { +@@ -546,7 +547,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, net.kyor * * @return a copy of the current ItemStack's ItemData */ diff --git a/Spigot-API-Patches/0176-Server-Tick-Events.patch b/Spigot-API-Patches/0177-Server-Tick-Events.patch similarity index 100% rename from Spigot-API-Patches/0176-Server-Tick-Events.patch rename to Spigot-API-Patches/0177-Server-Tick-Events.patch diff --git a/Spigot-API-Patches/0177-PlayerDeathEvent-getItemsToKeep.patch b/Spigot-API-Patches/0178-PlayerDeathEvent-getItemsToKeep.patch similarity index 78% rename from Spigot-API-Patches/0177-PlayerDeathEvent-getItemsToKeep.patch rename to Spigot-API-Patches/0178-PlayerDeathEvent-getItemsToKeep.patch index 625a4dd36d..3a495cd623 100644 --- a/Spigot-API-Patches/0177-PlayerDeathEvent-getItemsToKeep.patch +++ b/Spigot-API-Patches/0178-PlayerDeathEvent-getItemsToKeep.patch @@ -8,13 +8,22 @@ Exposes a mutable array on items a player should keep on death Example Usage: https://gist.github.com/aikar/5bb202de6057a051a950ce1f29feb0b4 diff --git a/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java b/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java -index 07a52441a5cdd7e428a14b286d7cb5210e3efa97..1e97d04b3f3509f82d4cda1773909f91800bf5bc 100644 +index 11cc9da9ff23e4c84f203cb0e62a8624bfcf5260..cf83b3369d65b5ed3607d09ce5e079dfc847be2c 100644 --- a/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java +++ b/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java -@@ -17,6 +17,40 @@ public class PlayerDeathEvent extends EntityDeathEvent { - private boolean keepLevel = false; - private boolean keepInventory = false; +@@ -34,7 +34,6 @@ public class PlayerDeathEvent extends EntityDeathEvent { + } + // Paper end +- @Deprecated // Paper + public PlayerDeathEvent(@NotNull final Player player, @NotNull final List drops, final int droppedExp, @Nullable final String deathMessage) { + this(player, drops, droppedExp, 0, deathMessage); + } +@@ -53,6 +52,41 @@ public class PlayerDeathEvent extends EntityDeathEvent { + this.deathMessage = deathMessage != null ? net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(deathMessage) : net.kyori.adventure.text.Component.empty(); // Paper + } + ++ @Deprecated // Paper + // Paper start + private List itemsToKeep = new java.util.ArrayList<>(); + @@ -49,6 +58,6 @@ index 07a52441a5cdd7e428a14b286d7cb5210e3efa97..1e97d04b3f3509f82d4cda1773909f91 + } + // Paper end + - public PlayerDeathEvent(@NotNull final Player player, @NotNull final List drops, final int droppedExp, @Nullable final String deathMessage) { - this(player, drops, droppedExp, 0, deathMessage); - } + @NotNull + @Override + public Player getEntity() { diff --git a/Spigot-API-Patches/0178-Add-Heightmap-API.patch b/Spigot-API-Patches/0179-Add-Heightmap-API.patch similarity index 98% rename from Spigot-API-Patches/0178-Add-Heightmap-API.patch rename to Spigot-API-Patches/0179-Add-Heightmap-API.patch index 2c3ef42370..73e1e8d46f 100644 --- a/Spigot-API-Patches/0178-Add-Heightmap-API.patch +++ b/Spigot-API-Patches/0179-Add-Heightmap-API.patch @@ -103,10 +103,10 @@ index d5d67b3d84cd88ed0f858497e68535ec0162c700..432d5711b7ec34eafeb27df82d367612 * Creates explosion at this location with given power * diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index ad915c2a190fa5bb50cbf88dfd99798918c75a47..607d46e819867b20549b6b2717a9b2b3c37797b5 100644 +index 19060c7d9c74b9b2808103f3d5627444aece6ccb..f8e104d5e61e52c5fe658d7cda373f62424c7bea 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java -@@ -160,6 +160,87 @@ public interface World extends PluginMessageRecipient, Metadatable { +@@ -160,6 +160,87 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad @NotNull public Block getHighestBlockAt(@NotNull Location location); diff --git a/Spigot-API-Patches/0179-Mob-Spawner-API-Enhancements.patch b/Spigot-API-Patches/0180-Mob-Spawner-API-Enhancements.patch similarity index 100% rename from Spigot-API-Patches/0179-Mob-Spawner-API-Enhancements.patch rename to Spigot-API-Patches/0180-Mob-Spawner-API-Enhancements.patch diff --git a/Spigot-API-Patches/0180-Add-BlockSoundGroup-interface.patch b/Spigot-API-Patches/0181-Add-BlockSoundGroup-interface.patch similarity index 100% rename from Spigot-API-Patches/0180-Add-BlockSoundGroup-interface.patch rename to Spigot-API-Patches/0181-Add-BlockSoundGroup-interface.patch diff --git a/Spigot-API-Patches/0181-Amend-PlayerInteractAtEntityEvent-javadoc-for-ArmorS.patch b/Spigot-API-Patches/0182-Amend-PlayerInteractAtEntityEvent-javadoc-for-ArmorS.patch similarity index 100% rename from Spigot-API-Patches/0181-Amend-PlayerInteractAtEntityEvent-javadoc-for-ArmorS.patch rename to Spigot-API-Patches/0182-Amend-PlayerInteractAtEntityEvent-javadoc-for-ArmorS.patch diff --git a/Spigot-API-Patches/0182-Make-PlayerEvent-public.patch b/Spigot-API-Patches/0183-Make-PlayerEvent-public.patch similarity index 100% rename from Spigot-API-Patches/0182-Make-PlayerEvent-public.patch rename to Spigot-API-Patches/0183-Make-PlayerEvent-public.patch diff --git a/Spigot-API-Patches/0183-Increase-custom-payload-channel-message-size.patch b/Spigot-API-Patches/0184-Increase-custom-payload-channel-message-size.patch similarity index 100% rename from Spigot-API-Patches/0183-Increase-custom-payload-channel-message-size.patch rename to Spigot-API-Patches/0184-Increase-custom-payload-channel-message-size.patch diff --git a/Spigot-API-Patches/0184-Expose-the-internal-current-tick.patch b/Spigot-API-Patches/0185-Expose-the-internal-current-tick.patch similarity index 76% rename from Spigot-API-Patches/0184-Expose-the-internal-current-tick.patch rename to Spigot-API-Patches/0185-Expose-the-internal-current-tick.patch index dec53c7e2e..1370e6830d 100644 --- a/Spigot-API-Patches/0184-Expose-the-internal-current-tick.patch +++ b/Spigot-API-Patches/0185-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/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index 3025bd30bc345dd8c895aab012280f11e1d46fc8..683c9dc0f183cdee8dd909835c0cb0fe9b033075 100644 +index 1f5bcda86990d7c336db21d9c927bbf6b1b6d74d..3e2d644806233bb72f2f6637ec6edde4e3bcfdc9 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java -@@ -1709,6 +1709,10 @@ public final class Bukkit { +@@ -1823,6 +1823,10 @@ public final class Bukkit { public static com.destroystokyo.paper.profile.PlayerProfile createProfile(@Nullable UUID uuid, @Nullable String name) { return server.createProfile(uuid, name); } @@ -20,10 +20,10 @@ index 3025bd30bc345dd8c895aab012280f11e1d46fc8..683c9dc0f183cdee8dd909835c0cb0fe @NotNull diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index f1e3246b42794577272fb9ddb70ca62664f02d1d..af9f834f468cefbb72f798d63b9eb7b10811ed9f 100644 +index 39188fcf95beff906c68a822f6aa5e19ad3ad08c..f107b5658b60e59e9d98bc86a0313f4da201c190 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -1492,5 +1492,12 @@ public interface Server extends PluginMessageRecipient { +@@ -1598,5 +1598,12 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi */ @NotNull com.destroystokyo.paper.profile.PlayerProfile createProfile(@Nullable UUID uuid, @Nullable String name); diff --git a/Spigot-API-Patches/0185-PlayerDeathEvent-shouldDropExperience.patch b/Spigot-API-Patches/0186-PlayerDeathEvent-shouldDropExperience.patch similarity index 58% rename from Spigot-API-Patches/0185-PlayerDeathEvent-shouldDropExperience.patch rename to Spigot-API-Patches/0186-PlayerDeathEvent-shouldDropExperience.patch index 6df0416950..7e820c797a 100644 --- a/Spigot-API-Patches/0185-PlayerDeathEvent-shouldDropExperience.patch +++ b/Spigot-API-Patches/0186-PlayerDeathEvent-shouldDropExperience.patch @@ -5,7 +5,7 @@ Subject: [PATCH] PlayerDeathEvent#shouldDropExperience diff --git a/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java b/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java -index 1e97d04b3f3509f82d4cda1773909f91800bf5bc..3a743430acb5eecc4d8db068fa62fe6d38a249e5 100644 +index cf83b3369d65b5ed3607d09ce5e079dfc847be2c..199d0d2f02833690cbac3db63d3b9504cca7dd27 100644 --- a/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java +++ b/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java @@ -1,6 +1,8 @@ @@ -17,13 +17,49 @@ index 1e97d04b3f3509f82d4cda1773909f91800bf5bc..3a743430acb5eecc4d8db068fa62fe6d import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; import org.jetbrains.annotations.NotNull; -@@ -49,6 +51,23 @@ public class PlayerDeathEvent extends EntityDeathEvent { +@@ -17,6 +19,8 @@ public class PlayerDeathEvent extends EntityDeathEvent { + private boolean keepLevel = false; + private boolean keepInventory = false; + // Paper start ++ private boolean doExpDrop; ++ + public PlayerDeathEvent(@NotNull final Player player, @NotNull final List drops, final int droppedExp, @Nullable final net.kyori.adventure.text.Component deathMessage) { + this(player, drops, droppedExp, 0, deathMessage); + } +@@ -26,11 +30,16 @@ public class PlayerDeathEvent extends EntityDeathEvent { + } + + public PlayerDeathEvent(@NotNull final Player player, @NotNull final List drops, final int droppedExp, final int newExp, final int newTotalExp, final int newLevel, @Nullable final net.kyori.adventure.text.Component deathMessage) { ++ this(player, drops, droppedExp, newExp, newTotalExp, newLevel, deathMessage, true); ++ } ++ ++ public PlayerDeathEvent(@NotNull final Player player, @NotNull final List drops, final int droppedExp, final int newExp, final int newTotalExp, final int newLevel, @Nullable final net.kyori.adventure.text.Component deathMessage, boolean doExpDrop) { + super(player, drops, droppedExp); + this.newExp = newExp; + this.newTotalExp = newTotalExp; + this.newLevel = newLevel; + this.deathMessage = deathMessage; ++ this.doExpDrop = doExpDrop; + } + // Paper end + +@@ -45,6 +54,11 @@ public class PlayerDeathEvent extends EntityDeathEvent { + + @Deprecated // Paper + public PlayerDeathEvent(@NotNull final Player player, @NotNull final List drops, final int droppedExp, final int newExp, final int newTotalExp, final int newLevel, @Nullable final String deathMessage) { ++ this(player, drops, droppedExp, newExp, newTotalExp, newLevel, deathMessage, true); ++ } ++ ++ @Deprecated // Paper ++ public PlayerDeathEvent(@NotNull final Player player, @NotNull final List drops, final int droppedExp, final int newExp, final int newTotalExp, final int newLevel, @Nullable final String deathMessage, boolean doExpDrop) { + super(player, drops, droppedExp); + this.newExp = newExp; + this.newTotalExp = newTotalExp; +@@ -85,6 +99,20 @@ public class PlayerDeathEvent extends EntityDeathEvent { public List getItemsToKeep() { return itemsToKeep; } + -+ private boolean doExpDrop; -+ + /** + * @return should experience be dropped from this death + */ @@ -37,25 +73,6 @@ index 1e97d04b3f3509f82d4cda1773909f91800bf5bc..3a743430acb5eecc4d8db068fa62fe6d + public void setShouldDropExperience(boolean doExpDrop) { + this.doExpDrop = doExpDrop; + } -+ // Paper end - public PlayerDeathEvent(@NotNull final Player player, @NotNull final List drops, final int droppedExp, @Nullable final String deathMessage) { -@@ -60,11 +79,17 @@ public class PlayerDeathEvent extends EntityDeathEvent { - } - - public PlayerDeathEvent(@NotNull final Player player, @NotNull final List drops, final int droppedExp, final int newExp, final int newTotalExp, final int newLevel, @Nullable final String deathMessage) { -+ // Paper start -+ this(player, drops, droppedExp, newExp, newTotalExp, newLevel, deathMessage, player.getGameMode() != GameMode.SPECTATOR); -+ } -+ public PlayerDeathEvent(@NotNull final Player player, @NotNull final List drops, final int droppedExp, final int newExp, final int newTotalExp, final int newLevel, @Nullable final String deathMessage, boolean doExpDrop) { -+ // Paper end - super(player, drops, droppedExp); - this.newExp = newExp; - this.newTotalExp = newTotalExp; - this.newLevel = newLevel; - this.deathMessage = deathMessage; -+ this.doExpDrop = doExpDrop; // Paper - } - @NotNull diff --git a/Spigot-API-Patches/0186-Add-effect-to-block-break-naturally.patch b/Spigot-API-Patches/0187-Add-effect-to-block-break-naturally.patch similarity index 100% rename from Spigot-API-Patches/0186-Add-effect-to-block-break-naturally.patch rename to Spigot-API-Patches/0187-Add-effect-to-block-break-naturally.patch diff --git a/Spigot-API-Patches/0187-Add-ThrownEggHatchEvent.patch b/Spigot-API-Patches/0188-Add-ThrownEggHatchEvent.patch similarity index 100% rename from Spigot-API-Patches/0187-Add-ThrownEggHatchEvent.patch rename to Spigot-API-Patches/0188-Add-ThrownEggHatchEvent.patch diff --git a/Spigot-API-Patches/0188-Entity-Jump-API.patch b/Spigot-API-Patches/0189-Entity-Jump-API.patch similarity index 100% rename from Spigot-API-Patches/0188-Entity-Jump-API.patch rename to Spigot-API-Patches/0189-Entity-Jump-API.patch diff --git a/Spigot-API-Patches/0189-add-hand-to-BlockMultiPlaceEvent.patch b/Spigot-API-Patches/0190-add-hand-to-BlockMultiPlaceEvent.patch similarity index 100% rename from Spigot-API-Patches/0189-add-hand-to-BlockMultiPlaceEvent.patch rename to Spigot-API-Patches/0190-add-hand-to-BlockMultiPlaceEvent.patch diff --git a/Spigot-API-Patches/0190-Add-tick-times-API.patch b/Spigot-API-Patches/0191-Add-tick-times-API.patch similarity index 82% rename from Spigot-API-Patches/0190-Add-tick-times-API.patch rename to Spigot-API-Patches/0191-Add-tick-times-API.patch index 41d7e58132..17977550d7 100644 --- a/Spigot-API-Patches/0190-Add-tick-times-API.patch +++ b/Spigot-API-Patches/0191-Add-tick-times-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add tick times API diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index 683c9dc0f183cdee8dd909835c0cb0fe9b033075..2d73a06dc6b6a5163696750cb563d52e327ab4d1 100644 +index 3e2d644806233bb72f2f6637ec6edde4e3bcfdc9..296c8fbb9239ab28f5ebbd4c322a3b9226a3ce11 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java -@@ -1464,6 +1464,25 @@ public final class Bukkit { +@@ -1578,6 +1578,25 @@ public final class Bukkit { public static double[] getTPS() { return server.getTPS(); } @@ -35,10 +35,10 @@ index 683c9dc0f183cdee8dd909835c0cb0fe9b033075..2d73a06dc6b6a5163696750cb563d52e /** diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index af9f834f468cefbb72f798d63b9eb7b10811ed9f..a15e672be066cef7828a8e0c5b09209d8c268181 100644 +index f107b5658b60e59e9d98bc86a0313f4da201c190..7195b480a16aa67f8e06fd3064b1072eafbb27b2 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -1232,6 +1232,21 @@ public interface Server extends PluginMessageRecipient { +@@ -1334,6 +1334,21 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi */ @NotNull public double[] getTPS(); diff --git a/Spigot-API-Patches/0191-Expose-MinecraftServer-isRunning.patch b/Spigot-API-Patches/0192-Expose-MinecraftServer-isRunning.patch similarity index 79% rename from Spigot-API-Patches/0191-Expose-MinecraftServer-isRunning.patch rename to Spigot-API-Patches/0192-Expose-MinecraftServer-isRunning.patch index 188d9830af..f98e0d9d7a 100644 --- a/Spigot-API-Patches/0191-Expose-MinecraftServer-isRunning.patch +++ b/Spigot-API-Patches/0192-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/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index 2d73a06dc6b6a5163696750cb563d52e327ab4d1..6a8e8b039e0c6473a540824ae1f22b1ab321d6ca 100644 +index 296c8fbb9239ab28f5ebbd4c322a3b9226a3ce11..86ac6702b3aeab1126b2b2879b87ef3883793d44 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java -@@ -1732,6 +1732,15 @@ public final class Bukkit { +@@ -1846,6 +1846,15 @@ public final class Bukkit { public static int getCurrentTick() { return server.getCurrentTick(); } @@ -26,10 +26,10 @@ index 2d73a06dc6b6a5163696750cb563d52e327ab4d1..6a8e8b039e0c6473a540824ae1f22b1a @NotNull diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index a15e672be066cef7828a8e0c5b09209d8c268181..0269120a74d6368647ef3ad84d8c55640d38c152 100644 +index 7195b480a16aa67f8e06fd3064b1072eafbb27b2..16a74b834c4d4b907f9b11ccf9ef9804514df224 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -1514,5 +1514,12 @@ public interface Server extends PluginMessageRecipient { +@@ -1620,5 +1620,12 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi * @return Current tick */ int getCurrentTick(); diff --git a/Spigot-API-Patches/0192-Disable-Sync-Events-firing-Async-errors-during-shutd.patch b/Spigot-API-Patches/0193-Disable-Sync-Events-firing-Async-errors-during-shutd.patch similarity index 100% rename from Spigot-API-Patches/0192-Disable-Sync-Events-firing-Async-errors-during-shutd.patch rename to Spigot-API-Patches/0193-Disable-Sync-Events-firing-Async-errors-during-shutd.patch diff --git a/Spigot-API-Patches/0193-Make-JavaPluginLoader-thread-safe.patch b/Spigot-API-Patches/0194-Make-JavaPluginLoader-thread-safe.patch similarity index 100% rename from Spigot-API-Patches/0193-Make-JavaPluginLoader-thread-safe.patch rename to Spigot-API-Patches/0194-Make-JavaPluginLoader-thread-safe.patch diff --git a/Spigot-API-Patches/0194-Add-Player-Client-Options-API.patch b/Spigot-API-Patches/0195-Add-Player-Client-Options-API.patch similarity index 96% rename from Spigot-API-Patches/0194-Add-Player-Client-Options-API.patch rename to Spigot-API-Patches/0195-Add-Player-Client-Options-API.patch index 73d4ceb132..e93db8142a 100644 --- a/Spigot-API-Patches/0194-Add-Player-Client-Options-API.patch +++ b/Spigot-API-Patches/0195-Add-Player-Client-Options-API.patch @@ -176,7 +176,7 @@ index 0000000000000000000000000000000000000000..f7f171c4ee0b8339b2f8fbe82442d65f + } +} diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index 61989130ba8d72a39002ce81eec7f4aa1943fba0..ccad99e3742d3be76b00427ea794ad133205aff9 100644 +index aff3e3ec0f9ef649196d7896be926f9f5681186e..11ffc00c53e305ed607063fc44c5a0a9dabddc34 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java @@ -2,6 +2,7 @@ package org.bukkit.entity; @@ -185,9 +185,9 @@ index 61989130ba8d72a39002ce81eec7f4aa1943fba0..ccad99e3742d3be76b00427ea794ad13 import java.util.UUID; +import com.destroystokyo.paper.ClientOption; // Paper import com.destroystokyo.paper.Title; // Paper + import net.kyori.adventure.text.Component; import com.destroystokyo.paper.profile.PlayerProfile; // Paper - import java.util.Date; // Paper -@@ -1773,6 +1774,12 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1933,6 +1934,12 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * Reset the cooldown counter to 0, effectively starting the cooldown period. */ void resetCooldown(); diff --git a/Spigot-API-Patches/0195-Add-PlayerAttackEntityCooldownResetEvent.patch b/Spigot-API-Patches/0196-Add-PlayerAttackEntityCooldownResetEvent.patch similarity index 100% rename from Spigot-API-Patches/0195-Add-PlayerAttackEntityCooldownResetEvent.patch rename to Spigot-API-Patches/0196-Add-PlayerAttackEntityCooldownResetEvent.patch diff --git a/Spigot-API-Patches/0196-Fix-Potion-toItemStack-swapping-the-extended-and-upg.patch b/Spigot-API-Patches/0197-Fix-Potion-toItemStack-swapping-the-extended-and-upg.patch similarity index 100% rename from Spigot-API-Patches/0196-Fix-Potion-toItemStack-swapping-the-extended-and-upg.patch rename to Spigot-API-Patches/0197-Fix-Potion-toItemStack-swapping-the-extended-and-upg.patch diff --git a/Spigot-API-Patches/0197-Villager-Restocks-API.patch b/Spigot-API-Patches/0198-Villager-Restocks-API.patch similarity index 100% rename from Spigot-API-Patches/0197-Villager-Restocks-API.patch rename to Spigot-API-Patches/0198-Villager-Restocks-API.patch diff --git a/Spigot-API-Patches/0198-Expose-game-version.patch b/Spigot-API-Patches/0199-Expose-game-version.patch similarity index 87% rename from Spigot-API-Patches/0198-Expose-game-version.patch rename to Spigot-API-Patches/0199-Expose-game-version.patch index f1fc994f12..560d2370a1 100644 --- a/Spigot-API-Patches/0198-Expose-game-version.patch +++ b/Spigot-API-Patches/0199-Expose-game-version.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Expose game version diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index 6a8e8b039e0c6473a540824ae1f22b1ab321d6ca..31b2150a7c3c93aa2581a85095a60e17aa469ea6 100644 +index 86ac6702b3aeab1126b2b2879b87ef3883793d44..12214ce2af7363d40cf44652e46f05c5c1f2fe5a 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java @@ -118,6 +118,18 @@ public final class Bukkit { @@ -28,10 +28,10 @@ index 6a8e8b039e0c6473a540824ae1f22b1ab321d6ca..31b2150a7c3c93aa2581a85095a60e17 * Gets a view of all currently logged in players. This {@linkplain * Collections#unmodifiableCollection(Collection) view} is a reused diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 0269120a74d6368647ef3ad84d8c55640d38c152..7daad551f79a5d4d1ba4e63708fd59843fde7c2e 100644 +index 16a74b834c4d4b907f9b11ccf9ef9804514df224..360decea2eb6de4c567fa4cceea8f19bceff6823 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -97,6 +97,16 @@ public interface Server extends PluginMessageRecipient { +@@ -97,6 +97,16 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi @NotNull public String getBukkitVersion(); diff --git a/Spigot-API-Patches/0199-Add-item-slot-convenience-methods.patch b/Spigot-API-Patches/0200-Add-item-slot-convenience-methods.patch similarity index 100% rename from Spigot-API-Patches/0199-Add-item-slot-convenience-methods.patch rename to Spigot-API-Patches/0200-Add-item-slot-convenience-methods.patch diff --git a/Spigot-API-Patches/0200-Add-Mob-Goal-API.patch b/Spigot-API-Patches/0201-Add-Mob-Goal-API.patch similarity index 98% rename from Spigot-API-Patches/0200-Add-Mob-Goal-API.patch rename to Spigot-API-Patches/0201-Add-Mob-Goal-API.patch index 21c15829e7..a93d7da4fe 100644 --- a/Spigot-API-Patches/0200-Add-Mob-Goal-API.patch +++ b/Spigot-API-Patches/0201-Add-Mob-Goal-API.patch @@ -441,10 +441,10 @@ index 0000000000000000000000000000000000000000..b42091752981a1f309ab350e9a394092 + GoalKey UNIVERSAL_ANGER_RESET = GoalKey.of(Mob.class, NamespacedKey.minecraft("universal_anger_reset")); +} diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index 31b2150a7c3c93aa2581a85095a60e17aa469ea6..263be0e9c6366da2e8c6371968a70171ac59c3f8 100644 +index 12214ce2af7363d40cf44652e46f05c5c1f2fe5a..77d352450f6bc5293efec3b75e08b857e2626fe7 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java -@@ -1753,6 +1753,16 @@ public final class Bukkit { +@@ -1867,6 +1867,16 @@ public final class Bukkit { public static boolean isStopping() { return server.isStopping(); } @@ -462,10 +462,10 @@ index 31b2150a7c3c93aa2581a85095a60e17aa469ea6..263be0e9c6366da2e8c6371968a70171 @NotNull diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 7daad551f79a5d4d1ba4e63708fd59843fde7c2e..8feb99cddbab6d63c34f50828f1b7799b50bd373 100644 +index 360decea2eb6de4c567fa4cceea8f19bceff6823..4b1f515f2228f16c1ce793bd45510243d758236f 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -1531,5 +1531,13 @@ public interface Server extends PluginMessageRecipient { +@@ -1637,5 +1637,13 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi * @return true if server is in the process of being shutdown */ boolean isStopping(); diff --git a/Spigot-API-Patches/0201-World-view-distance-api.patch b/Spigot-API-Patches/0202-World-view-distance-api.patch similarity index 87% rename from Spigot-API-Patches/0201-World-view-distance-api.patch rename to Spigot-API-Patches/0202-World-view-distance-api.patch index 248364be87..f036a64c8b 100644 --- a/Spigot-API-Patches/0201-World-view-distance-api.patch +++ b/Spigot-API-Patches/0202-World-view-distance-api.patch @@ -5,10 +5,10 @@ Subject: [PATCH] World view distance api diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index 607d46e819867b20549b6b2717a9b2b3c37797b5..22b913071af2526e73a571cdf8889b0f19e22d6e 100644 +index f8e104d5e61e52c5fe658d7cda373f62424c7bea..aefcd3c1b6e825ccba1b19444778a7529b1b1f53 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java -@@ -3406,6 +3406,34 @@ public interface World extends PluginMessageRecipient, Metadatable { +@@ -3405,6 +3405,34 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad int getViewDistance(); // Spigot end diff --git a/Spigot-API-Patches/0202-Add-villager-reputation-API.patch b/Spigot-API-Patches/0203-Add-villager-reputation-API.patch similarity index 100% rename from Spigot-API-Patches/0202-Add-villager-reputation-API.patch rename to Spigot-API-Patches/0203-Add-villager-reputation-API.patch diff --git a/Spigot-API-Patches/0203-Spawn-Reason-API.patch b/Spigot-API-Patches/0204-Spawn-Reason-API.patch similarity index 90% rename from Spigot-API-Patches/0203-Spawn-Reason-API.patch rename to Spigot-API-Patches/0204-Spawn-Reason-API.patch index ec97c0f2be..f5278ce5fc 100644 --- a/Spigot-API-Patches/0203-Spawn-Reason-API.patch +++ b/Spigot-API-Patches/0204-Spawn-Reason-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Spawn Reason API diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index 22b913071af2526e73a571cdf8889b0f19e22d6e..9b12fbec82017d8cbb21b5a8c3d563f1974dc1c5 100644 +index aefcd3c1b6e825ccba1b19444778a7529b1b1f53..b1b12cd1c53ca4666d0f2e77853f3a11441d24e5 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java @@ -1,6 +1,8 @@ @@ -17,7 +17,7 @@ index 22b913071af2526e73a571cdf8889b0f19e22d6e..9b12fbec82017d8cbb21b5a8c3d563f1 import org.bukkit.generator.ChunkGenerator; import java.util.ArrayList; -@@ -2217,6 +2219,12 @@ public interface World extends PluginMessageRecipient, Metadatable { +@@ -2216,6 +2218,12 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad @NotNull public T spawn(@NotNull Location location, @NotNull Class clazz) throws IllegalArgumentException; @@ -30,7 +30,7 @@ index 22b913071af2526e73a571cdf8889b0f19e22d6e..9b12fbec82017d8cbb21b5a8c3d563f1 /** * Spawn an entity of a specific class at the given {@link Location}, with * the supplied function run before the entity is added to the world. -@@ -2234,7 +2242,28 @@ public interface World extends PluginMessageRecipient, Metadatable { +@@ -2233,7 +2241,28 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad * {@link Entity} requested cannot be spawned */ @NotNull diff --git a/Spigot-API-Patches/0204-Potential-bed-API.patch b/Spigot-API-Patches/0205-Potential-bed-API.patch similarity index 100% rename from Spigot-API-Patches/0204-Potential-bed-API.patch rename to Spigot-API-Patches/0205-Potential-bed-API.patch diff --git a/Spigot-API-Patches/0205-Prioritise-own-classes-where-possible.patch b/Spigot-API-Patches/0206-Prioritise-own-classes-where-possible.patch similarity index 100% rename from Spigot-API-Patches/0205-Prioritise-own-classes-where-possible.patch rename to Spigot-API-Patches/0206-Prioritise-own-classes-where-possible.patch diff --git a/Spigot-API-Patches/0206-Add-Raw-Byte-ItemStack-Serialization.patch b/Spigot-API-Patches/0207-Add-Raw-Byte-ItemStack-Serialization.patch similarity index 92% rename from Spigot-API-Patches/0206-Add-Raw-Byte-ItemStack-Serialization.patch rename to Spigot-API-Patches/0207-Add-Raw-Byte-ItemStack-Serialization.patch index 18c9706ff2..81024bb927 100644 --- a/Spigot-API-Patches/0206-Add-Raw-Byte-ItemStack-Serialization.patch +++ b/Spigot-API-Patches/0207-Add-Raw-Byte-ItemStack-Serialization.patch @@ -20,10 +20,10 @@ index 541e28a9bece0beb0c2cf02c39030840b758c6e6..d3ec5084e33dff038d54cdd2aeb703a3 // Paper end } diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java -index d7d6a3e83dfd88359708749f5c12be02815c3580..4f2520f7a4ca6d57a85924ada1068a055b9a01fb 100644 +index 699aa48312f2183f7d11655fe59e12d51d148afe..7531fc910ed65dc12e242cf5042ce4cef9fe661d 100644 --- a/src/main/java/org/bukkit/inventory/ItemStack.java +++ b/src/main/java/org/bukkit/inventory/ItemStack.java -@@ -613,6 +613,30 @@ public class ItemStack implements Cloneable, ConfigurationSerializable { +@@ -619,6 +619,30 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, net.kyor return Bukkit.getServer().getItemFactory().ensureServerConversions(this); } diff --git a/Spigot-API-Patches/0207-Provide-a-useful-PluginClassLoader-toString.patch b/Spigot-API-Patches/0208-Provide-a-useful-PluginClassLoader-toString.patch similarity index 100% rename from Spigot-API-Patches/0207-Provide-a-useful-PluginClassLoader-toString.patch rename to Spigot-API-Patches/0208-Provide-a-useful-PluginClassLoader-toString.patch diff --git a/Spigot-API-Patches/0208-Inventory-getHolder-method-without-block-snapshot.patch b/Spigot-API-Patches/0209-Inventory-getHolder-method-without-block-snapshot.patch similarity index 100% rename from Spigot-API-Patches/0208-Inventory-getHolder-method-without-block-snapshot.patch rename to Spigot-API-Patches/0209-Inventory-getHolder-method-without-block-snapshot.patch diff --git a/Spigot-API-Patches/0209-Expose-Arrow-getItemStack.patch b/Spigot-API-Patches/0210-Expose-Arrow-getItemStack.patch similarity index 100% rename from Spigot-API-Patches/0209-Expose-Arrow-getItemStack.patch rename to Spigot-API-Patches/0210-Expose-Arrow-getItemStack.patch diff --git a/Spigot-API-Patches/0210-Add-and-implement-PlayerRecipeBookClickEvent.patch b/Spigot-API-Patches/0211-Add-and-implement-PlayerRecipeBookClickEvent.patch similarity index 100% rename from Spigot-API-Patches/0210-Add-and-implement-PlayerRecipeBookClickEvent.patch rename to Spigot-API-Patches/0211-Add-and-implement-PlayerRecipeBookClickEvent.patch diff --git a/Spigot-API-Patches/0211-Support-components-in-ItemMeta.patch b/Spigot-API-Patches/0212-Support-components-in-ItemMeta.patch similarity index 68% rename from Spigot-API-Patches/0211-Support-components-in-ItemMeta.patch rename to Spigot-API-Patches/0212-Support-components-in-ItemMeta.patch index df59d38f9d..1b51f21c69 100644 --- a/Spigot-API-Patches/0211-Support-components-in-ItemMeta.patch +++ b/Spigot-API-Patches/0212-Support-components-in-ItemMeta.patch @@ -5,10 +5,18 @@ Subject: [PATCH] Support components in ItemMeta diff --git a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java -index 7e0b1d363829031075b6822d7b35ccde9fc05da9..5db838cab09888c3b3537e122e0e381a78e1dbb7 100644 +index 01b462fccce71cef3398dd43944046f322b8e57e..f093f991f1fedd20fcef041b093398250b7fb286 100644 --- a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java +++ b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java -@@ -42,6 +42,18 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste +@@ -5,6 +5,7 @@ import java.util.Collection; + import java.util.List; + import java.util.Map; + import java.util.Set; ++import net.kyori.adventure.text.Component; + import org.bukkit.attribute.Attribute; + import org.bukkit.attribute.AttributeModifier; + import org.bukkit.configuration.serialization.ConfigurationSerializable; +@@ -62,6 +63,20 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste @NotNull String getDisplayName(); @@ -20,15 +28,17 @@ index 7e0b1d363829031075b6822d7b35ccde9fc05da9..5db838cab09888c3b3537e122e0e381a + * before calling this method. + * + * @return the display name that is set ++ * @deprecated use {@link #displayName()} + */ + @NotNull ++ @Deprecated + net.md_5.bungee.api.chat.BaseComponent[] getDisplayNameComponent(); + // Paper end /** * Sets the display name. * -@@ -49,6 +61,14 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste - */ +@@ -71,6 +86,16 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste + @Deprecated // Paper void setDisplayName(@Nullable String name); + // Paper start @@ -36,13 +46,15 @@ index 7e0b1d363829031075b6822d7b35ccde9fc05da9..5db838cab09888c3b3537e122e0e381a + * Sets the display name. + * + * @param component the name component to set ++ * @deprecated use {@link #displayName(Component)} + */ ++ @Deprecated + void setDisplayNameComponent(@Nullable net.md_5.bungee.api.chat.BaseComponent[] component); + // Paper end /** * Checks for existence of a localized name. * -@@ -92,6 +112,17 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste +@@ -134,6 +159,19 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste @Nullable List getLore(); @@ -53,15 +65,17 @@ index 7e0b1d363829031075b6822d7b35ccde9fc05da9..5db838cab09888c3b3537e122e0e381a + * calling this method. + * + * @return a list of lore that is set ++ * @deprecated use {@link #lore()} + */ + @Nullable ++ @Deprecated + List getLoreComponents(); + /** * Sets the lore for this item. * Removes lore when given null. -@@ -100,6 +131,14 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste - */ +@@ -144,6 +182,16 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste + @Deprecated // Paper void setLore(@Nullable List lore); + /** @@ -69,7 +83,9 @@ index 7e0b1d363829031075b6822d7b35ccde9fc05da9..5db838cab09888c3b3537e122e0e381a + * Removes lore when given null. + * + * @param lore the lore that will be set ++ * @deprecated use {@link #lore(List)} + */ ++ @Deprecated + void setLoreComponents(@Nullable List lore); + /** diff --git a/Spigot-API-Patches/0212-added-2-new-TargetReasons-for-1.16-mob-behavior.patch b/Spigot-API-Patches/0213-added-2-new-TargetReasons-for-1.16-mob-behavior.patch similarity index 100% rename from Spigot-API-Patches/0212-added-2-new-TargetReasons-for-1.16-mob-behavior.patch rename to Spigot-API-Patches/0213-added-2-new-TargetReasons-for-1.16-mob-behavior.patch diff --git a/Spigot-API-Patches/0213-Add-entity-liquid-API.patch b/Spigot-API-Patches/0214-Add-entity-liquid-API.patch similarity index 88% rename from Spigot-API-Patches/0213-Add-entity-liquid-API.patch rename to Spigot-API-Patches/0214-Add-entity-liquid-API.patch index d2310a82bd..c13d4c2cb3 100644 --- a/Spigot-API-Patches/0213-Add-entity-liquid-API.patch +++ b/Spigot-API-Patches/0214-Add-entity-liquid-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add entity liquid API diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java -index 52144f9ddbe700dc4e7201642511219c47a334ed..9aa80ba2df23e83642ff2bb1afa9ee9ea9ce47dd 100644 +index 2622a2f5c9e2cb43aff7ef9eac2dcdb3fd8fad04..75cebfca7b436ef30b718bba7e0566d047e5c61a 100644 --- a/src/main/java/org/bukkit/entity/Entity.java +++ b/src/main/java/org/bukkit/entity/Entity.java -@@ -662,5 +662,35 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent +@@ -668,5 +668,35 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent */ @NotNull org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason getEntitySpawnReason(); diff --git a/Spigot-API-Patches/0214-Add-PrepareResultEvent-PrepareGrindstoneEvent.patch b/Spigot-API-Patches/0215-Add-PrepareResultEvent-PrepareGrindstoneEvent.patch similarity index 100% rename from Spigot-API-Patches/0214-Add-PrepareResultEvent-PrepareGrindstoneEvent.patch rename to Spigot-API-Patches/0215-Add-PrepareResultEvent-PrepareGrindstoneEvent.patch diff --git a/Spigot-API-Patches/0215-Allow-delegation-to-vanilla-chunk-gen.patch b/Spigot-API-Patches/0216-Allow-delegation-to-vanilla-chunk-gen.patch similarity index 89% rename from Spigot-API-Patches/0215-Allow-delegation-to-vanilla-chunk-gen.patch rename to Spigot-API-Patches/0216-Allow-delegation-to-vanilla-chunk-gen.patch index 48c3fd88b2..1f3141b243 100644 --- a/Spigot-API-Patches/0215-Allow-delegation-to-vanilla-chunk-gen.patch +++ b/Spigot-API-Patches/0216-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/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index 263be0e9c6366da2e8c6371968a70171ac59c3f8..e340ef507d5a2b6b14114d0f061679c1a90884d4 100644 +index 77d352450f6bc5293efec3b75e08b857e2626fe7..1eaf6aae1e13c48a7f911e523015cb9b8cca8638 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java -@@ -1364,6 +1364,22 @@ public final class Bukkit { +@@ -1478,6 +1478,22 @@ public final class Bukkit { return server.createChunkData(world); } @@ -32,10 +32,10 @@ index 263be0e9c6366da2e8c6371968a70171ac59c3f8..e340ef507d5a2b6b14114d0f061679c1 * Creates a boss bar instance to display to players. The progress * defaults to 1.0 diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 8feb99cddbab6d63c34f50828f1b7799b50bd373..73537af41d010283221418084c244261f262ceab 100644 +index 4b1f515f2228f16c1ce793bd45510243d758236f..8ee02c3d6cc8751704e5993fecd05293714e492f 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -1143,6 +1143,20 @@ public interface Server extends PluginMessageRecipient { +@@ -1245,6 +1245,20 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi @NotNull public ChunkGenerator.ChunkData createChunkData(@NotNull World world); diff --git a/Spigot-API-Patches/0216-Support-hex-colors-in-getLastColors.patch b/Spigot-API-Patches/0217-Support-hex-colors-in-getLastColors.patch similarity index 100% rename from Spigot-API-Patches/0216-Support-hex-colors-in-getLastColors.patch rename to Spigot-API-Patches/0217-Support-hex-colors-in-getLastColors.patch diff --git a/Spigot-API-Patches/0217-Add-setMaxPlayers-API.patch b/Spigot-API-Patches/0218-Add-setMaxPlayers-API.patch similarity index 86% rename from Spigot-API-Patches/0217-Add-setMaxPlayers-API.patch rename to Spigot-API-Patches/0218-Add-setMaxPlayers-API.patch index 050ca28dd9..17b9d923f2 100644 --- a/Spigot-API-Patches/0217-Add-setMaxPlayers-API.patch +++ b/Spigot-API-Patches/0218-Add-setMaxPlayers-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add #setMaxPlayers API diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index e340ef507d5a2b6b14114d0f061679c1a90884d4..9ec0608a79bc9cf3a992f9e549fd471e10e6bb5e 100644 +index 1eaf6aae1e13c48a7f911e523015cb9b8cca8638..6228d7eca85fba52296c8d63d32804f32af1b421 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java @@ -171,6 +171,17 @@ public final class Bukkit { @@ -27,10 +27,10 @@ index e340ef507d5a2b6b14114d0f061679c1a90884d4..9ec0608a79bc9cf3a992f9e549fd471e * Get the game port that the server runs on. * diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 73537af41d010283221418084c244261f262ceab..69070e472518fba66581e6050d3308d46c1d1608 100644 +index 8ee02c3d6cc8751704e5993fecd05293714e492f..6237578b373002c009efde4fb4c1864f0bf4f19e 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -144,6 +144,15 @@ public interface Server extends PluginMessageRecipient { +@@ -144,6 +144,15 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi */ public int getMaxPlayers(); diff --git a/Spigot-API-Patches/0218-Add-moon-phase-API.patch b/Spigot-API-Patches/0219-Add-moon-phase-API.patch similarity index 93% rename from Spigot-API-Patches/0218-Add-moon-phase-API.patch rename to Spigot-API-Patches/0219-Add-moon-phase-API.patch index 91b79a98d7..9148fb9a19 100644 --- a/Spigot-API-Patches/0218-Add-moon-phase-API.patch +++ b/Spigot-API-Patches/0219-Add-moon-phase-API.patch @@ -47,10 +47,10 @@ index 0000000000000000000000000000000000000000..df05153397b42930cd53d37b30824c7e + } +} diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index 9b12fbec82017d8cbb21b5a8c3d563f1974dc1c5..042baabf18f86a9c915db7e9d515f26f840a12d7 100644 +index b1b12cd1c53ca4666d0f2e77853f3a11441d24e5..301c8b34329e410df4f99c8617f768c48e4ea99d 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java -@@ -70,6 +70,12 @@ public interface World extends PluginMessageRecipient, Metadatable { +@@ -70,6 +70,12 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad * @return The amount of Players in this world */ int getPlayerCount(); diff --git a/Spigot-API-Patches/0219-Add-playPickupItemAnimation-to-LivingEntity.patch b/Spigot-API-Patches/0220-Add-playPickupItemAnimation-to-LivingEntity.patch similarity index 100% rename from Spigot-API-Patches/0219-Add-playPickupItemAnimation-to-LivingEntity.patch rename to Spigot-API-Patches/0220-Add-playPickupItemAnimation-to-LivingEntity.patch diff --git a/Spigot-API-Patches/0220-Add-BellRingEvent.patch b/Spigot-API-Patches/0221-Add-BellRingEvent.patch similarity index 100% rename from Spigot-API-Patches/0220-Add-BellRingEvent.patch rename to Spigot-API-Patches/0221-Add-BellRingEvent.patch diff --git a/Spigot-API-Patches/0221-Brand-support.patch b/Spigot-API-Patches/0222-Brand-support.patch similarity index 85% rename from Spigot-API-Patches/0221-Brand-support.patch rename to Spigot-API-Patches/0222-Brand-support.patch index d3f5a33d2c..abbf6847e2 100644 --- a/Spigot-API-Patches/0221-Brand-support.patch +++ b/Spigot-API-Patches/0222-Brand-support.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Brand support diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index ccad99e3742d3be76b00427ea794ad133205aff9..2324e85548bc0d50886e5e5cd0bc36022eb0cf88 100644 +index 11ffc00c53e305ed607063fc44c5a0a9dabddc34..00f78c26686ff18494abf9ebc173fbb3df5677b3 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -1900,6 +1900,16 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -2068,6 +2068,16 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM // Paper end } diff --git a/Spigot-API-Patches/0222-Add-more-Evoker-API.patch b/Spigot-API-Patches/0223-Add-more-Evoker-API.patch similarity index 100% rename from Spigot-API-Patches/0222-Add-more-Evoker-API.patch rename to Spigot-API-Patches/0223-Add-more-Evoker-API.patch diff --git a/Spigot-API-Patches/0223-Add-a-way-to-get-translation-keys-for-blocks-entitie.patch b/Spigot-API-Patches/0224-Add-a-way-to-get-translation-keys-for-blocks-entitie.patch similarity index 95% rename from Spigot-API-Patches/0223-Add-a-way-to-get-translation-keys-for-blocks-entitie.patch rename to Spigot-API-Patches/0224-Add-a-way-to-get-translation-keys-for-blocks-entitie.patch index 2d8ba0fdc0..6adb9e7578 100644 --- a/Spigot-API-Patches/0223-Add-a-way-to-get-translation-keys-for-blocks-entitie.patch +++ b/Spigot-API-Patches/0224-Add-a-way-to-get-translation-keys-for-blocks-entitie.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add a way to get translation keys for blocks, entities and diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java -index 2e959d195f7a5e723952e421aeaeeb463f07d3f5..2a3becabbd10fa8ffd19f35a3f6d8a6bfcb388c3 100644 +index e203c5bfc1d1bf6b500ef8a4446d3aef182b8ecb..4ba991b79f13219182df35b4ce0c5cf57cbd208b 100644 --- a/src/main/java/org/bukkit/Material.java +++ b/src/main/java/org/bukkit/Material.java -@@ -3577,6 +3577,16 @@ public enum Material implements Keyed { +@@ -3580,6 +3580,16 @@ public enum Material implements Keyed { } return false; } diff --git a/Spigot-API-Patches/0224-Create-HoverEvent-from-ItemStack-Entity.patch b/Spigot-API-Patches/0225-Create-HoverEvent-from-ItemStack-Entity.patch similarity index 84% rename from Spigot-API-Patches/0224-Create-HoverEvent-from-ItemStack-Entity.patch rename to Spigot-API-Patches/0225-Create-HoverEvent-from-ItemStack-Entity.patch index af82fe1fd5..6a9da8a8df 100644 --- a/Spigot-API-Patches/0224-Create-HoverEvent-from-ItemStack-Entity.patch +++ b/Spigot-API-Patches/0225-Create-HoverEvent-from-ItemStack-Entity.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Create HoverEvent from ItemStack Entity diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java -index 03ba2265908d35bded0f38ed31187e5500e1b1f0..3f23927e58e0ccf8cf04d4beb4d83346e3f84730 100644 +index 0654873eef22d1e35c7430f098ff9e8f00b870e3..eab52f8615b329a795b3fe3a3719e5687e105061 100644 --- a/src/main/java/org/bukkit/inventory/ItemFactory.java +++ b/src/main/java/org/bukkit/inventory/ItemFactory.java -@@ -165,5 +165,54 @@ public interface ItemFactory { +@@ -175,5 +175,62 @@ public interface ItemFactory { */ @Nullable String getI18NDisplayName(@Nullable ItemStack item); @@ -28,8 +28,10 @@ index 03ba2265908d35bded0f38ed31187e5500e1b1f0..3f23927e58e0ccf8cf04d4beb4d83346 + * + * @param entity Entity to create the HoverEvent for + * @return the {@link net.md_5.bungee.api.chat.hover.content.Content} of that {@link org.bukkit.entity.Entity} ++ * @deprecated use {@link org.bukkit.entity.Entity#asHoverEvent()} + */ + @NotNull ++ @Deprecated + net.md_5.bungee.api.chat.hover.content.Content hoverContentOf(@NotNull org.bukkit.entity.Entity entity); + + /** @@ -38,8 +40,10 @@ index 03ba2265908d35bded0f38ed31187e5500e1b1f0..3f23927e58e0ccf8cf04d4beb4d83346 + * @param entity Entity to create the HoverEvent for + * @param customName a custom name that should be displayed, if not passed entity name will be displayed + * @return the {@link net.md_5.bungee.api.chat.hover.content.Content} of that {@link org.bukkit.entity.Entity} ++ * @deprecated use {@link org.bukkit.entity.Entity#asHoverEvent(java.util.function.UnaryOperator)} + */ + @NotNull ++ @Deprecated + net.md_5.bungee.api.chat.hover.content.Content hoverContentOf(@NotNull org.bukkit.entity.Entity entity, @Nullable String customName); + + /** @@ -48,8 +52,10 @@ index 03ba2265908d35bded0f38ed31187e5500e1b1f0..3f23927e58e0ccf8cf04d4beb4d83346 + * @param entity Entity to create the HoverEvent for + * @param customName a custom name that should be displayed, if not passed entity name will be displayed + * @return the {@link net.md_5.bungee.api.chat.hover.content.Content} of that {@link org.bukkit.entity.Entity} ++ * @deprecated use {@link org.bukkit.entity.Entity#asHoverEvent(java.util.function.UnaryOperator)} + */ + @NotNull ++ @Deprecated + net.md_5.bungee.api.chat.hover.content.Content hoverContentOf(@NotNull org.bukkit.entity.Entity entity, @Nullable net.md_5.bungee.api.chat.BaseComponent customName); + + /** @@ -58,8 +64,10 @@ index 03ba2265908d35bded0f38ed31187e5500e1b1f0..3f23927e58e0ccf8cf04d4beb4d83346 + * @param entity Entity to create the HoverEvent for + * @param customName a custom name that should be displayed, if not passed entity name will be displayed + * @return the {@link net.md_5.bungee.api.chat.hover.content.Content} of that {@link org.bukkit.entity.Entity} ++ * @deprecated use {@link org.bukkit.entity.Entity#asHoverEvent(java.util.function.UnaryOperator)} + */ + @NotNull ++ @Deprecated + net.md_5.bungee.api.chat.hover.content.Content hoverContentOf(@NotNull org.bukkit.entity.Entity entity, @NotNull net.md_5.bungee.api.chat.BaseComponent[] customName); // Paper end } diff --git a/Spigot-API-Patches/0225-Add-additional-open-container-api-to-HumanEntity.patch b/Spigot-API-Patches/0226-Add-additional-open-container-api-to-HumanEntity.patch similarity index 100% rename from Spigot-API-Patches/0225-Add-additional-open-container-api-to-HumanEntity.patch rename to Spigot-API-Patches/0226-Add-additional-open-container-api-to-HumanEntity.patch diff --git a/Spigot-API-Patches/0226-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch b/Spigot-API-Patches/0227-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch similarity index 100% rename from Spigot-API-Patches/0226-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch rename to Spigot-API-Patches/0227-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch diff --git a/Spigot-API-Patches/0227-Entity-isTicking.patch b/Spigot-API-Patches/0228-Entity-isTicking.patch similarity index 80% rename from Spigot-API-Patches/0227-Entity-isTicking.patch rename to Spigot-API-Patches/0228-Entity-isTicking.patch index 56a99933b2..3856ba234e 100644 --- a/Spigot-API-Patches/0227-Entity-isTicking.patch +++ b/Spigot-API-Patches/0228-Entity-isTicking.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Entity#isTicking diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java -index 9aa80ba2df23e83642ff2bb1afa9ee9ea9ce47dd..b07b4990507113d31b1435179d9813c5ea0309f8 100644 +index 75cebfca7b436ef30b718bba7e0566d047e5c61a..2cc501b74741bdbdc40d1b135725f18c4d36dc2b 100644 --- a/src/main/java/org/bukkit/entity/Entity.java +++ b/src/main/java/org/bukkit/entity/Entity.java -@@ -692,5 +692,10 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent +@@ -698,5 +698,10 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent * Check if entity is in lava */ public boolean isInLava(); diff --git a/Spigot-API-Patches/0228-Clarify-the-Javadocs-for-Entity.getEntitySpawnReason.patch b/Spigot-API-Patches/0229-Clarify-the-Javadocs-for-Entity.getEntitySpawnReason.patch similarity index 85% rename from Spigot-API-Patches/0228-Clarify-the-Javadocs-for-Entity.getEntitySpawnReason.patch rename to Spigot-API-Patches/0229-Clarify-the-Javadocs-for-Entity.getEntitySpawnReason.patch index 6efc467e95..7798b89d21 100644 --- a/Spigot-API-Patches/0228-Clarify-the-Javadocs-for-Entity.getEntitySpawnReason.patch +++ b/Spigot-API-Patches/0229-Clarify-the-Javadocs-for-Entity.getEntitySpawnReason.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Clarify the Javadocs for Entity.getEntitySpawnReason() diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java -index b07b4990507113d31b1435179d9813c5ea0309f8..76e857c364fe79e20cf9bde54b65e5b7108174fd 100644 +index 2cc501b74741bdbdc40d1b135725f18c4d36dc2b..428daeb04d0a35a443467e2f657d2356bcfdd7d7 100644 --- a/src/main/java/org/bukkit/entity/Entity.java +++ b/src/main/java/org/bukkit/entity/Entity.java -@@ -658,7 +658,7 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent +@@ -664,7 +664,7 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent Chunk getChunk(); /** diff --git a/Spigot-API-Patches/0229-Villager-resetOffers.patch b/Spigot-API-Patches/0230-Villager-resetOffers.patch similarity index 100% rename from Spigot-API-Patches/0229-Villager-resetOffers.patch rename to Spigot-API-Patches/0230-Villager-resetOffers.patch diff --git a/Spigot-API-Patches/0230-Player-elytra-boost-API.patch b/Spigot-API-Patches/0231-Player-elytra-boost-API.patch similarity index 88% rename from Spigot-API-Patches/0230-Player-elytra-boost-API.patch rename to Spigot-API-Patches/0231-Player-elytra-boost-API.patch index c12714ca00..1ef9cd1d05 100644 --- a/Spigot-API-Patches/0230-Player-elytra-boost-API.patch +++ b/Spigot-API-Patches/0231-Player-elytra-boost-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Player elytra boost API diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index 2324e85548bc0d50886e5e5cd0bc36022eb0cf88..ea5257cc94d084fe4e0b9d9685e51d8f70cb84cb 100644 +index 00f78c26686ff18494abf9ebc173fbb3df5677b3..41a6fc2d405225fe85aa014148e0d3519f48861a 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -1780,6 +1780,19 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1940,6 +1940,19 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM */ @NotNull T getClientOption(@NotNull ClientOption option); diff --git a/Spigot-API-Patches/0231-Add-getOfflinePlayerIfCached-String.patch b/Spigot-API-Patches/0232-Add-getOfflinePlayerIfCached-String.patch similarity index 87% rename from Spigot-API-Patches/0231-Add-getOfflinePlayerIfCached-String.patch rename to Spigot-API-Patches/0232-Add-getOfflinePlayerIfCached-String.patch index 5a3f179ab0..86d947866a 100644 --- a/Spigot-API-Patches/0231-Add-getOfflinePlayerIfCached-String.patch +++ b/Spigot-API-Patches/0232-Add-getOfflinePlayerIfCached-String.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add getOfflinePlayerIfCached(String) diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index 9ec0608a79bc9cf3a992f9e549fd471e10e6bb5e..fecd7b14d317f55eb1ce7b5c6af9913917971427 100644 +index 6228d7eca85fba52296c8d63d32804f32af1b421..68101a322ffab8ec28843386b79b8079576fa720 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java -@@ -928,6 +928,27 @@ public final class Bukkit { +@@ -950,6 +950,27 @@ public final class Bukkit { return server.getOfflinePlayer(name); } @@ -37,10 +37,10 @@ index 9ec0608a79bc9cf3a992f9e549fd471e10e6bb5e..fecd7b14d317f55eb1ce7b5c6af99139 * Gets the player by the given UUID, regardless if they are offline or * online. diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 69070e472518fba66581e6050d3308d46c1d1608..8e01e1bbb7cfd98b47dbdb3a0e132dafd1413de6 100644 +index 6237578b373002c009efde4fb4c1864f0bf4f19e..a79fa08b9e6fb924b2da933eb6e4b365d14d938d 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -777,6 +777,25 @@ public interface Server extends PluginMessageRecipient { +@@ -797,6 +797,25 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi @NotNull public OfflinePlayer getOfflinePlayer(@NotNull String name); diff --git a/Spigot-API-Patches/0232-Add-ignore-discounts-API.patch b/Spigot-API-Patches/0233-Add-ignore-discounts-API.patch similarity index 100% rename from Spigot-API-Patches/0232-Add-ignore-discounts-API.patch rename to Spigot-API-Patches/0233-Add-ignore-discounts-API.patch diff --git a/Spigot-API-Patches/0233-Item-no-age-no-player-pickup.patch b/Spigot-API-Patches/0234-Item-no-age-no-player-pickup.patch similarity index 100% rename from Spigot-API-Patches/0233-Item-no-age-no-player-pickup.patch rename to Spigot-API-Patches/0234-Item-no-age-no-player-pickup.patch diff --git a/Spigot-API-Patches/0234-Beacon-API-custom-effect-ranges.patch b/Spigot-API-Patches/0235-Beacon-API-custom-effect-ranges.patch similarity index 100% rename from Spigot-API-Patches/0234-Beacon-API-custom-effect-ranges.patch rename to Spigot-API-Patches/0235-Beacon-API-custom-effect-ranges.patch diff --git a/Spigot-API-Patches/0235-Add-API-for-quit-reason.patch b/Spigot-API-Patches/0236-Add-API-for-quit-reason.patch similarity index 67% rename from Spigot-API-Patches/0235-Add-API-for-quit-reason.patch rename to Spigot-API-Patches/0236-Add-API-for-quit-reason.patch index 82fe5f5b31..680d66c3ba 100644 --- a/Spigot-API-Patches/0235-Add-API-for-quit-reason.patch +++ b/Spigot-API-Patches/0236-Add-API-for-quit-reason.patch @@ -5,28 +5,39 @@ Subject: [PATCH] Add API for quit reason diff --git a/src/main/java/org/bukkit/event/player/PlayerQuitEvent.java b/src/main/java/org/bukkit/event/player/PlayerQuitEvent.java -index d70c25f404e994766a9ebce89a917c8d0719777c..af52a5dfb452da11e51cad9c882cae1533cba520 100644 +index 9b43bb24055b94328c569f7e0df6bd24c8ebfd2b..876cdce63a362f9cc208f767c10169e75a798a09 100644 --- a/src/main/java/org/bukkit/event/player/PlayerQuitEvent.java +++ b/src/main/java/org/bukkit/event/player/PlayerQuitEvent.java -@@ -10,10 +10,17 @@ import org.jetbrains.annotations.Nullable; - */ +@@ -11,16 +11,28 @@ import org.jetbrains.annotations.Nullable; public class PlayerQuitEvent extends PlayerEvent { private static final HandlerList handlers = new HandlerList(); + private net.kyori.adventure.text.Component quitMessage; // Paper + private final QuitReason reason; // Paper - private String quitMessage; + @Deprecated // Paper public PlayerQuitEvent(@NotNull final Player who, @Nullable final String quitMessage) { + // Paper start + this(who, quitMessage, null); + } ++ @Deprecated // Paper + public PlayerQuitEvent(@NotNull final Player who, @Nullable final String quitMessage, @Nullable QuitReason quitReason) { super(who); + this.quitMessage = quitMessage != null ? net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(quitMessage) : net.kyori.adventure.text.Component.empty(); // Paper + this.reason = quitReason == null ? QuitReason.DISCONNECTED : quitReason; -+ // Paper end + } + // Paper start ++ @Deprecated + public PlayerQuitEvent(@NotNull final Player who, @Nullable final net.kyori.adventure.text.Component quitMessage) { ++ this(who, quitMessage, null); ++ } ++ public PlayerQuitEvent(@NotNull final Player who, @Nullable final net.kyori.adventure.text.Component quitMessage, @Nullable QuitReason quitReason) { + super(who); this.quitMessage = quitMessage; ++ this.reason = quitReason == null ? QuitReason.DISCONNECTED : quitReason; } -@@ -46,4 +53,39 @@ public class PlayerQuitEvent extends PlayerEvent { + /** +@@ -75,4 +87,39 @@ public class PlayerQuitEvent extends PlayerEvent { public static HandlerList getHandlerList() { return handlers; } diff --git a/Spigot-API-Patches/0236-Add-Destroy-Speed-API.patch b/Spigot-API-Patches/0237-Add-Destroy-Speed-API.patch similarity index 100% rename from Spigot-API-Patches/0236-Add-Destroy-Speed-API.patch rename to Spigot-API-Patches/0237-Add-Destroy-Speed-API.patch diff --git a/Spigot-API-Patches/0237-Add-LivingEntity-clearActiveItem.patch b/Spigot-API-Patches/0238-Add-LivingEntity-clearActiveItem.patch similarity index 100% rename from Spigot-API-Patches/0237-Add-LivingEntity-clearActiveItem.patch rename to Spigot-API-Patches/0238-Add-LivingEntity-clearActiveItem.patch diff --git a/Spigot-API-Patches/0238-Add-PlayerItemCooldownEvent.patch b/Spigot-API-Patches/0239-Add-PlayerItemCooldownEvent.patch similarity index 100% rename from Spigot-API-Patches/0238-Add-PlayerItemCooldownEvent.patch rename to Spigot-API-Patches/0239-Add-PlayerItemCooldownEvent.patch diff --git a/Spigot-API-Patches/0239-More-lightning-API.patch b/Spigot-API-Patches/0240-More-lightning-API.patch similarity index 100% rename from Spigot-API-Patches/0239-More-lightning-API.patch rename to Spigot-API-Patches/0240-More-lightning-API.patch diff --git a/Spigot-API-Patches/0240-Add-PlayerShearBlockEvent.patch b/Spigot-API-Patches/0241-Add-PlayerShearBlockEvent.patch similarity index 100% rename from Spigot-API-Patches/0240-Add-PlayerShearBlockEvent.patch rename to Spigot-API-Patches/0241-Add-PlayerShearBlockEvent.patch diff --git a/Spigot-API-Patches/0241-Enable-multi-release-plugin-jars.patch b/Spigot-API-Patches/0242-Enable-multi-release-plugin-jars.patch similarity index 100% rename from Spigot-API-Patches/0241-Enable-multi-release-plugin-jars.patch rename to Spigot-API-Patches/0242-Enable-multi-release-plugin-jars.patch diff --git a/Spigot-API-Patches/0242-Player-Chunk-Load-Unload-Events.patch b/Spigot-API-Patches/0243-Player-Chunk-Load-Unload-Events.patch similarity index 100% rename from Spigot-API-Patches/0242-Player-Chunk-Load-Unload-Events.patch rename to Spigot-API-Patches/0243-Player-Chunk-Load-Unload-Events.patch diff --git a/Spigot-API-Patches/0243-Expose-LivingEntity-hurt-direction.patch b/Spigot-API-Patches/0244-Expose-LivingEntity-hurt-direction.patch similarity index 100% rename from Spigot-API-Patches/0243-Expose-LivingEntity-hurt-direction.patch rename to Spigot-API-Patches/0244-Expose-LivingEntity-hurt-direction.patch diff --git a/Spigot-API-Patches/0244-added-PlayerTradeEvent.patch b/Spigot-API-Patches/0245-added-PlayerTradeEvent.patch similarity index 100% rename from Spigot-API-Patches/0244-added-PlayerTradeEvent.patch rename to Spigot-API-Patches/0245-added-PlayerTradeEvent.patch diff --git a/Spigot-API-Patches/0245-Add-OBSTRUCTED-reason-to-BedEnterResult.patch b/Spigot-API-Patches/0246-Add-OBSTRUCTED-reason-to-BedEnterResult.patch similarity index 100% rename from Spigot-API-Patches/0245-Add-OBSTRUCTED-reason-to-BedEnterResult.patch rename to Spigot-API-Patches/0246-Add-OBSTRUCTED-reason-to-BedEnterResult.patch diff --git a/Spigot-API-Patches/0246-Add-TargetHitEvent-API.patch b/Spigot-API-Patches/0247-Add-TargetHitEvent-API.patch similarity index 100% rename from Spigot-API-Patches/0246-Add-TargetHitEvent-API.patch rename to Spigot-API-Patches/0247-Add-TargetHitEvent-API.patch diff --git a/Spigot-API-Patches/0247-Additional-Block-Material-API-s.patch b/Spigot-API-Patches/0248-Additional-Block-Material-API-s.patch similarity index 100% rename from Spigot-API-Patches/0247-Additional-Block-Material-API-s.patch rename to Spigot-API-Patches/0248-Additional-Block-Material-API-s.patch diff --git a/Spigot-API-Patches/0248-Add-API-to-get-Material-from-Boats-and-Minecarts.patch b/Spigot-API-Patches/0249-Add-API-to-get-Material-from-Boats-and-Minecarts.patch similarity index 100% rename from Spigot-API-Patches/0248-Add-API-to-get-Material-from-Boats-and-Minecarts.patch rename to Spigot-API-Patches/0249-Add-API-to-get-Material-from-Boats-and-Minecarts.patch diff --git a/Spigot-API-Patches/0249-Add-PlayerFlowerPotManipulateEvent.patch b/Spigot-API-Patches/0250-Add-PlayerFlowerPotManipulateEvent.patch similarity index 100% rename from Spigot-API-Patches/0249-Add-PlayerFlowerPotManipulateEvent.patch rename to Spigot-API-Patches/0250-Add-PlayerFlowerPotManipulateEvent.patch diff --git a/Spigot-API-Patches/0250-Zombie-API-breaking-doors.patch b/Spigot-API-Patches/0251-Zombie-API-breaking-doors.patch similarity index 100% rename from Spigot-API-Patches/0250-Zombie-API-breaking-doors.patch rename to Spigot-API-Patches/0251-Zombie-API-breaking-doors.patch diff --git a/Spigot-API-Patches/0251-Add-EntityLoadCrossbowEvent.patch b/Spigot-API-Patches/0252-Add-EntityLoadCrossbowEvent.patch similarity index 100% rename from Spigot-API-Patches/0251-Add-EntityLoadCrossbowEvent.patch rename to Spigot-API-Patches/0252-Add-EntityLoadCrossbowEvent.patch diff --git a/Spigot-API-Patches/0252-Added-WorldGameRuleChangeEvent.patch b/Spigot-API-Patches/0253-Added-WorldGameRuleChangeEvent.patch similarity index 100% rename from Spigot-API-Patches/0252-Added-WorldGameRuleChangeEvent.patch rename to Spigot-API-Patches/0253-Added-WorldGameRuleChangeEvent.patch diff --git a/Spigot-API-Patches/0253-Added-ServerResourcesReloadedEvent.patch b/Spigot-API-Patches/0254-Added-ServerResourcesReloadedEvent.patch similarity index 100% rename from Spigot-API-Patches/0253-Added-ServerResourcesReloadedEvent.patch rename to Spigot-API-Patches/0254-Added-ServerResourcesReloadedEvent.patch diff --git a/Spigot-API-Patches/0254-Add-BlockFailedDispenseEvent.patch b/Spigot-API-Patches/0255-Add-BlockFailedDispenseEvent.patch similarity index 100% rename from Spigot-API-Patches/0254-Add-BlockFailedDispenseEvent.patch rename to Spigot-API-Patches/0255-Add-BlockFailedDispenseEvent.patch diff --git a/Spigot-API-Patches/0255-Added-PlayerLecternPageChangeEvent.patch b/Spigot-API-Patches/0256-Added-PlayerLecternPageChangeEvent.patch similarity index 100% rename from Spigot-API-Patches/0255-Added-PlayerLecternPageChangeEvent.patch rename to Spigot-API-Patches/0256-Added-PlayerLecternPageChangeEvent.patch diff --git a/Spigot-API-Patches/0256-Added-PlayerLoomPatternSelectEvent.patch b/Spigot-API-Patches/0257-Added-PlayerLoomPatternSelectEvent.patch similarity index 100% rename from Spigot-API-Patches/0256-Added-PlayerLoomPatternSelectEvent.patch rename to Spigot-API-Patches/0257-Added-PlayerLoomPatternSelectEvent.patch diff --git a/Spigot-API-Patches/0257-Better-AnnotationTest-printout.patch b/Spigot-API-Patches/0258-Better-AnnotationTest-printout.patch similarity index 95% rename from Spigot-API-Patches/0257-Better-AnnotationTest-printout.patch rename to Spigot-API-Patches/0258-Better-AnnotationTest-printout.patch index 3a6ec64adc..6e7648174c 100644 --- a/Spigot-API-Patches/0257-Better-AnnotationTest-printout.patch +++ b/Spigot-API-Patches/0258-Better-AnnotationTest-printout.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Better AnnotationTest printout diff --git a/pom.xml b/pom.xml -index 7747189d49727eea039f3994e186b34480025144..6c6ae6b48094c86c74cd4e9f4214056f63e6ac68 100644 +index 78d13b0487ea6876b19e07d186f273dedefda9bf..5bc8dd2489d34c598f8079d13058eeb0a9b79713 100644 --- a/pom.xml +++ b/pom.xml -@@ -223,6 +223,19 @@ +@@ -245,6 +245,19 @@ true diff --git a/Spigot-API-Patches/0258-Add-API-to-get-exact-interaction-point-in-PlayerInte.patch b/Spigot-API-Patches/0259-Add-API-to-get-exact-interaction-point-in-PlayerInte.patch similarity index 100% rename from Spigot-API-Patches/0258-Add-API-to-get-exact-interaction-point-in-PlayerInte.patch rename to Spigot-API-Patches/0259-Add-API-to-get-exact-interaction-point-in-PlayerInte.patch diff --git a/Spigot-API-Patches/0259-Add-sendOpLevel-API.patch b/Spigot-API-Patches/0260-Add-sendOpLevel-API.patch similarity index 87% rename from Spigot-API-Patches/0259-Add-sendOpLevel-API.patch rename to Spigot-API-Patches/0260-Add-sendOpLevel-API.patch index 62268853bf..a181972d65 100644 --- a/Spigot-API-Patches/0259-Add-sendOpLevel-API.patch +++ b/Spigot-API-Patches/0260-Add-sendOpLevel-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add sendOpLevel API diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index ea5257cc94d084fe4e0b9d9685e51d8f70cb84cb..cb6464c89e02d29484554a9a2184996a256925d2 100644 +index 41a6fc2d405225fe85aa014148e0d3519f48861a..2e78c50de2f01d667a534bfb60ea93209b7f8f8e 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -1793,6 +1793,17 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -1953,6 +1953,17 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM */ @Nullable Firework boostElytra(@NotNull ItemStack firework); diff --git a/Spigot-API-Patches/0260-Add-StructureLocateEvent.patch b/Spigot-API-Patches/0261-Add-StructureLocateEvent.patch similarity index 100% rename from Spigot-API-Patches/0260-Add-StructureLocateEvent.patch rename to Spigot-API-Patches/0261-Add-StructureLocateEvent.patch diff --git a/Spigot-API-Patches/0261-Make-ProjectileHitEvent-Cancellable.patch b/Spigot-API-Patches/0262-Make-ProjectileHitEvent-Cancellable.patch similarity index 100% rename from Spigot-API-Patches/0261-Make-ProjectileHitEvent-Cancellable.patch rename to Spigot-API-Patches/0262-Make-ProjectileHitEvent-Cancellable.patch diff --git a/Spigot-API-Patches/0262-Return-chat-component-with-empty-text-instead-of-thr.patch b/Spigot-API-Patches/0263-Return-chat-component-with-empty-text-instead-of-thr.patch similarity index 75% rename from Spigot-API-Patches/0262-Return-chat-component-with-empty-text-instead-of-thr.patch rename to Spigot-API-Patches/0263-Return-chat-component-with-empty-text-instead-of-thr.patch index 39d9886e96..08a4d81fc4 100644 --- a/Spigot-API-Patches/0262-Return-chat-component-with-empty-text-instead-of-thr.patch +++ b/Spigot-API-Patches/0263-Return-chat-component-with-empty-text-instead-of-thr.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Return chat component with empty text instead of throwing diff --git a/src/main/java/org/bukkit/inventory/InventoryView.java b/src/main/java/org/bukkit/inventory/InventoryView.java -index 14346d83bc99581b18e53d19af03708c0bf22cf7..2d0a12d3f0603ba06db3f3216faa720445a286a7 100644 +index b6cbf23dd40fb1cb1fec3c7d6918438ebf5bcc2e..0c6d8172bea4c0aa6083259d31826a0a774b78c3 100644 --- a/src/main/java/org/bukkit/inventory/InventoryView.java +++ b/src/main/java/org/bukkit/inventory/InventoryView.java -@@ -449,7 +449,7 @@ public abstract class InventoryView { +@@ -450,7 +450,7 @@ public abstract class InventoryView { /** * Get the title of this inventory window. * @@ -17,4 +17,4 @@ index 14346d83bc99581b18e53d19af03708c0bf22cf7..2d0a12d3f0603ba06db3f3216faa7204 + * @return The title or empty string when title is {@code null}. */ @NotNull - public abstract String getTitle(); + public abstract net.kyori.adventure.text.Component title(); diff --git a/Spigot-API-Patches/0263-Add-BlockPreDispenseEvent.patch b/Spigot-API-Patches/0264-Add-BlockPreDispenseEvent.patch similarity index 100% rename from Spigot-API-Patches/0263-Add-BlockPreDispenseEvent.patch rename to Spigot-API-Patches/0264-Add-BlockPreDispenseEvent.patch diff --git a/Spigot-API-Patches/0264-Added-Vanilla-Entity-Tags.patch b/Spigot-API-Patches/0265-Added-Vanilla-Entity-Tags.patch similarity index 100% rename from Spigot-API-Patches/0264-Added-Vanilla-Entity-Tags.patch rename to Spigot-API-Patches/0265-Added-Vanilla-Entity-Tags.patch diff --git a/Spigot-API-Patches/0265-added-Wither-API.patch b/Spigot-API-Patches/0266-added-Wither-API.patch similarity index 100% rename from Spigot-API-Patches/0265-added-Wither-API.patch rename to Spigot-API-Patches/0266-added-Wither-API.patch diff --git a/Spigot-API-Patches/0266-Added-PlayerChangeBeaconEffectEvent.patch b/Spigot-API-Patches/0267-Added-PlayerChangeBeaconEffectEvent.patch similarity index 100% rename from Spigot-API-Patches/0266-Added-PlayerChangeBeaconEffectEvent.patch rename to Spigot-API-Patches/0267-Added-PlayerChangeBeaconEffectEvent.patch diff --git a/Spigot-API-Patches/0269-Add-dropLeash-variable-to-EntityUnleashEvent.patch b/Spigot-API-Patches/0268-Add-dropLeash-variable-to-EntityUnleashEvent.patch similarity index 100% rename from Spigot-API-Patches/0269-Add-dropLeash-variable-to-EntityUnleashEvent.patch rename to Spigot-API-Patches/0268-Add-dropLeash-variable-to-EntityUnleashEvent.patch diff --git a/Spigot-API-Patches/0267-Added-PlayerStonecutterRecipeSelectEvent.patch b/Spigot-API-Patches/0269-Added-PlayerStonecutterRecipeSelectEvent.patch similarity index 100% rename from Spigot-API-Patches/0267-Added-PlayerStonecutterRecipeSelectEvent.patch rename to Spigot-API-Patches/0269-Added-PlayerStonecutterRecipeSelectEvent.patch diff --git a/Spigot-API-Patches/0268-EntityMoveEvent.patch b/Spigot-API-Patches/0270-EntityMoveEvent.patch similarity index 100% rename from Spigot-API-Patches/0268-EntityMoveEvent.patch rename to Spigot-API-Patches/0270-EntityMoveEvent.patch diff --git a/Spigot-API-Patches/0270-add-DragonEggFormEvent.patch b/Spigot-API-Patches/0271-add-DragonEggFormEvent.patch similarity index 100% rename from Spigot-API-Patches/0270-add-DragonEggFormEvent.patch rename to Spigot-API-Patches/0271-add-DragonEggFormEvent.patch diff --git a/Spigot-API-Patches/0271-Allow-adding-items-to-BlockDropItemEvent.patch b/Spigot-API-Patches/0272-Allow-adding-items-to-BlockDropItemEvent.patch similarity index 100% rename from Spigot-API-Patches/0271-Allow-adding-items-to-BlockDropItemEvent.patch rename to Spigot-API-Patches/0272-Allow-adding-items-to-BlockDropItemEvent.patch diff --git a/Spigot-API-Patches/0272-Add-getMainThreadExecutor-to-BukkitScheduler.patch b/Spigot-API-Patches/0273-Add-getMainThreadExecutor-to-BukkitScheduler.patch similarity index 100% rename from Spigot-API-Patches/0272-Add-getMainThreadExecutor-to-BukkitScheduler.patch rename to Spigot-API-Patches/0273-Add-getMainThreadExecutor-to-BukkitScheduler.patch diff --git a/Spigot-API-Patches/0273-living-entity-allow-attribute-registration.patch b/Spigot-API-Patches/0274-living-entity-allow-attribute-registration.patch similarity index 100% rename from Spigot-API-Patches/0273-living-entity-allow-attribute-registration.patch rename to Spigot-API-Patches/0274-living-entity-allow-attribute-registration.patch diff --git a/Spigot-API-Patches/0274-Add-missing-effects.patch b/Spigot-API-Patches/0275-Add-missing-effects.patch similarity index 100% rename from Spigot-API-Patches/0274-Add-missing-effects.patch rename to Spigot-API-Patches/0275-Add-missing-effects.patch diff --git a/Spigot-Server-Patches/0002-Paper-config-files.patch b/Spigot-Server-Patches/0002-Paper-config-files.patch index 08f287498c..6be171e6dd 100644 --- a/Spigot-Server-Patches/0002-Paper-config-files.patch +++ b/Spigot-Server-Patches/0002-Paper-config-files.patch @@ -533,10 +533,10 @@ index 0000000000000000000000000000000000000000..b31109d2dadd29e8852468c19265066b + } +} diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index d1051f05933be093fa598504e169e5cfdaa1b0e3..056e1fced00dff1d6507a90c13f2448a04ca0558 100644 +index 49cfd12dd8f68468d7a122f5420687c874cf3317..84407dfd46138359d42ddf8fd5c462a5f494d46b 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -281,15 +281,15 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -273,15 +273,15 @@ public class ChunkProviderServer extends IChunkProvider { } } @@ -638,7 +638,7 @@ index 6d1012cc652780189a5d849125abe09b27b88422..d8c8bf2466be362b424fde611fe42b73 Main.LOGGER.info("Forcing world upgrade! {}", convertable_conversionsession.getLevelName()); // CraftBukkit WorldUpgrader worldupgrader = new WorldUpgrader(convertable_conversionsession, datafixer, immutableset, flag); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 4c5683bcb45ea500adb0775fc81f296bb2583f80..1606a7b4727fffef27d6bb08633b652b7e7fe588 100644 +index 169822482d3e31ef4f625a82102adc6d478588a8..2ffa56f3580b524c3593505585410dc347e1780c 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -77,6 +77,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable { @@ -659,10 +659,10 @@ index 4c5683bcb45ea500adb0775fc81f296bb2583f80..1606a7b4727fffef27d6bb08633b652b this.world = new CraftWorld((WorldServer) this, gen, env); this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index ab11efee28224852f4984ce7235494d83ba7fe7f..a19242d717f7f9c254e6127fb2cb2f202be2d78a 100644 +index 3aac98dd08e1608c30254fbcf6982773a3a6d20f..bf21a80f781e600a08f82d1a16f0e11983dc8f8d 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -808,6 +808,7 @@ public final class CraftServer implements Server { +@@ -809,6 +809,7 @@ public final class CraftServer implements Server { } org.spigotmc.SpigotConfig.init((File) console.options.valueOf("spigot-settings")); // Spigot @@ -670,7 +670,7 @@ index ab11efee28224852f4984ce7235494d83ba7fe7f..a19242d717f7f9c254e6127fb2cb2f20 for (WorldServer world : console.getWorlds()) { world.worldDataServer.setDifficulty(config.difficulty); world.setSpawnFlags(config.spawnMonsters, config.spawnAnimals); -@@ -841,6 +842,7 @@ public final class CraftServer implements Server { +@@ -842,6 +843,7 @@ public final class CraftServer implements Server { world.ticksPerAmbientSpawns = this.getTicksPerAmbientSpawns(); } world.spigotConfig.init(); // Spigot @@ -678,7 +678,7 @@ index ab11efee28224852f4984ce7235494d83ba7fe7f..a19242d717f7f9c254e6127fb2cb2f20 } pluginManager.clearPlugins(); -@@ -848,6 +850,7 @@ public final class CraftServer implements Server { +@@ -849,6 +851,7 @@ public final class CraftServer implements Server { resetRecipes(); reloadData(); org.spigotmc.SpigotConfig.registerCommands(); // Spigot @@ -686,10 +686,10 @@ index ab11efee28224852f4984ce7235494d83ba7fe7f..a19242d717f7f9c254e6127fb2cb2f20 overrideAllCommandBlockCommands = commandsConfiguration.getStringList("command-block-overrides").contains("*"); ignoreVanillaPermissions = commandsConfiguration.getBoolean("ignore-vanilla-permissions"); -@@ -2097,4 +2100,35 @@ public final class CraftServer implements Server { +@@ -2096,4 +2099,35 @@ public final class CraftServer implements Server { + { return spigot; } - // Spigot end + + // Paper start + @SuppressWarnings({"rawtypes", "unchecked"}) @@ -742,7 +742,7 @@ index 3f52c19b6b797e26b3dcedcec2afd28c478e7091..3a6578170765a472d36b169b999e9dc5 }; diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index 83d83ff7ceffbb77723da721b869dfd0091e496d..0efcbab8f8806aeb8dd8bd6384e5a7cee375d100 100644 +index 0005d4226467cc25b55f9863eb5b7aaeb4dd6917..5c394d26e2d2dbc5d65e38c1273b7e5d02464f3a 100644 --- a/src/main/java/org/spigotmc/SpigotWorldConfig.java +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java @@ -39,36 +39,36 @@ public class SpigotWorldConfig diff --git a/Spigot-Server-Patches/0003-MC-Dev-fixes.patch b/Spigot-Server-Patches/0003-MC-Dev-fixes.patch index f1c55c8574..0cf9cb1354 100644 --- a/Spigot-Server-Patches/0003-MC-Dev-fixes.patch +++ b/Spigot-Server-Patches/0003-MC-Dev-fixes.patch @@ -848,10 +848,10 @@ index 83d799bec90693e0fbbf8a7f3bc4f569b5c0ead9..141a8e31151010e5a0bd8d4661033f10 t0.a(nbttagcompound.getCompound("data")); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 4955ec276c389158727fb98710dd700145c31be8..f1c206b6b506aff09c484730dd2d5ce796c3c2ab 100644 +index b6a2f11c34cba54f28ea8997d991b30febf63082..170332ce35db120b53f99a45869882236c361960 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1809,7 +1809,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1798,7 +1798,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { } // CraftBukkit - decompile error diff --git a/Spigot-Server-Patches/0004-MC-Utils.patch b/Spigot-Server-Patches/0004-MC-Utils.patch index d5c56ca2df..14aa39810c 100644 --- a/Spigot-Server-Patches/0004-MC-Utils.patch +++ b/Spigot-Server-Patches/0004-MC-Utils.patch @@ -2411,7 +2411,7 @@ index 1b2f415e3ed7f6dca12d13cd098cb4ec3af54020..64e8088d394ddcda59d0209883b778ab @Override public BlockPosition immutableCopy() { diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 9a07db3442d1ef2c1b1c1f1293445d28b0a4c84d..c8ff99ef5c7574292ee66a4aec45d1550eab1624 100644 +index 225e8fef6741d9bdbc8ac86cd17e54ddbf04a9e8..8d5598fab64ce3ac58121302dca4b528edd26563 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -26,7 +26,7 @@ public class Chunk implements IChunkAccess { @@ -2572,7 +2572,7 @@ index 9a07db3442d1ef2c1b1c1f1293445d28b0a4c84d..c8ff99ef5c7574292ee66a4aec45d155 @Override public Fluid getFluid(BlockPosition blockposition) { return this.a(blockposition.getX(), blockposition.getY(), blockposition.getZ()); -@@ -357,6 +474,7 @@ public class Chunk implements IChunkAccess { +@@ -356,6 +473,7 @@ public class Chunk implements IChunkAccess { entity.chunkX = this.loc.x; entity.chunkY = k; entity.chunkZ = this.loc.z; @@ -2580,7 +2580,7 @@ index 9a07db3442d1ef2c1b1c1f1293445d28b0a4c84d..c8ff99ef5c7574292ee66a4aec45d155 this.entitySlices[k].add(entity); } -@@ -380,6 +498,7 @@ public class Chunk implements IChunkAccess { +@@ -378,6 +496,7 @@ public class Chunk implements IChunkAccess { } this.entitySlices[i].remove(entity); @@ -2588,7 +2588,7 @@ index 9a07db3442d1ef2c1b1c1f1293445d28b0a4c84d..c8ff99ef5c7574292ee66a4aec45d155 } @Override -@@ -401,6 +520,7 @@ public class Chunk implements IChunkAccess { +@@ -399,6 +518,7 @@ public class Chunk implements IChunkAccess { return this.a(blockposition, Chunk.EnumTileEntityState.CHECK); } @@ -2596,7 +2596,7 @@ index 9a07db3442d1ef2c1b1c1f1293445d28b0a4c84d..c8ff99ef5c7574292ee66a4aec45d155 @Nullable public TileEntity a(BlockPosition blockposition, Chunk.EnumTileEntityState chunk_enumtileentitystate) { // CraftBukkit start -@@ -512,7 +632,25 @@ public class Chunk implements IChunkAccess { +@@ -510,7 +630,25 @@ public class Chunk implements IChunkAccess { // CraftBukkit start public void loadCallback() { @@ -2622,7 +2622,7 @@ index 9a07db3442d1ef2c1b1c1f1293445d28b0a4c84d..c8ff99ef5c7574292ee66a4aec45d155 if (server != null) { /* * If it's a new world, the first few chunks are generated inside -@@ -551,6 +689,22 @@ public class Chunk implements IChunkAccess { +@@ -549,6 +687,22 @@ public class Chunk implements IChunkAccess { server.getPluginManager().callEvent(unloadEvent); // note: saving can be prevented, but not forced if no saving is actually required this.mustNotSave = !unloadEvent.isSaveChunk(); @@ -2746,7 +2746,7 @@ index ae61d0a7676bf06c8c9aa5c68ccb8dd4baf326b6..b12e43ed13a1a9d7d418831b8988c30a } diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 056e1fced00dff1d6507a90c13f2448a04ca0558..08f11f98c40221fa4ce9a4f14ee8398f8588f38a 100644 +index 84407dfd46138359d42ddf8fd5c462a5f494d46b..20f62f6f7704f47f86179d03b4e55a61e0149627 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -17,6 +17,10 @@ import java.util.function.Consumer; @@ -2928,7 +2928,7 @@ index 056e1fced00dff1d6507a90c13f2448a04ca0558..08f11f98c40221fa4ce9a4f14ee8398f public ChunkProviderServer(WorldServer worldserver, Convertable.ConversionSession convertable_conversionsession, DataFixer datafixer, DefinedStructureManager definedstructuremanager, Executor executor, ChunkGenerator chunkgenerator, int i, boolean flag, WorldLoadListener worldloadlistener, Supplier supplier) { this.world = worldserver; -@@ -98,6 +254,49 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -90,6 +246,49 @@ public class ChunkProviderServer extends IChunkProvider { this.cacheChunk[0] = ichunkaccess; } @@ -2978,7 +2978,7 @@ index 056e1fced00dff1d6507a90c13f2448a04ca0558..08f11f98c40221fa4ce9a4f14ee8398f @Nullable @Override public IChunkAccess getChunkAt(int i, int j, ChunkStatus chunkstatus, boolean flag) { -@@ -380,10 +579,9 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -372,10 +571,9 @@ public class ChunkProviderServer extends IChunkProvider { this.p = spawnercreature_d; this.world.getMethodProfiler().exit(); @@ -3934,7 +3934,7 @@ index 8bdda63a2807635e8780481244251f6e35c13627..36a7e41cc5036345929ebf4d2fa160a8 int j = 0; ChunkSection[] achunksection = chunk.getSections(); diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java -index f645d3dfb57e99757e233ee2bbb51be5094203cb..985fc002fa5afc71ecd242aa8101684b2c751b30 100644 +index 80118f5a347f5cc21945172b2cc94ad3f640a75e..7b4717ffc31bc406c04d98207a15804502bd3579 100644 --- a/src/main/java/net/minecraft/server/PlayerChunk.java +++ b/src/main/java/net/minecraft/server/PlayerChunk.java @@ -21,9 +21,9 @@ public class PlayerChunk { @@ -3959,7 +3959,7 @@ index f645d3dfb57e99757e233ee2bbb51be5094203cb..985fc002fa5afc71ecd242aa8101684b public PlayerChunk(ChunkCoordIntPair chunkcoordintpair, int i, LightEngine lightengine, PlayerChunk.c playerchunk_c, PlayerChunk.d playerchunk_d) { this.statusFutures = new AtomicReferenceArray(PlayerChunk.CHUNK_STATUSES.size()); this.fullChunkFuture = PlayerChunk.UNLOADED_CHUNK_FUTURE; -@@ -54,10 +56,49 @@ public class PlayerChunk { +@@ -54,16 +56,63 @@ public class PlayerChunk { this.ticketLevel = this.oldTicketLevel; this.n = this.oldTicketLevel; this.a(i); @@ -3993,25 +3993,24 @@ index f645d3dfb57e99757e233ee2bbb51be5094203cb..985fc002fa5afc71ecd242aa8101684b + + public final boolean isEntityTickingReady() { + return this.isEntityTickingReady; -+ } -+ + } + + public final boolean isTickingReady() { + return this.isTickingReady; + } + + public final boolean isFullChunkReady() { + return this.isFullChunkReady; - } ++ } + // Paper end - ++ // CraftBukkit start - public Chunk getFullChunk() { + public final Chunk getFullChunk() { // Paper - final for inline if (!getChunkState(this.oldTicketLevel).isAtLeast(PlayerChunk.State.BORDER)) return null; // note: using oldTicketLevel for isLoaded checks - return this.getFullChunkUnchecked(); - } -@@ -68,6 +109,14 @@ public class PlayerChunk { - return (either == null) ? null : (Chunk) either.left().orElse(null); + CompletableFuture> statusFuture = this.getStatusFutureUnchecked(ChunkStatus.FULL); + Either either = (Either) statusFuture.getNow(null); + return either == null ? null : (Chunk) either.left().orElse(null); } // CraftBukkit end + // Paper start - "real" get full chunk immediately @@ -4025,7 +4024,7 @@ index f645d3dfb57e99757e233ee2bbb51be5094203cb..985fc002fa5afc71ecd242aa8101684b public CompletableFuture> getStatusFutureUnchecked(ChunkStatus chunkstatus) { CompletableFuture> completablefuture = (CompletableFuture) this.statusFutures.get(chunkstatus.c()); -@@ -79,20 +128,23 @@ public class PlayerChunk { +@@ -75,20 +124,23 @@ public class PlayerChunk { return getChunkStatus(this.ticketLevel).b(chunkstatus) ? this.getStatusFutureUnchecked(chunkstatus) : PlayerChunk.UNLOADED_CHUNK_ACCESS_FUTURE; } @@ -4053,7 +4052,7 @@ index f645d3dfb57e99757e233ee2bbb51be5094203cb..985fc002fa5afc71ecd242aa8101684b CompletableFuture> completablefuture = this.a(); Either either = (Either) completablefuture.getNow(null); // CraftBukkit - decompile error -@@ -117,7 +169,7 @@ public class PlayerChunk { +@@ -113,7 +165,7 @@ public class PlayerChunk { return null; } @@ -4062,7 +4061,7 @@ index f645d3dfb57e99757e233ee2bbb51be5094203cb..985fc002fa5afc71ecd242aa8101684b return this.chunkSave; } -@@ -258,11 +310,11 @@ public class PlayerChunk { +@@ -254,11 +306,11 @@ public class PlayerChunk { }); } @@ -4076,7 +4075,7 @@ index f645d3dfb57e99757e233ee2bbb51be5094203cb..985fc002fa5afc71ecd242aa8101684b return this.ticketLevel; } -@@ -333,13 +385,27 @@ public class PlayerChunk { +@@ -329,13 +381,27 @@ public class PlayerChunk { this.hasBeenLoaded |= flag3; if (!flag2 && flag3) { @@ -4105,7 +4104,7 @@ index f645d3dfb57e99757e233ee2bbb51be5094203cb..985fc002fa5afc71ecd242aa8101684b this.a(((CompletableFuture>) completablefuture).thenApply((either1) -> { // CraftBukkit - decompile error playerchunkmap.getClass(); return either1.ifLeft(playerchunkmap::a); -@@ -350,12 +416,24 @@ public class PlayerChunk { +@@ -346,12 +412,24 @@ public class PlayerChunk { boolean flag5 = playerchunk_state1.isAtLeast(PlayerChunk.State.TICKING); if (!flag4 && flag5) { @@ -4132,7 +4131,7 @@ index f645d3dfb57e99757e233ee2bbb51be5094203cb..985fc002fa5afc71ecd242aa8101684b this.tickingFuture = PlayerChunk.UNLOADED_CHUNK_FUTURE; } -@@ -367,12 +445,24 @@ public class PlayerChunk { +@@ -363,12 +441,24 @@ public class PlayerChunk { throw (IllegalStateException) SystemUtils.c((Throwable) (new IllegalStateException())); } @@ -4393,7 +4392,7 @@ index ff41038ce6d2c1a8093bce3539070fa0ccfd61c2..ed0f9c5d29c4f88b7beee4b0ecdd7a56 return VoxelShapes.b; } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 1606a7b4727fffef27d6bb08633b652b7e7fe588..6df28adb17d78a7f5189787a979a44fad677f05c 100644 +index 2ffa56f3580b524c3593505585410dc347e1780c..9c6b15e70bfb7db853c8e4a8dfd7b24bae27a70c 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -22,6 +22,7 @@ import org.bukkit.craftbukkit.SpigotTimings; // Spigot @@ -4502,7 +4501,7 @@ index 5719ef9714e9680596a08c42c33508c16c0e676a..bb0f30f182856d2701fde9b1a65eeb98 return this.j.m(); } diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index f1c206b6b506aff09c484730dd2d5ce796c3c2ab..592af06de1fc02d94273363c2ede1175a39997f0 100644 +index 170332ce35db120b53f99a45869882236c361960..c96ad91b15920293e228f5eb7d0843beda92faec 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -12,6 +12,7 @@ import it.unimi.dsi.fastutil.ints.Int2ObjectMap.Entry; @@ -4522,7 +4521,7 @@ index f1c206b6b506aff09c484730dd2d5ce796c3c2ab..592af06de1fc02d94273363c2ede1175 boolean tickingEntities; private final MinecraftServer server; public final WorldDataServer worldDataServer; // CraftBukkit - type -@@ -1578,7 +1579,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1567,7 +1568,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { ObjectIterator objectiterator = spawnercreature_d.b().object2IntEntrySet().iterator(); while (objectiterator.hasNext()) { @@ -4594,7 +4593,7 @@ index 9ad17c560c8d99a396543ab9f97c34de648f6544..4bf48f77f3f7cd62a91590543f5af441 currentTask = null; } diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java -index a8ce875f801edc424b5277abf7471e73ce91e3e6..f5f70c1fe31e5c533991e2c857fe8c10a83b94fc 100644 +index 3f55381c152b9841b524f623c9b32360e97cb8ed..d85e21b75054067b926ecfee89d62c6dd0744189 100644 --- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java +++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java @@ -39,6 +39,21 @@ public class CraftTask implements BukkitTask, Runnable { // Spigot diff --git a/Spigot-Server-Patches/0007-Store-reference-to-current-Chunk-for-Entity-and-Bloc.patch b/Spigot-Server-Patches/0007-Store-reference-to-current-Chunk-for-Entity-and-Bloc.patch index a6b0ae7982..65dc2ebb96 100644 --- a/Spigot-Server-Patches/0007-Store-reference-to-current-Chunk-for-Entity-and-Bloc.patch +++ b/Spigot-Server-Patches/0007-Store-reference-to-current-Chunk-for-Entity-and-Bloc.patch @@ -8,7 +8,7 @@ This enables us a fast reference to the entities current chunk instead of having to look it up by hashmap lookups. diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index c8ff99ef5c7574292ee66a4aec45d1550eab1624..7c5f79124d2f2c69548263e79752484e07e77d48 100644 +index 8d5598fab64ce3ac58121302dca4b528edd26563..402f6ed90132f48d560a21f56cd50121c42fb34a 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -56,11 +56,36 @@ public class Chunk implements IChunkAccess { @@ -49,7 +49,7 @@ index c8ff99ef5c7574292ee66a4aec45d1550eab1624..7c5f79124d2f2c69548263e79752484e this.l = Maps.newHashMap(); this.m = Maps.newHashMap(); this.n = new ShortList[16]; -@@ -471,6 +496,7 @@ public class Chunk implements IChunkAccess { +@@ -470,6 +495,7 @@ public class Chunk implements IChunkAccess { } entity.inChunk = true; @@ -57,7 +57,7 @@ index c8ff99ef5c7574292ee66a4aec45d1550eab1624..7c5f79124d2f2c69548263e79752484e entity.chunkX = this.loc.x; entity.chunkY = k; entity.chunkZ = this.loc.z; -@@ -483,6 +509,7 @@ public class Chunk implements IChunkAccess { +@@ -482,6 +508,7 @@ public class Chunk implements IChunkAccess { ((HeightMap) this.heightMap.get(heightmap_type)).a(along); } @@ -65,7 +65,7 @@ index c8ff99ef5c7574292ee66a4aec45d1550eab1624..7c5f79124d2f2c69548263e79752484e public void b(Entity entity) { this.a(entity, entity.chunkY); } -@@ -497,7 +524,12 @@ public class Chunk implements IChunkAccess { +@@ -495,7 +522,12 @@ public class Chunk implements IChunkAccess { i = this.entitySlices.length - 1; } @@ -80,7 +80,7 @@ index c8ff99ef5c7574292ee66a4aec45d1550eab1624..7c5f79124d2f2c69548263e79752484e } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index b8267cf23f795fd7e586b0e567037eae5048d08e..b35ffae9f88cc14aec01482c2a3ed2e2428c2012 100644 +index 889e65729554b9584b631b0910a4f0c67246a2d6..9f32f6c3c34464e82a953a50141343b0083dea71 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -176,7 +176,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/0008-Store-counts-for-each-Entity-Block-Entity-Type.patch b/Spigot-Server-Patches/0008-Store-counts-for-each-Entity-Block-Entity-Type.patch index a4a2a5f478..1b3233c080 100644 --- a/Spigot-Server-Patches/0008-Store-counts-for-each-Entity-Block-Entity-Type.patch +++ b/Spigot-Server-Patches/0008-Store-counts-for-each-Entity-Block-Entity-Type.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Store counts for each Entity/Block Entity Type Opens door for future patches to optimize performance diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 7c5f79124d2f2c69548263e79752484e07e77d48..853e11836b6c4eadd03feead101bf578b17b86a3 100644 +index 402f6ed90132f48d560a21f56cd50121c42fb34a..9f1db6491dafa8e32395db381466a3447395da7e 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -57,15 +57,19 @@ public class Chunk implements IChunkAccess { @@ -37,7 +37,7 @@ index 7c5f79124d2f2c69548263e79752484e07e77d48..853e11836b6c4eadd03feead101bf578 } return removed; } -@@ -495,6 +500,7 @@ public class Chunk implements IChunkAccess { +@@ -494,6 +499,7 @@ public class Chunk implements IChunkAccess { k = this.entitySlices.length - 1; } @@ -45,7 +45,7 @@ index 7c5f79124d2f2c69548263e79752484e07e77d48..853e11836b6c4eadd03feead101bf578 entity.inChunk = true; entity.setCurrentChunk(this); // Paper entity.chunkX = this.loc.x; -@@ -529,6 +535,7 @@ public class Chunk implements IChunkAccess { +@@ -527,6 +533,7 @@ public class Chunk implements IChunkAccess { if (!this.entitySlices[i].remove(entity)) { return; } diff --git a/Spigot-Server-Patches/0009-Timings-v2.patch b/Spigot-Server-Patches/0009-Timings-v2.patch index a320462350..4b9310280e 100644 --- a/Spigot-Server-Patches/0009-Timings-v2.patch +++ b/Spigot-Server-Patches/0009-Timings-v2.patch @@ -738,10 +738,10 @@ index 871b79cb2c63525c430c257f00b2cf70157aa476..d847326b0099a0c05a085d5d62de6304 private String name; @Nullable diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 853e11836b6c4eadd03feead101bf578b17b86a3..0aea16df16b55b1d4756b51d10c8c22d37aef9a3 100644 +index 9f1db6491dafa8e32395db381466a3447395da7e..19ddcabdc17c23c4ec46f5669ba0fd56d4bbee58 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -699,6 +699,7 @@ public class Chunk implements IChunkAccess { +@@ -697,6 +697,7 @@ public class Chunk implements IChunkAccess { server.getPluginManager().callEvent(new org.bukkit.event.world.ChunkLoadEvent(this.bukkitChunk, this.needsDecoration)); if (this.needsDecoration) { @@ -749,7 +749,7 @@ index 853e11836b6c4eadd03feead101bf578b17b86a3..0aea16df16b55b1d4756b51d10c8c22d this.needsDecoration = false; java.util.Random random = new java.util.Random(); random.setSeed(world.getSeed()); -@@ -718,6 +719,7 @@ public class Chunk implements IChunkAccess { +@@ -716,6 +717,7 @@ public class Chunk implements IChunkAccess { } } server.getPluginManager().callEvent(new org.bukkit.event.world.ChunkPopulateEvent(bukkitChunk)); @@ -758,10 +758,10 @@ index 853e11836b6c4eadd03feead101bf578b17b86a3..0aea16df16b55b1d4756b51d10c8c22d } } diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 08f11f98c40221fa4ce9a4f14ee8398f8588f38a..a066026bce318683dcc022920dad39d7ec25e485 100644 +index 20f62f6f7704f47f86179d03b4e55a61e0149627..dd78f093f6ee9822c4a31d87f3c83d2f8fa4fcf8 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -322,11 +322,13 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -314,11 +314,13 @@ public class ChunkProviderServer extends IChunkProvider { } gameprofilerfiller.c("getChunkCacheMiss"); @@ -777,7 +777,7 @@ index 08f11f98c40221fa4ce9a4f14ee8398f8588f38a..a066026bce318683dcc022920dad39d7 ichunkaccess = (IChunkAccess) ((Either) completablefuture.join()).map((ichunkaccess1) -> { return ichunkaccess1; }, (playerchunk_failure) -> { -@@ -513,7 +515,9 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -505,7 +507,9 @@ public class ChunkProviderServer extends IChunkProvider { public void save(boolean flag) { this.tickDistanceManager(); @@ -787,7 +787,7 @@ index 08f11f98c40221fa4ce9a4f14ee8398f8588f38a..a066026bce318683dcc022920dad39d7 } @Override -@@ -550,7 +554,9 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -542,7 +546,9 @@ public class ChunkProviderServer extends IChunkProvider { this.tickDistanceManager(); this.world.timings.doChunkMap.stopTiming(); // Spigot this.world.getMethodProfiler().exitEnter("chunks"); @@ -797,7 +797,7 @@ index 08f11f98c40221fa4ce9a4f14ee8398f8588f38a..a066026bce318683dcc022920dad39d7 this.world.timings.doChunkUnload.startTiming(); // Spigot this.world.getMethodProfiler().exitEnter("unload"); this.playerChunkMap.unloadChunks(booleansupplier); -@@ -574,8 +580,10 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -566,8 +572,10 @@ public class ChunkProviderServer extends IChunkProvider { boolean flag2 = world.ticksPerAnimalSpawns != 0L && worlddata.getTime() % world.ticksPerAnimalSpawns == 0L; // CraftBukkit this.world.getMethodProfiler().enter("naturalSpawnCount"); @@ -808,7 +808,7 @@ index 08f11f98c40221fa4ce9a4f14ee8398f8588f38a..a066026bce318683dcc022920dad39d7 this.p = spawnercreature_d; this.world.getMethodProfiler().exit(); -@@ -586,7 +594,9 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -578,7 +586,9 @@ public class ChunkProviderServer extends IChunkProvider { if (optional.isPresent()) { this.world.getMethodProfiler().enter("broadcast"); @@ -818,7 +818,7 @@ index 08f11f98c40221fa4ce9a4f14ee8398f8588f38a..a066026bce318683dcc022920dad39d7 this.world.getMethodProfiler().exit(); Optional optional1 = ((Either) playerchunk.b().getNow(PlayerChunk.UNLOADED_CHUNK)).left(); -@@ -600,25 +610,25 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -592,25 +602,25 @@ public class ChunkProviderServer extends IChunkProvider { SpawnerCreature.a(this.world, chunk, spawnercreature_d, this.allowAnimals, this.allowMonsters, flag2); } @@ -1007,7 +1007,7 @@ index d91b029c95b6380300db81e7c0fb172ff57958a1..218071260dec39dd4f7eb733ae6f832a } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index b35ffae9f88cc14aec01482c2a3ed2e2428c2012..03933c24ed4d97e16bcebf6b89b1a8d1fc43cd0b 100644 +index 9f32f6c3c34464e82a953a50141343b0083dea71..ace7d5a36c0a44763d554d5d83cee7817f77fcc1 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -31,7 +31,6 @@ import org.bukkit.craftbukkit.event.CraftPortalEvent; @@ -1517,7 +1517,7 @@ index b37b791cd66b2e88dd0ecf52beea1844c97cdb94..d34e91887cd73009bf852fb849e495a8 // this.minecraftServer.getCommandDispatcher().a(this.player.getCommandListener(), s); // CraftBukkit end diff --git a/src/main/java/net/minecraft/server/PlayerConnectionUtils.java b/src/main/java/net/minecraft/server/PlayerConnectionUtils.java -index 8c534c2f06fe72287364536b8767bd774b94c027..9c810b5aa21ca714ccf355d5648b7612f99b6884 100644 +index 2c671629a43f42da8335e7216f9fd399bb878729..eb3269e0ea3ce33d08e9eee3bca7cf434921e991 100644 --- a/src/main/java/net/minecraft/server/PlayerConnectionUtils.java +++ b/src/main/java/net/minecraft/server/PlayerConnectionUtils.java @@ -2,6 +2,8 @@ package net.minecraft.server; @@ -1636,7 +1636,7 @@ index b9ffd000c97111678d45fd55dc9c207ebadc140e..f1d0e2faffb3ef27f5a41d06d0ff7d78 private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry(); public CraftPersistentDataContainer persistentDataContainer; diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 6df28adb17d78a7f5189787a979a44fad677f05c..09577ddcb3c2432a0af6047b287a387de5d2920a 100644 +index 9c6b15e70bfb7db853c8e4a8dfd7b24bae27a70c..b4aeea40ee04fd2ed10484f40d25dbd2a3a01b53 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -18,7 +18,6 @@ import org.apache.logging.log4j.Logger; @@ -1665,7 +1665,7 @@ index 6df28adb17d78a7f5189787a979a44fad677f05c..09577ddcb3c2432a0af6047b287a387d this.entityLimiter = new org.spigotmc.TickLimiter(spigotConfig.entityMaxTickTime); this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime); } -@@ -745,15 +744,14 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -746,15 +745,14 @@ public abstract class World implements GeneratorAccess, AutoCloseable { } timings.tileEntityPending.stopTiming(); // Spigot @@ -1683,7 +1683,7 @@ index 6df28adb17d78a7f5189787a979a44fad677f05c..09577ddcb3c2432a0af6047b287a387d CrashReport crashreport = CrashReport.a(throwable, "Ticking entity"); CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being ticked"); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 592af06de1fc02d94273363c2ede1175a39997f0..3d915105b277a7cbf330ba2cb3c2f1451ee868e4 100644 +index c96ad91b15920293e228f5eb7d0843beda92faec..21e4088cfdb7218e78fb771fe4c9bd2027594663 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -2,6 +2,8 @@ package net.minecraft.server; @@ -1810,7 +1810,7 @@ index 592af06de1fc02d94273363c2ede1175a39997f0..3d915105b277a7cbf330ba2cb3c2f145 // CraftBukkit start - moved from MinecraftServer.saveChunks diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index a19242d717f7f9c254e6127fb2cb2f202be2d78a..351440f534653c9d315ccaf1e923e03ca6ba01f6 100644 +index bf21a80f781e600a08f82d1a16f0e11983dc8f8d..73bd46c980cb13d6cbe4aba41adb122eaab769be 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -2069,12 +2069,31 @@ public final class CraftServer implements Server { @@ -1847,7 +1847,7 @@ index a19242d717f7f9c254e6127fb2cb2f202be2d78a..351440f534653c9d315ccaf1e923e03c org.spigotmc.RestartCommand.restart(); diff --git a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java b/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java deleted file mode 100644 -index 66523c21c49b8a019a82fdeb84a187c3b627ab73..0000000000000000000000000000000000000000 +index 7f435847ac1d13756ce233e7d5ae13f9dc17c443..0000000000000000000000000000000000000000 --- a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java +++ /dev/null @@ -1,163 +0,0 @@ @@ -1921,7 +1921,7 @@ index 66523c21c49b8a019a82fdeb84a187c3b627ab73..00000000000000000000000000000000 - - String name = "Task: " + plugin + " Runnable: " + taskname; - if (period > 0) { -- name += "(interval:" + period + ")"; +- name += "(interval:" + period +")"; - } else { - name += "(Single)"; - } @@ -2015,10 +2015,10 @@ index 66523c21c49b8a019a82fdeb84a187c3b627ab73..00000000000000000000000000000000 - } -} diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 6ebcf2afe78a0e0ab3ed4570b6aa416973c48fdf..8428ef53e0408c4a7f74cc03e7e238be9c2f1888 100644 +index 3551ab3a570042585621c943d74d8d3c0bd299b4..4001145980f4dabbd291336d5a464c3856144996 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1820,6 +1820,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1821,6 +1821,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { packet.components = components; getHandle().playerConnection.sendPacket(packet); } @@ -2110,25 +2110,24 @@ index 4bf48f77f3f7cd62a91590543f5af441c8268029..ffe9cc1011226d604dc5499e7692e9a9 private boolean isReady(final int currentTick) { diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java -index f5f70c1fe31e5c533991e2c857fe8c10a83b94fc..e2344711639ce8f11e8e8ad75a9878648f207a75 100644 +index d85e21b75054067b926ecfee89d62c6dd0744189..9d0d1598bfce2f51998395faf39d8bd2f5d3f9f3 100644 --- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java +++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java -@@ -1,10 +1,13 @@ +@@ -1,9 +1,11 @@ package org.bukkit.craftbukkit.scheduler; import java.util.function.Consumer; + +import co.aikar.timings.NullTimingHandler; import org.bukkit.Bukkit; +-import org.bukkit.craftbukkit.SpigotTimings; // Spigot +-import org.spigotmc.CustomTimingsHandler; // Spigot +import co.aikar.timings.MinecraftTimings; // Paper +import co.aikar.timings.Timing; // Paper import org.bukkit.plugin.Plugin; import org.bukkit.scheduler.BukkitTask; --import org.bukkit.craftbukkit.SpigotTimings; // Spigot - import org.spigotmc.CustomTimingsHandler; // Spigot - -@@ -26,12 +29,12 @@ public class CraftTask implements BukkitTask, Runnable { // Spigot +@@ -26,12 +28,12 @@ public class CraftTask implements BukkitTask, Runnable { // Spigot */ private volatile long period; private long nextRun; @@ -2144,7 +2143,7 @@ index f5f70c1fe31e5c533991e2c857fe8c10a83b94fc..e2344711639ce8f11e8e8ad75a987864 CraftTask() { this(null, null, CraftTask.NO_REPEATING, CraftTask.NO_REPEATING); } -@@ -51,7 +54,7 @@ public class CraftTask implements BukkitTask, Runnable { // Spigot +@@ -51,7 +53,7 @@ public class CraftTask implements BukkitTask, Runnable { // Spigot this.id = id; this.period = CraftTask.NO_REPEATING; this.taskName = taskName; @@ -2153,7 +2152,7 @@ index f5f70c1fe31e5c533991e2c857fe8c10a83b94fc..e2344711639ce8f11e8e8ad75a987864 } // Paper end -@@ -72,7 +75,7 @@ public class CraftTask implements BukkitTask, Runnable { // Spigot +@@ -72,7 +74,7 @@ public class CraftTask implements BukkitTask, Runnable { // Spigot } this.id = id; this.period = period; @@ -2162,7 +2161,7 @@ index f5f70c1fe31e5c533991e2c857fe8c10a83b94fc..e2344711639ce8f11e8e8ad75a987864 } @Override -@@ -92,11 +95,13 @@ public class CraftTask implements BukkitTask, Runnable { // Spigot +@@ -92,11 +94,13 @@ public class CraftTask implements BukkitTask, Runnable { // Spigot @Override public void run() { @@ -2176,7 +2175,7 @@ index f5f70c1fe31e5c533991e2c857fe8c10a83b94fc..e2344711639ce8f11e8e8ad75a987864 } long getPeriod() { -@@ -123,7 +128,7 @@ public class CraftTask implements BukkitTask, Runnable { // Spigot +@@ -123,7 +127,7 @@ public class CraftTask implements BukkitTask, Runnable { // Spigot this.next = next; } @@ -2185,7 +2184,7 @@ index f5f70c1fe31e5c533991e2c857fe8c10a83b94fc..e2344711639ce8f11e8e8ad75a987864 return (rTask != null) ? rTask.getClass() : ((cTask != null) ? cTask.getClass() : null); } -@@ -147,9 +152,4 @@ public class CraftTask implements BukkitTask, Runnable { // Spigot +@@ -147,9 +151,4 @@ public class CraftTask implements BukkitTask, Runnable { // Spigot return true; } @@ -2239,10 +2238,10 @@ index 6194d8aac0d2e54958aad3fb8b5fe144451cf879..d63a160f1b00de8d67ae1eb4fefbd5ca * This helper class represents the different NBT Tags. *

diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java -index 383997d2e57a31e2ff30cf1bf34128fe477390a8..093a11b6e355f9e1236ecca921ea55488d70451d 100644 +index d838cd421ddcb082beba1edcd84b5d30e26b1544..2b00258ccd808e3332af5ab3f7e4967f03dd4aa3 100644 --- a/src/main/java/org/spigotmc/ActivationRange.java +++ b/src/main/java/org/spigotmc/ActivationRange.java -@@ -29,7 +29,7 @@ import net.minecraft.server.EntityWither; +@@ -31,7 +31,7 @@ import net.minecraft.server.EntityWither; import net.minecraft.server.MathHelper; import net.minecraft.server.MinecraftServer; import net.minecraft.server.World; @@ -2251,7 +2250,7 @@ index 383997d2e57a31e2ff30cf1bf34128fe477390a8..093a11b6e355f9e1236ecca921ea5548 public class ActivationRange { -@@ -73,8 +73,8 @@ public class ActivationRange +@@ -75,8 +75,8 @@ public class ActivationRange /** * These entities are excluded from Activation range checks. * @@ -2262,7 +2261,7 @@ index 383997d2e57a31e2ff30cf1bf34128fe477390a8..093a11b6e355f9e1236ecca921ea5548 * @return boolean If it should always tick. */ public static boolean initializeEntityActivationState(Entity entity, SpigotWorldConfig config) -@@ -109,7 +109,7 @@ public class ActivationRange +@@ -111,7 +111,7 @@ public class ActivationRange */ public static void activateEntities(World world) { @@ -2271,7 +2270,7 @@ index 383997d2e57a31e2ff30cf1bf34128fe477390a8..093a11b6e355f9e1236ecca921ea5548 final int miscActivationRange = world.spigotConfig.miscActivationRange; final int raiderActivationRange = world.spigotConfig.raiderActivationRange; final int animalActivationRange = world.spigotConfig.animalActivationRange; -@@ -146,7 +146,7 @@ public class ActivationRange +@@ -148,7 +148,7 @@ public class ActivationRange } } } @@ -2280,7 +2279,7 @@ index 383997d2e57a31e2ff30cf1bf34128fe477390a8..093a11b6e355f9e1236ecca921ea5548 } /** -@@ -243,10 +243,8 @@ public class ActivationRange +@@ -245,10 +245,8 @@ public class ActivationRange */ public static boolean checkIfActive(Entity entity) { @@ -2291,7 +2290,7 @@ index 383997d2e57a31e2ff30cf1bf34128fe477390a8..093a11b6e355f9e1236ecca921ea5548 return true; } -@@ -270,7 +268,6 @@ public class ActivationRange +@@ -272,7 +270,6 @@ public class ActivationRange { isActive = false; } diff --git a/Spigot-Server-Patches/0010-Adventure.patch b/Spigot-Server-Patches/0010-Adventure.patch new file mode 100644 index 0000000000..2b10897a47 --- /dev/null +++ b/Spigot-Server-Patches/0010-Adventure.patch @@ -0,0 +1,2909 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Riley Park +Date: Fri, 29 Jan 2021 17:54:03 +0100 +Subject: [PATCH] Adventure + +Co-authored-by: zml +Co-authored-by: Jake Potrebic + +diff --git a/src/main/java/io/papermc/paper/adventure/AdventureComponent.java b/src/main/java/io/papermc/paper/adventure/AdventureComponent.java +new file mode 100644 +index 0000000000000000000000000000000000000000..0d1ae6b32a2ccae1e097371b5e0d9ec662865c2f +--- /dev/null ++++ b/src/main/java/io/papermc/paper/adventure/AdventureComponent.java +@@ -0,0 +1,78 @@ ++package io.papermc.paper.adventure; ++ ++import com.google.gson.JsonElement; ++import com.google.gson.JsonSerializationContext; ++import com.google.gson.JsonSerializer; ++import java.lang.reflect.Type; ++import java.util.List; ++import net.kyori.adventure.text.Component; ++import net.kyori.adventure.text.TextComponent; ++import net.kyori.adventure.text.serializer.plain.PlainComponentSerializer; ++import net.minecraft.server.ChatModifier; ++import net.minecraft.server.IChatBaseComponent; ++import net.minecraft.server.IChatMutableComponent; ++import org.checkerframework.checker.nullness.qual.MonotonicNonNull; ++import org.checkerframework.checker.nullness.qual.Nullable; ++ ++public final class AdventureComponent implements IChatBaseComponent { ++ final Component wrapped; ++ private @MonotonicNonNull IChatBaseComponent converted; ++ ++ public AdventureComponent(final Component wrapped) { ++ this.wrapped = wrapped; ++ } ++ ++ IChatBaseComponent deepConverted() { ++ IChatBaseComponent converted = this.converted; ++ if (converted == null) { ++ converted = PaperAdventure.WRAPPER_AWARE_SERIALIZER.serialize(this.wrapped); ++ this.converted = converted; ++ } ++ return converted; ++ } ++ ++ public @Nullable IChatBaseComponent deepConvertedIfPresent() { ++ return this.converted; ++ } ++ ++ @Override ++ public ChatModifier getChatModifier() { ++ return this.deepConverted().getChatModifier(); ++ } ++ ++ @Override ++ public String getText() { ++ if (this.wrapped instanceof TextComponent) { ++ return ((TextComponent) this.wrapped).content(); ++ } else { ++ return this.deepConverted().getText(); ++ } ++ } ++ ++ @Override ++ public String getString() { ++ return PlainComponentSerializer.plain().serialize(this.wrapped); ++ } ++ ++ @Override ++ public List getSiblings() { ++ return this.deepConverted().getSiblings(); ++ } ++ ++ @Override ++ public IChatMutableComponent g() { ++ return this.deepConverted().g(); ++ } ++ ++ @Override ++ public IChatMutableComponent mutableCopy() { ++ return this.deepConverted().mutableCopy(); ++ } ++ ++ public static class Serializer implements JsonSerializer { ++ @Override ++ public JsonElement serialize(final AdventureComponent src, final Type type, final JsonSerializationContext context) { ++ return PaperAdventure.GSON.serializer().toJsonTree(src.wrapped, Component.class); ++ } ++ } ++} +diff --git a/src/main/java/io/papermc/paper/adventure/NBTLegacyHoverEventSerializer.java b/src/main/java/io/papermc/paper/adventure/NBTLegacyHoverEventSerializer.java +new file mode 100644 +index 0000000000000000000000000000000000000000..64fcc77eb2ce8979ae756696d98f1d3a91326ba6 +--- /dev/null ++++ b/src/main/java/io/papermc/paper/adventure/NBTLegacyHoverEventSerializer.java +@@ -0,0 +1,88 @@ ++package io.papermc.paper.adventure; ++ ++import com.mojang.brigadier.exceptions.CommandSyntaxException; ++import java.io.IOException; ++import java.util.UUID; ++import net.kyori.adventure.key.Key; ++import net.kyori.adventure.nbt.api.BinaryTagHolder; ++import net.kyori.adventure.text.Component; ++import net.kyori.adventure.text.event.HoverEvent; ++import net.kyori.adventure.text.serializer.gson.LegacyHoverEventSerializer; ++import net.kyori.adventure.text.serializer.plain.PlainComponentSerializer; ++import net.kyori.adventure.util.Codec; ++import net.minecraft.server.MojangsonParser; ++import net.minecraft.server.NBTBase; ++import net.minecraft.server.NBTTagCompound; ++ ++final class NBTLegacyHoverEventSerializer implements LegacyHoverEventSerializer { ++ public static final NBTLegacyHoverEventSerializer INSTANCE = new NBTLegacyHoverEventSerializer(); ++ private static final Codec SNBT_CODEC = Codec.of(MojangsonParser::parse, NBTBase::toString); ++ ++ static final String ITEM_TYPE = "id"; ++ static final String ITEM_COUNT = "Count"; ++ static final String ITEM_TAG = "tag"; ++ ++ static final String ENTITY_NAME = "name"; ++ static final String ENTITY_TYPE = "type"; ++ static final String ENTITY_ID = "id"; ++ ++ NBTLegacyHoverEventSerializer() { ++ } ++ ++ @Override ++ public HoverEvent.ShowItem deserializeShowItem(final Component input) throws IOException { ++ final String raw = PlainComponentSerializer.plain().serialize(input); ++ try { ++ final NBTTagCompound contents = SNBT_CODEC.decode(raw); ++ final NBTTagCompound tag = contents.getCompound(ITEM_TAG); ++ return HoverEvent.ShowItem.of( ++ Key.key(contents.getString(ITEM_TYPE)), ++ contents.hasKey(ITEM_COUNT) ? contents.getByte(ITEM_COUNT) : 1, ++ tag.isEmpty() ? null : BinaryTagHolder.encode(tag, SNBT_CODEC) ++ ); ++ } catch (final CommandSyntaxException ex) { ++ throw new IOException(ex); ++ } ++ } ++ ++ @Override ++ public HoverEvent.ShowEntity deserializeShowEntity(final Component input, final Codec.Decoder componentCodec) throws IOException { ++ final String raw = PlainComponentSerializer.plain().serialize(input); ++ try { ++ final NBTTagCompound contents = SNBT_CODEC.decode(raw); ++ return HoverEvent.ShowEntity.of( ++ Key.key(contents.getString(ENTITY_TYPE)), ++ UUID.fromString(contents.getString(ENTITY_ID)), ++ componentCodec.decode(contents.getString(ENTITY_NAME)) ++ ); ++ } catch (final CommandSyntaxException ex) { ++ throw new IOException(ex); ++ } ++ } ++ ++ @Override ++ public Component serializeShowItem(final HoverEvent.ShowItem input) throws IOException { ++ final NBTTagCompound tag = new NBTTagCompound(); ++ tag.setString(ITEM_TYPE, input.item().asString()); ++ tag.setByte(ITEM_COUNT, (byte) input.count()); ++ if (input.nbt() != null) { ++ try { ++ tag.set(ITEM_TAG, input.nbt().get(SNBT_CODEC)); ++ } catch (final CommandSyntaxException ex) { ++ throw new IOException(ex); ++ } ++ } ++ return Component.text(SNBT_CODEC.encode(tag)); ++ } ++ ++ @Override ++ public Component serializeShowEntity(final HoverEvent.ShowEntity input, final Codec.Encoder componentCodec) throws IOException { ++ final NBTTagCompound tag = new NBTTagCompound(); ++ tag.setString(ENTITY_ID, input.id().toString()); ++ tag.setString(ENTITY_TYPE, input.type().asString()); ++ if (input.name() != null) { ++ tag.setString(ENTITY_NAME, componentCodec.encode(input.name())); ++ } ++ return Component.text(SNBT_CODEC.encode(tag)); ++ } ++} +diff --git a/src/main/java/io/papermc/paper/adventure/PaperAdventure.java b/src/main/java/io/papermc/paper/adventure/PaperAdventure.java +new file mode 100644 +index 0000000000000000000000000000000000000000..7beb93a96b9eca4558131c339678cc31e9972c96 +--- /dev/null ++++ b/src/main/java/io/papermc/paper/adventure/PaperAdventure.java +@@ -0,0 +1,284 @@ ++package io.papermc.paper.adventure; ++ ++import com.mojang.brigadier.exceptions.CommandSyntaxException; ++import io.netty.util.AttributeKey; ++import java.io.IOException; ++import java.util.ArrayList; ++import java.util.List; ++import java.util.Locale; ++import net.kyori.adventure.bossbar.BossBar; ++import net.kyori.adventure.inventory.Book; ++import net.kyori.adventure.key.Key; ++import net.kyori.adventure.nbt.api.BinaryTagHolder; ++import net.kyori.adventure.sound.Sound; ++import net.kyori.adventure.text.Component; ++import net.kyori.adventure.text.format.TextColor; ++import net.kyori.adventure.text.serializer.gson.GsonComponentSerializer; ++import net.kyori.adventure.translation.GlobalTranslator; ++import net.kyori.adventure.util.Codec; ++import net.minecraft.server.BossBattle; ++import net.minecraft.server.EnumChatFormat; ++import net.minecraft.server.IChatBaseComponent; ++import net.minecraft.server.ItemStack; ++import net.minecraft.server.MinecraftKey; ++import net.minecraft.server.MojangsonParser; ++import net.minecraft.server.NBTTagCompound; ++import net.minecraft.server.NBTTagList; ++import net.minecraft.server.NBTTagString; ++import net.minecraft.server.SoundCategory; ++import org.checkerframework.checker.nullness.qual.NonNull; ++import org.checkerframework.checker.nullness.qual.Nullable; ++ ++public final class PaperAdventure { ++ public static final AttributeKey LOCALE_ATTRIBUTE = AttributeKey.valueOf("adventure:locale"); ++ static final GsonComponentSerializer GSON = GsonComponentSerializer.builder() ++ .legacyHoverEventSerializer(NBTLegacyHoverEventSerializer.INSTANCE) ++ .build(); ++ private static final Codec NBT_CODEC = new Codec() { ++ @Override ++ public @NonNull NBTTagCompound decode(final @NonNull String encoded) throws IOException { ++ try { ++ return MojangsonParser.parse(encoded); ++ } catch (final CommandSyntaxException e) { ++ throw new IOException(e); ++ } ++ } ++ ++ @Override ++ public @NonNull String encode(final @NonNull NBTTagCompound decoded) { ++ return decoded.toString(); ++ } ++ }; ++ static final WrapperAwareSerializer WRAPPER_AWARE_SERIALIZER = new WrapperAwareSerializer(); ++ ++ private PaperAdventure() { ++ } ++ ++ // Key ++ ++ public static MinecraftKey asVanilla(final Key key) { ++ return new MinecraftKey(key.namespace(), key.value()); ++ } ++ ++ public static MinecraftKey asVanillaNullable(final Key key) { ++ if (key == null) { ++ return null; ++ } ++ return new MinecraftKey(key.namespace(), key.value()); ++ } ++ ++ // Component ++ ++ public static Component asAdventure(final IChatBaseComponent component) { ++ return GSON.serializer().fromJson(IChatBaseComponent.ChatSerializer.toJsonTree(component), Component.class); ++ } ++ ++ public static ArrayList asAdventure(final List vanillas) { ++ final ArrayList adventures = new ArrayList<>(vanillas.size()); ++ for (final IChatBaseComponent vanilla : vanillas) { ++ adventures.add(asAdventure(vanilla)); ++ } ++ return adventures; ++ } ++ ++ public static ArrayList asAdventureFromJson(final List jsonStrings) { ++ final ArrayList adventures = new ArrayList<>(jsonStrings.size()); ++ for (final String json : jsonStrings) { ++ adventures.add(GsonComponentSerializer.gson().deserialize(json)); ++ } ++ return adventures; ++ } ++ ++ public static List asJson(final List adventures) { ++ final List jsons = new ArrayList<>(adventures.size()); ++ for (final Component component : adventures) { ++ jsons.add(GsonComponentSerializer.gson().serialize(component)); ++ } ++ return jsons; ++ } ++ ++ public static IChatBaseComponent asVanilla(final Component component) { ++ if (true) return new AdventureComponent(component); ++ return IChatBaseComponent.ChatSerializer.fromJsonTree(GSON.serializer().toJsonTree(component)); ++ } ++ ++ public static List asVanilla(final List adventures) { ++ final List vanillas = new ArrayList<>(adventures.size()); ++ for (final Component adventure : adventures) { ++ vanillas.add(asVanilla(adventure)); ++ } ++ return vanillas; ++ } ++ ++ public static String asJsonString(final Component component, final Locale locale) { ++ return GSON.serialize( ++ GlobalTranslator.render( ++ component, ++ // play it safe ++ locale != null ++ ? locale ++ : Locale.US ++ ) ++ ); ++ } ++ ++ public static String asJsonString(final IChatBaseComponent component, final Locale locale) { ++ if (component instanceof AdventureComponent) { ++ return asJsonString(((AdventureComponent) component).wrapped, locale); ++ } ++ return IChatBaseComponent.ChatSerializer.componentToJson(component); ++ } ++ ++ // BossBar ++ ++ public static BossBattle.BarColor asVanilla(final BossBar.Color color) { ++ if (color == BossBar.Color.PINK) { ++ return BossBattle.BarColor.PINK; ++ } else if (color == BossBar.Color.BLUE) { ++ return BossBattle.BarColor.BLUE; ++ } else if (color == BossBar.Color.RED) { ++ return BossBattle.BarColor.RED; ++ } else if (color == BossBar.Color.GREEN) { ++ return BossBattle.BarColor.GREEN; ++ } else if (color == BossBar.Color.YELLOW) { ++ return BossBattle.BarColor.YELLOW; ++ } else if (color == BossBar.Color.PURPLE) { ++ return BossBattle.BarColor.PURPLE; ++ } else if (color == BossBar.Color.WHITE) { ++ return BossBattle.BarColor.WHITE; ++ } ++ throw new IllegalArgumentException(color.name()); ++ } ++ ++ public static BossBar.Color asAdventure(final BossBattle.BarColor color) { ++ if(color == BossBattle.BarColor.PINK) { ++ return BossBar.Color.PINK; ++ } else if(color == BossBattle.BarColor.BLUE) { ++ return BossBar.Color.BLUE; ++ } else if(color == BossBattle.BarColor.RED) { ++ return BossBar.Color.RED; ++ } else if(color == BossBattle.BarColor.GREEN) { ++ return BossBar.Color.GREEN; ++ } else if(color == BossBattle.BarColor.YELLOW) { ++ return BossBar.Color.YELLOW; ++ } else if(color == BossBattle.BarColor.PURPLE) { ++ return BossBar.Color.PURPLE; ++ } else if(color == BossBattle.BarColor.WHITE) { ++ return BossBar.Color.WHITE; ++ } ++ throw new IllegalArgumentException(color.name()); ++ } ++ ++ public static BossBattle.BarStyle asVanilla(final BossBar.Overlay overlay) { ++ if (overlay == BossBar.Overlay.PROGRESS) { ++ return BossBattle.BarStyle.PROGRESS; ++ } else if (overlay == BossBar.Overlay.NOTCHED_6) { ++ return BossBattle.BarStyle.NOTCHED_6; ++ } else if (overlay == BossBar.Overlay.NOTCHED_10) { ++ return BossBattle.BarStyle.NOTCHED_10; ++ } else if (overlay == BossBar.Overlay.NOTCHED_12) { ++ return BossBattle.BarStyle.NOTCHED_12; ++ } else if (overlay == BossBar.Overlay.NOTCHED_20) { ++ return BossBattle.BarStyle.NOTCHED_20; ++ } ++ throw new IllegalArgumentException(overlay.name()); ++ } ++ ++ public static BossBar.Overlay asAdventure(final BossBattle.BarStyle overlay) { ++ if (overlay == BossBattle.BarStyle.PROGRESS) { ++ return BossBar.Overlay.PROGRESS; ++ } else if (overlay == BossBattle.BarStyle.NOTCHED_6) { ++ return BossBar.Overlay.NOTCHED_6; ++ } else if (overlay == BossBattle.BarStyle.NOTCHED_10) { ++ return BossBar.Overlay.NOTCHED_10; ++ } else if (overlay == BossBattle.BarStyle.NOTCHED_12) { ++ return BossBar.Overlay.NOTCHED_12; ++ } else if (overlay == BossBattle.BarStyle.NOTCHED_20) { ++ return BossBar.Overlay.NOTCHED_20; ++ } ++ throw new IllegalArgumentException(overlay.name()); ++ } ++ ++ public static void setFlag(final BossBar bar, final BossBar.Flag flag, final boolean value) { ++ if (value) { ++ bar.addFlag(flag); ++ } else { ++ bar.removeFlag(flag); ++ } ++ } ++ ++ // Book ++ ++ public static ItemStack asItemStack(final Book book, final Locale locale) { ++ final ItemStack item = new ItemStack(net.minecraft.server.Items.WRITTEN_BOOK, 1); ++ final NBTTagCompound tag = item.getOrCreateTag(); ++ tag.setString("title", asJsonString(book.title(), locale)); ++ tag.setString("author", asJsonString(book.author(), locale)); ++ final NBTTagList pages = new NBTTagList(); ++ for (final Component page : book.pages()) { ++ pages.add(NBTTagString.create(asJsonString(page, locale))); ++ } ++ tag.set("pages", pages); ++ return item; ++ } ++ ++ // Sounds ++ ++ public static SoundCategory asVanilla(final Sound.Source source) { ++ if (source == Sound.Source.MASTER) { ++ return SoundCategory.MASTER; ++ } else if (source == Sound.Source.MUSIC) { ++ return SoundCategory.MUSIC; ++ } else if (source == Sound.Source.RECORD) { ++ return SoundCategory.RECORDS; ++ } else if (source == Sound.Source.WEATHER) { ++ return SoundCategory.WEATHER; ++ } else if (source == Sound.Source.BLOCK) { ++ return SoundCategory.BLOCKS; ++ } else if (source == Sound.Source.HOSTILE) { ++ return SoundCategory.HOSTILE; ++ } else if (source == Sound.Source.NEUTRAL) { ++ return SoundCategory.NEUTRAL; ++ } else if (source == Sound.Source.PLAYER) { ++ return SoundCategory.PLAYERS; ++ } else if (source == Sound.Source.AMBIENT) { ++ return SoundCategory.AMBIENT; ++ } else if (source == Sound.Source.VOICE) { ++ return SoundCategory.VOICE; ++ } ++ throw new IllegalArgumentException(source.name()); ++ } ++ ++ public static @Nullable SoundCategory asVanillaNullable(final Sound.@Nullable Source source) { ++ if (source == null) { ++ return null; ++ } ++ return asVanilla(source); ++ } ++ ++ // NBT ++ ++ public static @Nullable BinaryTagHolder asBinaryTagHolder(final @Nullable NBTTagCompound tag) { ++ if (tag == null) { ++ return null; ++ } ++ try { ++ return BinaryTagHolder.encode(tag, NBT_CODEC); ++ } catch (final IOException e) { ++ return null; ++ } ++ } ++ ++ // Colors ++ ++ public static @NonNull TextColor asAdventure(EnumChatFormat minecraftColor) { ++ if (minecraftColor.e() == null) { ++ throw new IllegalArgumentException("Not a valid color"); ++ } ++ return TextColor.color(minecraftColor.e()); ++ } ++ ++ public static @Nullable EnumChatFormat asVanilla(TextColor color) { ++ return EnumChatFormat.getByHexValue(color.value()); ++ } ++} +diff --git a/src/main/java/io/papermc/paper/adventure/VanillaBossBarListener.java b/src/main/java/io/papermc/paper/adventure/VanillaBossBarListener.java +new file mode 100644 +index 0000000000000000000000000000000000000000..59dd2a453dbfc538431a3414ab35d183cff0faec +--- /dev/null ++++ b/src/main/java/io/papermc/paper/adventure/VanillaBossBarListener.java +@@ -0,0 +1,41 @@ ++package io.papermc.paper.adventure; ++ ++import java.util.Set; ++import java.util.function.Consumer; ++import net.kyori.adventure.bossbar.BossBar; ++import net.kyori.adventure.text.Component; ++import net.minecraft.server.PacketPlayOutBoss; ++import org.checkerframework.checker.nullness.qual.NonNull; ++ ++public final class VanillaBossBarListener implements BossBar.Listener { ++ private final Consumer action; ++ ++ public VanillaBossBarListener(final Consumer action) { ++ this.action = action; ++ } ++ ++ @Override ++ public void bossBarNameChanged(final @NonNull BossBar bar, final @NonNull Component oldName, final @NonNull Component newName) { ++ this.action.accept(PacketPlayOutBoss.Action.UPDATE_NAME); ++ } ++ ++ @Override ++ public void bossBarProgressChanged(final @NonNull BossBar bar, final float oldProgress, final float newProgress) { ++ this.action.accept(PacketPlayOutBoss.Action.UPDATE_PCT); ++ } ++ ++ @Override ++ public void bossBarColorChanged(final @NonNull BossBar bar, final BossBar.@NonNull Color oldColor, final BossBar.@NonNull Color newColor) { ++ this.action.accept(PacketPlayOutBoss.Action.UPDATE_STYLE); ++ } ++ ++ @Override ++ public void bossBarOverlayChanged(final @NonNull BossBar bar, final BossBar.@NonNull Overlay oldOverlay, final BossBar.@NonNull Overlay newOverlay) { ++ this.action.accept(PacketPlayOutBoss.Action.UPDATE_STYLE); ++ } ++ ++ @Override ++ public void bossBarFlagsChanged(final @NonNull BossBar bar, final @NonNull Set flagsAdded, final @NonNull Set flagsRemoved) { ++ this.action.accept(PacketPlayOutBoss.Action.UPDATE_PROPERTIES); ++ } ++} +diff --git a/src/main/java/io/papermc/paper/adventure/VanillaChatMessageLogic.java b/src/main/java/io/papermc/paper/adventure/VanillaChatMessageLogic.java +new file mode 100644 +index 0000000000000000000000000000000000000000..39c1e750ae1270ca780a5d8624f8daa45bd27637 +--- /dev/null ++++ b/src/main/java/io/papermc/paper/adventure/VanillaChatMessageLogic.java +@@ -0,0 +1,44 @@ ++package io.papermc.paper.adventure; ++ ++import java.util.function.BiFunction; ++import java.util.regex.MatchResult; ++import net.kyori.adventure.text.Component; ++import net.kyori.adventure.text.ComponentLike; ++import net.kyori.adventure.text.TextComponent; ++import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer; ++import org.bukkit.craftbukkit.entity.CraftPlayer; ++ ++public class VanillaChatMessageLogic { ++ public static Component displayNameForChat(final CraftPlayer player) { ++ return player.displayName(); ++ } ++ ++ public static Component formatChat(final Component displayName, final String format, final String message) { ++ final class Replacement implements BiFunction { ++ private int index = 0; ++ ++ @Override ++ public ComponentLike apply(final MatchResult result, final TextComponent.Builder builder) { ++ if (this.index == 0) { ++ this.index++; ++ return displayName; ++ } else if (this.index == 1) { ++ this.index++; ++ return LegacyComponentSerializer.legacySection().deserialize(message).mergeStyle(builder.asComponent()); ++ } else { ++ return builder; ++ } ++ } ++ } ++ final Replacement replacement = new Replacement(); ++ if (format.contains("%2$s") && !format.contains("%1$s")) { ++ replacement.index = 1; ++ } ++ return LegacyComponentSerializer.legacySection().deserialize(format) ++ .replaceText(config -> { ++ config.times(2); ++ config.match("%(\\d+\\$)?s"); ++ config.replacement(replacement); ++ }); ++ } ++} +diff --git a/src/main/java/io/papermc/paper/adventure/WrapperAwareSerializer.java b/src/main/java/io/papermc/paper/adventure/WrapperAwareSerializer.java +new file mode 100644 +index 0000000000000000000000000000000000000000..1de7376cd4d3601f39d1f73b143c4244fe8480a3 +--- /dev/null ++++ b/src/main/java/io/papermc/paper/adventure/WrapperAwareSerializer.java +@@ -0,0 +1,20 @@ ++package io.papermc.paper.adventure; ++ ++import net.kyori.adventure.text.Component; ++import net.kyori.adventure.text.serializer.ComponentSerializer; ++import net.minecraft.server.IChatBaseComponent; ++ ++final class WrapperAwareSerializer implements ComponentSerializer { ++ @Override ++ public Component deserialize(final IChatBaseComponent input) { ++ if (input instanceof AdventureComponent) { ++ return ((AdventureComponent) input).wrapped; ++ } ++ return PaperAdventure.GSON.serializer().fromJson(IChatBaseComponent.ChatSerializer.toJsonTree(input), Component.class); ++ } ++ ++ @Override ++ public IChatBaseComponent serialize(final Component component) { ++ return IChatBaseComponent.ChatSerializer.fromJsonTree(PaperAdventure.GSON.serializer().toJsonTree(component)); ++ } ++} +diff --git a/src/main/java/net/kyori/adventure/bossbar/HackyBossBarPlatformBridge.java b/src/main/java/net/kyori/adventure/bossbar/HackyBossBarPlatformBridge.java +new file mode 100644 +index 0000000000000000000000000000000000000000..7aacbd4cdd538f9676d8370a6baba81772efb6f5 +--- /dev/null ++++ b/src/main/java/net/kyori/adventure/bossbar/HackyBossBarPlatformBridge.java +@@ -0,0 +1,36 @@ ++package net.kyori.adventure.bossbar; ++ ++import io.papermc.paper.adventure.PaperAdventure; ++import io.papermc.paper.adventure.VanillaBossBarListener; ++import net.minecraft.server.BossBattleServer; ++import org.bukkit.craftbukkit.entity.CraftPlayer; ++ ++public abstract class HackyBossBarPlatformBridge { ++ public BossBattleServer vanilla$bar; ++ private VanillaBossBarListener vanilla$listener; ++ ++ public final void paper$playerShow(final CraftPlayer player) { ++ if (this.vanilla$bar == null) { ++ final BossBar $this = (BossBar) this; ++ this.vanilla$bar = new BossBattleServer( ++ PaperAdventure.asVanilla($this.name()), ++ PaperAdventure.asVanilla($this.color()), ++ PaperAdventure.asVanilla($this.overlay()) ++ ); ++ this.vanilla$bar.adventure = $this; ++ this.vanilla$listener = new VanillaBossBarListener(this.vanilla$bar::sendUpdate); ++ $this.addListener(this.vanilla$listener); ++ } ++ this.vanilla$bar.addPlayer(player.getHandle()); ++ } ++ ++ public final void paper$playerHide(final CraftPlayer player) { ++ if (this.vanilla$bar != null) { ++ this.vanilla$bar.removePlayer(player.getHandle()); ++ if (this.vanilla$bar.getPlayers().isEmpty()) { ++ ((BossBar) this).removeListener(this.vanilla$listener); ++ this.vanilla$bar = null; ++ } ++ } ++ } ++} +diff --git a/src/main/java/net/minecraft/server/BossBattle.java b/src/main/java/net/minecraft/server/BossBattle.java +index 715c6d9f4820f700cb931f549756d2af2005667b..04477938aeae32b221c15c3491fb9a80248eebb5 100644 +--- a/src/main/java/net/minecraft/server/BossBattle.java ++++ b/src/main/java/net/minecraft/server/BossBattle.java +@@ -1,5 +1,6 @@ + package net.minecraft.server; + ++import io.papermc.paper.adventure.PaperAdventure; + import java.util.UUID; + + public abstract class BossBattle { +@@ -12,6 +13,7 @@ public abstract class BossBattle { + protected boolean e; + protected boolean f; + protected boolean g; ++ public net.kyori.adventure.bossbar.BossBar adventure; // Paper + + public BossBattle(UUID uuid, IChatBaseComponent ichatbasecomponent, BossBattle.BarColor bossbattle_barcolor, BossBattle.BarStyle bossbattle_barstyle) { + this.h = uuid; +@@ -26,61 +28,75 @@ public abstract class BossBattle { + } + + public IChatBaseComponent j() { ++ if(this.adventure != null) return PaperAdventure.asVanilla(this.adventure.name()); // Paper + return this.title; + } + + public void a(IChatBaseComponent ichatbasecomponent) { ++ if (this.adventure != null) this.adventure.name(PaperAdventure.asAdventure(ichatbasecomponent)); // Paper + this.title = ichatbasecomponent; + } + + public float getProgress() { ++ if (this.adventure != null) return this.adventure.progress(); // Paper + return this.b; + } + + public void a(float f) { ++ if (this.adventure != null) this.adventure.progress(f); // Paper + this.b = f; + } + + public BossBattle.BarColor l() { ++ if (this.adventure != null) return PaperAdventure.asVanilla(this.adventure.color()); // Paper + return this.color; + } + + public void a(BossBattle.BarColor bossbattle_barcolor) { ++ if(this.adventure != null) this.adventure.color(PaperAdventure.asAdventure(bossbattle_barcolor)); // Paper + this.color = bossbattle_barcolor; + } + + public BossBattle.BarStyle m() { ++ if(this.adventure != null) return PaperAdventure.asVanilla(this.adventure.overlay()); // Paper + return this.style; + } + + public void a(BossBattle.BarStyle bossbattle_barstyle) { ++ if(this.adventure != null) this.adventure.overlay(PaperAdventure.asAdventure(bossbattle_barstyle)); // Paper + this.style = bossbattle_barstyle; + } + + public boolean isDarkenSky() { ++ if(this.adventure != null) return this.adventure.hasFlag(net.kyori.adventure.bossbar.BossBar.Flag.DARKEN_SCREEN); // Paper + return this.e; + } + + public BossBattle a(boolean flag) { ++ if(this.adventure != null) PaperAdventure.setFlag(this.adventure, net.kyori.adventure.bossbar.BossBar.Flag.DARKEN_SCREEN, flag); // Paper + this.e = flag; + return this; + } + + public boolean isPlayMusic() { ++ if(this.adventure != null) return this.adventure.hasFlag(net.kyori.adventure.bossbar.BossBar.Flag.PLAY_BOSS_MUSIC); // Paper + return this.f; + } + + public BossBattle b(boolean flag) { ++ if(this.adventure != null) PaperAdventure.setFlag(this.adventure, net.kyori.adventure.bossbar.BossBar.Flag.PLAY_BOSS_MUSIC, flag); // Paper + this.f = flag; + return this; + } + + public BossBattle c(boolean flag) { ++ if(this.adventure != null) PaperAdventure.setFlag(this.adventure, net.kyori.adventure.bossbar.BossBar.Flag.CREATE_WORLD_FOG, flag); // Paper + this.g = flag; + return this; + } + + public boolean isCreateFog() { ++ if(this.adventure != null) return this.adventure.hasFlag(net.kyori.adventure.bossbar.BossBar.Flag.CREATE_WORLD_FOG); // Paper + return this.g; + } + +diff --git a/src/main/java/net/minecraft/server/Enchantment.java b/src/main/java/net/minecraft/server/Enchantment.java +index 7e2162fc78168adb96ed20651e1a3e061c29f96d..8e94a62916574bc2e5e93c5cf2e5ea7950d61e2e 100644 +--- a/src/main/java/net/minecraft/server/Enchantment.java ++++ b/src/main/java/net/minecraft/server/Enchantment.java +@@ -83,6 +83,7 @@ public abstract class Enchantment { + return this.f(); + } + ++ public final IChatBaseComponent getTranslationComponentForLevel(int level) { return this.d(level); } // Paper - OBFHELPER + public IChatBaseComponent d(int i) { + ChatMessage chatmessage = new ChatMessage(this.g()); + +diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java +index 37a84b44a46e1490f7b79839b04aef012ddc9fa3..0445bffdd1a6c9548c5c98c1ea4fd2c0c517acf4 100644 +--- a/src/main/java/net/minecraft/server/EntityPlayer.java ++++ b/src/main/java/net/minecraft/server/EntityPlayer.java +@@ -16,6 +16,7 @@ import org.apache.logging.log4j.LogManager; + import org.apache.logging.log4j.Logger; + + // CraftBukkit start ++import io.papermc.paper.adventure.PaperAdventure; // Paper + import org.bukkit.Bukkit; + import org.bukkit.GameMode; + import org.bukkit.Location; +@@ -84,6 +85,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { + + // CraftBukkit start + public String displayName; ++ public net.kyori.adventure.text.Component adventure$displayName; // Paper + public IChatBaseComponent listName; + public org.bukkit.Location compassTarget; + public int newExp = 0; +@@ -114,6 +116,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { + + // CraftBukkit start + this.displayName = this.getName(); ++ this.adventure$displayName = net.kyori.adventure.text.Component.text(this.getName()); // Paper + this.canPickUpLoot = true; + this.maxHealthCache = this.getMaxHealth(); + } +@@ -567,23 +570,17 @@ public class EntityPlayer extends EntityHuman implements ICrafting { + + IChatBaseComponent defaultMessage = this.getCombatTracker().getDeathMessage(); + +- String deathmessage = defaultMessage.getString(); +- org.bukkit.event.entity.PlayerDeathEvent event = CraftEventFactory.callPlayerDeathEvent(this, loot, deathmessage, keepInventory); ++ org.bukkit.event.entity.PlayerDeathEvent event = CraftEventFactory.callPlayerDeathEvent(this, loot, PaperAdventure.asAdventure(defaultMessage), keepInventory); // Paper - Adventure + + // SPIGOT-943 - only call if they have an inventory open + if (this.activeContainer != this.defaultContainer) { + this.closeInventory(); + } + +- String deathMessage = event.getDeathMessage(); ++ net.kyori.adventure.text.Component deathMessage = event.deathMessage() != null ? event.deathMessage() : net.kyori.adventure.text.Component.empty(); // Paper - Adventure + +- if (deathMessage != null && deathMessage.length() > 0 && flag) { // TODO: allow plugins to override? +- IChatBaseComponent ichatbasecomponent; +- if (deathMessage.equals(deathmessage)) { +- ichatbasecomponent = this.getCombatTracker().getDeathMessage(); +- } else { +- ichatbasecomponent = org.bukkit.craftbukkit.util.CraftChatMessage.fromStringOrNull(deathMessage); +- } ++ if (deathMessage != null && deathMessage != net.kyori.adventure.text.Component.empty() && flag) { // Paper - Adventure // TODO: allow plugins to override? ++ IChatBaseComponent ichatbasecomponent = PaperAdventure.asVanilla(deathMessage); // Paper - Adventure + + this.playerConnection.a((Packet) (new PacketPlayOutCombatEvent(this.getCombatTracker(), PacketPlayOutCombatEvent.EnumCombatEventType.ENTITY_DIED, ichatbasecomponent)), (future) -> { + if (!future.isSuccess()) { +@@ -1555,6 +1552,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { + } + + public String locale = "en_us"; // CraftBukkit - add, lowercase ++ public java.util.Locale adventure$locale = java.util.Locale.US; // Paper + public void a(PacketPlayInSettings packetplayinsettings) { + // CraftBukkit start + if (getMainHand() != packetplayinsettings.getMainHand()) { +@@ -1566,6 +1564,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting { + this.server.server.getPluginManager().callEvent(event); + } + this.locale = packetplayinsettings.locale; ++ // Paper start ++ this.adventure$locale = net.kyori.adventure.translation.Translator.parseLocale(this.locale); ++ this.playerConnection.networkManager.channel.attr(PaperAdventure.LOCALE_ATTRIBUTE).set(this.adventure$locale); ++ // Paper end + this.clientViewDistance = packetplayinsettings.viewDistance; + // CraftBukkit end + this.bY = packetplayinsettings.d(); +diff --git a/src/main/java/net/minecraft/server/EnumChatFormat.java b/src/main/java/net/minecraft/server/EnumChatFormat.java +index 68a5a0cbe88795f59ce96035da45371a5a366f5a..c186af518ef43e9efaf086233e1da8a1cf293c66 100644 +--- a/src/main/java/net/minecraft/server/EnumChatFormat.java ++++ b/src/main/java/net/minecraft/server/EnumChatFormat.java +@@ -61,6 +61,7 @@ public enum EnumChatFormat { + return !this.A && this != EnumChatFormat.RESET; + } + ++ @Nullable public Integer getHexValue() { return this.e(); } // Paper - OBFHELPER + @Nullable + public Integer e() { + return this.D; +@@ -84,6 +85,18 @@ public enum EnumChatFormat { + return s == null ? null : (EnumChatFormat) EnumChatFormat.w.get(c(s)); + } + ++ // Paper start ++ @Nullable public static EnumChatFormat getByHexValue(int i) { ++ for (EnumChatFormat value : values()) { ++ if (value.getHexValue() != null && value.getHexValue() == i) { ++ return value; ++ } ++ } ++ ++ return null; ++ } ++ // Paper end ++ + @Nullable + public static EnumChatFormat a(int i) { + if (i < 0) { +diff --git a/src/main/java/net/minecraft/server/IChatBaseComponent.java b/src/main/java/net/minecraft/server/IChatBaseComponent.java +index 7441beeaa4ee83467dac4d68176132efc6247337..de6bfc27cd38fd6293853d55cf62699aade94212 100644 +--- a/src/main/java/net/minecraft/server/IChatBaseComponent.java ++++ b/src/main/java/net/minecraft/server/IChatBaseComponent.java +@@ -1,5 +1,6 @@ + package net.minecraft.server; + ++import io.papermc.paper.adventure.AdventureComponent; // Paper + import com.google.gson.Gson; + import com.google.gson.GsonBuilder; + import com.google.gson.JsonArray; +@@ -104,6 +105,7 @@ public interface IChatBaseComponent extends Message, IChatFormatted, Iterable waitable = new Waitable() { + @Override +@@ -293,12 +294,12 @@ public class LoginListener implements PacketLoginInListener { + + LoginListener.this.server.processQueue.add(waitable); + if (waitable.get() != PlayerPreLoginEvent.Result.ALLOWED) { +- disconnect(event.getKickMessage()); ++ disconnect(PaperAdventure.asVanilla(event.kickMessage())); // Paper - Adventure + return; + } + } else { + if (asyncEvent.getLoginResult() != AsyncPlayerPreLoginEvent.Result.ALLOWED) { +- disconnect(asyncEvent.getKickMessage()); ++ disconnect(PaperAdventure.asVanilla(asyncEvent.kickMessage())); // Paper - Adventure + return; + } + } +diff --git a/src/main/java/net/minecraft/server/NBTTagString.java b/src/main/java/net/minecraft/server/NBTTagString.java +index 7ef2378311edd0645472d895cf3756426f25605d..f36e1bd69270bdfd9fa3de4626dc0f48cad8007b 100644 +--- a/src/main/java/net/minecraft/server/NBTTagString.java ++++ b/src/main/java/net/minecraft/server/NBTTagString.java +@@ -40,6 +40,7 @@ public class NBTTagString implements NBTBase { + this.data = s; + } + ++ public static NBTTagString create(final String value) { return a(value); } // Paper - OBFHELPER + public static NBTTagString a(String s) { + return s.isEmpty() ? NBTTagString.b : new NBTTagString(s); + } +diff --git a/src/main/java/net/minecraft/server/PacketDataSerializer.java b/src/main/java/net/minecraft/server/PacketDataSerializer.java +index 2976e8cc2da6e54e08e50ca1f5de5669823ef3f7..6c9aed49d5e63d6df608719ed17e813f86e93fcc 100644 +--- a/src/main/java/net/minecraft/server/PacketDataSerializer.java ++++ b/src/main/java/net/minecraft/server/PacketDataSerializer.java +@@ -10,6 +10,7 @@ import io.netty.buffer.ByteBufOutputStream; + import io.netty.handler.codec.DecoderException; + import io.netty.handler.codec.EncoderException; + import io.netty.util.ByteProcessor; ++import io.papermc.paper.adventure.PaperAdventure; // Paper + import java.io.DataInput; + import java.io.DataOutput; + import java.io.IOException; +@@ -31,6 +32,7 @@ import org.bukkit.craftbukkit.inventory.CraftItemStack; // CraftBukkit + public class PacketDataSerializer extends ByteBuf { + + private final ByteBuf a; ++ public java.util.Locale adventure$locale; // Paper + + public PacketDataSerializer(ByteBuf bytebuf) { + this.a = bytebuf; +@@ -152,8 +154,15 @@ public class PacketDataSerializer extends ByteBuf { + return IChatBaseComponent.ChatSerializer.a(this.e(262144)); + } + ++ // Paper start ++ public PacketDataSerializer writeComponent(final net.kyori.adventure.text.Component component) { ++ return this.writeUtf(PaperAdventure.asJsonString(component, this.adventure$locale), 262144); ++ } ++ // Paper end ++ + public PacketDataSerializer a(IChatBaseComponent ichatbasecomponent) { +- return this.a(IChatBaseComponent.ChatSerializer.a(ichatbasecomponent), 262144); ++ //return this.a(IChatBaseComponent.ChatSerializer.a(ichatbasecomponent), 262144); // Paper - comment ++ return this.writeUtf(PaperAdventure.asJsonString(ichatbasecomponent, this.adventure$locale), 262144); // Paper + } + + public > T a(Class oclass) { +@@ -336,6 +345,7 @@ public class PacketDataSerializer extends ByteBuf { + return this.a(s, 32767); + } + ++ public PacketDataSerializer writeUtf(final String string, final int maxLength) { return this.a(string, maxLength); } // Paper - OBFHELPER + public PacketDataSerializer a(String s, int i) { + byte[] abyte = s.getBytes(StandardCharsets.UTF_8); + +diff --git a/src/main/java/net/minecraft/server/PacketEncoder.java b/src/main/java/net/minecraft/server/PacketEncoder.java +index 63c4dbd327beb7b6ab42eb44650d68accd3b0de6..d3c6bdbefb89b3e668477e0d771015e9b25c24a8 100644 +--- a/src/main/java/net/minecraft/server/PacketEncoder.java ++++ b/src/main/java/net/minecraft/server/PacketEncoder.java +@@ -3,6 +3,7 @@ package net.minecraft.server; + import io.netty.buffer.ByteBuf; + import io.netty.channel.ChannelHandlerContext; + import io.netty.handler.codec.MessageToByteEncoder; ++import io.papermc.paper.adventure.PaperAdventure; // Paper + import java.io.IOException; + import org.apache.logging.log4j.LogManager; + import org.apache.logging.log4j.Logger; +@@ -35,6 +36,7 @@ public class PacketEncoder extends MessageToByteEncoder> { + throw new IOException("Can't serialize unregistered packet"); + } else { + PacketDataSerializer packetdataserializer = new PacketDataSerializer(bytebuf); ++ packetdataserializer.adventure$locale = channelhandlercontext.channel().attr(PaperAdventure.LOCALE_ATTRIBUTE).get(); // Paper + + packetdataserializer.d(integer); + +diff --git a/src/main/java/net/minecraft/server/PacketPlayOutChat.java b/src/main/java/net/minecraft/server/PacketPlayOutChat.java +index 9ae419f9ad971ee5c743ee931426ab482b6184f1..47328ca5e3f1e71ed25ba89df5b666f041e49b76 100644 +--- a/src/main/java/net/minecraft/server/PacketPlayOutChat.java ++++ b/src/main/java/net/minecraft/server/PacketPlayOutChat.java +@@ -6,6 +6,7 @@ import java.util.UUID; + public class PacketPlayOutChat implements Packet { + + private IChatBaseComponent a; ++ public net.kyori.adventure.text.Component adventure$message; // Paper + public net.md_5.bungee.api.chat.BaseComponent[] components; // Spigot + private ChatMessageType b; + private UUID c; +@@ -27,6 +28,11 @@ public class PacketPlayOutChat implements Packet { + + @Override + public void b(PacketDataSerializer packetdataserializer) throws IOException { ++ // Paper start ++ if (this.adventure$message != null) { ++ packetdataserializer.writeComponent(this.adventure$message); ++ } else ++ // Paper end + // Spigot start + if (components != null) { + packetdataserializer.a(net.md_5.bungee.chat.ComponentSerializer.toString(components)); +diff --git a/src/main/java/net/minecraft/server/PacketPlayOutPlayerListHeaderFooter.java b/src/main/java/net/minecraft/server/PacketPlayOutPlayerListHeaderFooter.java +index bb15a104c5ec5b12a28078369dc12257105f89bd..e3a8e1353bf8cd00fab439ca8ee25d1bc428503c 100644 +--- a/src/main/java/net/minecraft/server/PacketPlayOutPlayerListHeaderFooter.java ++++ b/src/main/java/net/minecraft/server/PacketPlayOutPlayerListHeaderFooter.java +@@ -6,6 +6,10 @@ public class PacketPlayOutPlayerListHeaderFooter implements Packet { + + private PacketPlayOutTitle.EnumTitleAction a; + private IChatBaseComponent b; ++ public net.kyori.adventure.text.Component adventure$text; // Paper + private int c; + private int d; + private int e; +@@ -48,6 +49,11 @@ public class PacketPlayOutTitle implements Packet { + public void b(PacketDataSerializer packetdataserializer) throws IOException { + packetdataserializer.a((Enum) this.a); + if (this.a == PacketPlayOutTitle.EnumTitleAction.TITLE || this.a == PacketPlayOutTitle.EnumTitleAction.SUBTITLE || this.a == PacketPlayOutTitle.EnumTitleAction.ACTIONBAR) { ++ // Paper start ++ if (this.adventure$text != null) { ++ packetdataserializer.writeComponent(this.adventure$text); ++ } else ++ // Paper end + packetdataserializer.a(this.b); + } + +diff --git a/src/main/java/net/minecraft/server/PacketStatusListener.java b/src/main/java/net/minecraft/server/PacketStatusListener.java +index 055555cb5ce63d41cb9a7f4114341b0685879b9e..7875d4c08969b3adc6f95504686cc9fe99e3f29a 100644 +--- a/src/main/java/net/minecraft/server/PacketStatusListener.java ++++ b/src/main/java/net/minecraft/server/PacketStatusListener.java +@@ -43,7 +43,7 @@ public class PacketStatusListener implements PacketStatusInListener { + CraftIconCache icon = minecraftServer.server.getServerIcon(); + + ServerListPingEvent() { +- super(((InetSocketAddress) networkManager.getSocketAddress()).getAddress(), minecraftServer.getMotd(), minecraftServer.getPlayerList().getMaxPlayers()); ++ super(((InetSocketAddress) networkManager.getSocketAddress()).getAddress(), minecraftServer.server.motd(), minecraftServer.getPlayerList().getMaxPlayers()); // Paper - Adventure + } + + @Override +diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java +index d34e91887cd73009bf852fb849e495a8affed7a9..287d1c6abd407dc8f1e5b29a95579ff9875bdaec 100644 +--- a/src/main/java/net/minecraft/server/PlayerConnection.java ++++ b/src/main/java/net/minecraft/server/PlayerConnection.java +@@ -25,6 +25,8 @@ import org.apache.logging.log4j.LogManager; + import org.apache.logging.log4j.Logger; + + // CraftBukkit start ++import io.papermc.paper.adventure.PaperAdventure; // Paper ++import io.papermc.paper.adventure.VanillaChatMessageLogic; // Paper + import java.util.concurrent.ExecutionException; + import java.util.concurrent.atomic.AtomicIntegerFieldUpdater; + import org.bukkit.Location; +@@ -243,21 +245,20 @@ public class PlayerConnection implements PacketListenerPlayIn { + return this.minecraftServer.a(this.player.getProfile()); + } + +- // CraftBukkit start +- @Deprecated +- public void disconnect(IChatBaseComponent ichatbasecomponent) { +- disconnect(CraftChatMessage.fromComponent(ichatbasecomponent)); ++ public void disconnect(String s) { ++ // Paper start - Adventure ++ this.disconnect(CraftChatMessage.fromStringOrNull(s)); + } +- // CraftBukkit end + +- public void disconnect(String s) { ++ public void disconnect(IChatBaseComponent reason) { ++ // Paper end + // CraftBukkit start - fire PlayerKickEvent + if (this.processedDisconnect) { + return; + } +- String leaveMessage = EnumChatFormat.YELLOW + this.player.getName() + " left the game."; ++ net.kyori.adventure.text.Component leaveMessage = net.kyori.adventure.text.Component.translatable("multiplayer.player.left", net.kyori.adventure.text.format.NamedTextColor.YELLOW); // Paper - Adventure + +- PlayerKickEvent event = new PlayerKickEvent(this.server.getPlayer(this.player), s, leaveMessage); ++ PlayerKickEvent event = new PlayerKickEvent(this.server.getPlayer(this.player), PaperAdventure.asAdventure(reason), leaveMessage); // Paper - Adventure + + if (this.server.getServer().isRunning()) { + this.server.getPluginManager().callEvent(event); +@@ -268,8 +269,7 @@ public class PlayerConnection implements PacketListenerPlayIn { + return; + } + // Send the possibly modified leave message +- s = event.getReason(); +- final IChatBaseComponent ichatbasecomponent = CraftChatMessage.fromString(s, true)[0]; ++ final IChatBaseComponent ichatbasecomponent = PaperAdventure.asVanilla(event.reason()); // Paper - Adventure + // CraftBukkit end + + this.networkManager.sendPacket(new PacketPlayOutKickDisconnect(ichatbasecomponent), (future) -> { +@@ -1485,9 +1485,11 @@ public class PlayerConnection implements PacketListenerPlayIn { + */ + + this.player.p(); +- String quitMessage = this.minecraftServer.getPlayerList().disconnect(this.player); +- if ((quitMessage != null) && (quitMessage.length() > 0)) { +- this.minecraftServer.getPlayerList().sendMessage(CraftChatMessage.fromString(quitMessage)); ++ // Paper start - Adventure ++ net.kyori.adventure.text.Component quitMessage = this.minecraftServer.getPlayerList().disconnect(this.player); ++ if ((quitMessage != null) && (quitMessage.equals(net.kyori.adventure.text.Component.empty()))) { ++ this.minecraftServer.getPlayerList().sendMessage(PaperAdventure.asVanilla(quitMessage)); ++ // Paper end + } + // CraftBukkit end + ITextFilter itextfilter = this.player.Q(); +@@ -1721,15 +1723,20 @@ public class PlayerConnection implements PacketListenerPlayIn { + return null; + } + +- String message = String.format(queueEvent.getFormat(), queueEvent.getPlayer().getDisplayName(), queueEvent.getMessage()); +- PlayerConnection.this.minecraftServer.console.sendMessage(message); ++ final net.kyori.adventure.text.Component adventure$msg = VanillaChatMessageLogic.formatChat(VanillaChatMessageLogic.displayNameForChat((CraftPlayer) player), queueEvent.getFormat(), queueEvent.getMessage()); // Paper ++ //String message = String.format(queueEvent.getFormat(), queueEvent.getPlayer().getDisplayName(), queueEvent.getMessage()); // Paper - comment ++ //PlayerConnection.this.minecraftServer.console.sendMessage(message); // Paper - comment ++ PlayerConnection.this.minecraftServer.console.sendMessage(adventure$msg); // Paper + if (((LazyPlayerSet) queueEvent.getRecipients()).isLazy()) { ++ final IChatBaseComponent vanilla$msg = PaperAdventure.asVanilla(adventure$msg); // Paper + for (Object player : PlayerConnection.this.minecraftServer.getPlayerList().players) { +- ((EntityPlayer) player).sendMessage(PlayerConnection.this.player.getUniqueID(), CraftChatMessage.fromString(message)); ++ //((EntityPlayer) player).sendMessage(PlayerConnection.this.player.getUniqueID(), CraftChatMessage.fromString(message)); // Paper - comment ++ ((EntityPlayer) player).sendMessage(vanilla$msg, PlayerConnection.this.player.getUniqueID()); + } + } else { + for (Player player : queueEvent.getRecipients()) { +- player.sendMessage(PlayerConnection.this.player.getUniqueID(), message); ++ //player.sendMessage(PlayerConnection.this.player.getUniqueID(), message); // Paper - comment ++ player.sendMessage(PlayerConnection.this.player.getBukkitEntity(), adventure$msg); // Paper + } + } + return null; +@@ -1751,15 +1758,20 @@ public class PlayerConnection implements PacketListenerPlayIn { + return; + } + +- s = String.format(event.getFormat(), event.getPlayer().getDisplayName(), event.getMessage()); +- minecraftServer.console.sendMessage(s); ++ final net.kyori.adventure.text.Component adventure$msg = VanillaChatMessageLogic.formatChat(VanillaChatMessageLogic.displayNameForChat((CraftPlayer) player), event.getFormat(), event.getMessage()); // Paper ++ //s = String.format(event.getFormat(), event.getPlayer().getDisplayName(), event.getMessage()); // Paper - comment ++ //minecraftServer.console.sendMessage(s); // Paper - comment ++ minecraftServer.console.sendMessage(adventure$msg); // Paper + if (((LazyPlayerSet) event.getRecipients()).isLazy()) { ++ final IChatBaseComponent vanilla$msg = PaperAdventure.asVanilla(adventure$msg); // Paper + for (Object recipient : minecraftServer.getPlayerList().players) { +- ((EntityPlayer) recipient).sendMessage(PlayerConnection.this.player.getUniqueID(), CraftChatMessage.fromString(s)); ++ //((EntityPlayer) recipient).sendMessage(PlayerConnection.this.player.getUniqueID(), CraftChatMessage.fromString(s)); // Paper - comment ++ ((EntityPlayer) recipient).sendMessage(vanilla$msg, PlayerConnection.this.player.getUniqueID()); // Paper + } + } else { + for (Player recipient : event.getRecipients()) { +- recipient.sendMessage(PlayerConnection.this.player.getUniqueID(), s); ++ //recipient.sendMessage(PlayerConnection.this.player.getUniqueID(), s); // Paper - comment ++ recipient.sendMessage(PlayerConnection.this.player.getBukkitEntity(), adventure$msg); // Paper + } + } + } +@@ -2511,21 +2523,20 @@ public class PlayerConnection implements PacketListenerPlayIn { + return; + } + +- // CraftBukkit start +- Player player = this.server.getPlayer(this.player); +- int x = packetplayinupdatesign.b().getX(); +- int y = packetplayinupdatesign.b().getY(); +- int z = packetplayinupdatesign.b().getZ(); +- String[] lines = new String[4]; ++ // CraftBukkit start // Paper start - Adventure ++ List lines = new java.util.ArrayList<>(); + + for (int i = 0; i < list.size(); ++i) { +- lines[i] = EnumChatFormat.a(new ChatComponentText(EnumChatFormat.a((String) list.get(i))).getString()); ++ lines.add(net.kyori.adventure.text.Component.text(list.get(i))); + } +- SignChangeEvent event = new SignChangeEvent((org.bukkit.craftbukkit.block.CraftBlock) player.getWorld().getBlockAt(x, y, z), this.server.getPlayer(this.player), lines); ++ SignChangeEvent event = new SignChangeEvent(org.bukkit.craftbukkit.block.CraftBlock.at(worldserver, blockposition), this.getPlayer(), lines); + this.server.getPluginManager().callEvent(event); + + if (!event.isCancelled()) { +- System.arraycopy(org.bukkit.craftbukkit.block.CraftSign.sanitizeLines(event.getLines()), 0, tileentitysign.lines, 0, 4); ++ for (int i = 0; i < 4; i++) { ++ tileentitysign.a(i, PaperAdventure.asVanilla(event.line(i))); ++ } ++ // Paper end + tileentitysign.isEditable = false; + } + // CraftBukkit end +diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java +index 5b49047b820dbe1f326320b71445ac216bf688b5..1b0fe4f27a7346a1466db97e796c4a65b11e1ab8 100644 +--- a/src/main/java/net/minecraft/server/PlayerList.java ++++ b/src/main/java/net/minecraft/server/PlayerList.java +@@ -8,6 +8,7 @@ import com.mojang.authlib.GameProfile; + import com.mojang.serialization.DataResult; + import com.mojang.serialization.Dynamic; + import io.netty.buffer.Unpooled; ++import io.papermc.paper.adventure.PaperAdventure; + import java.io.File; + import java.net.SocketAddress; + import java.text.SimpleDateFormat; +@@ -23,6 +24,7 @@ import org.apache.logging.log4j.LogManager; + import org.apache.logging.log4j.Logger; + + // CraftBukkit start ++import io.papermc.paper.adventure.PaperAdventure; // Paper + import com.google.common.base.Predicate; + import com.google.common.collect.Iterables; + +@@ -188,7 +190,7 @@ public abstract class PlayerList { + } + // CraftBukkit start + chatmessage.a(EnumChatFormat.YELLOW); +- String joinMessage = CraftChatMessage.fromComponent(chatmessage); ++ IChatBaseComponent joinMessage = chatmessage; // Paper - Adventure + + playerconnection.a(entityplayer.locX(), entityplayer.locY(), entityplayer.locZ(), entityplayer.yaw, entityplayer.pitch); + this.players.add(entityplayer); +@@ -197,19 +199,17 @@ public abstract class PlayerList { + // this.sendAll(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER, new EntityPlayer[]{entityplayer})); // CraftBukkit - replaced with loop below + + // CraftBukkit start +- PlayerJoinEvent playerJoinEvent = new PlayerJoinEvent(cserver.getPlayer(entityplayer), joinMessage); ++ PlayerJoinEvent playerJoinEvent = new org.bukkit.event.player.PlayerJoinEvent(cserver.getPlayer(entityplayer), PaperAdventure.asAdventure(chatmessage)); // Paper - Adventure + cserver.getPluginManager().callEvent(playerJoinEvent); + + if (!entityplayer.playerConnection.networkManager.isConnected()) { + return; + } + +- joinMessage = playerJoinEvent.getJoinMessage(); ++ joinMessage = PaperAdventure.asVanilla(playerJoinEvent.joinMessage()); // Paper - Adventure + +- if (joinMessage != null && joinMessage.length() > 0) { +- for (IChatBaseComponent line : org.bukkit.craftbukkit.util.CraftChatMessage.fromString(joinMessage)) { +- server.getPlayerList().sendAll(new PacketPlayOutChat(line, ChatMessageType.SYSTEM, SystemUtils.b)); +- } ++ if (playerJoinEvent.joinMessage() != net.kyori.adventure.text.Component.empty()) { // Paper - Adventure ++ server.getPlayerList().sendAll(new PacketPlayOutChat(joinMessage, ChatMessageType.SYSTEM, SystemUtils.b)); // Paper - Adventure + } + // CraftBukkit end + +@@ -406,7 +406,7 @@ public abstract class PlayerList { + + } + +- public String disconnect(EntityPlayer entityplayer) { // CraftBukkit - return string ++ public net.kyori.adventure.text.Component disconnect(EntityPlayer entityplayer) { // Paper - return Component + WorldServer worldserver = entityplayer.getWorldServer(); + + entityplayer.a(StatisticList.LEAVE_GAME); +@@ -417,7 +417,7 @@ public abstract class PlayerList { + entityplayer.closeInventory(); + } + +- PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(cserver.getPlayer(entityplayer), "\u00A7e" + entityplayer.getName() + " left the game"); ++ PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(cserver.getPlayer(entityplayer), net.kyori.adventure.text.Component.translatable("multiplayer.player.left", net.kyori.adventure.text.format.NamedTextColor.YELLOW)); + cserver.getPluginManager().callEvent(playerQuitEvent); + entityplayer.getBukkitEntity().disconnect(playerQuitEvent.getQuitMessage()); + +@@ -478,7 +478,7 @@ public abstract class PlayerList { + cserver.getScoreboardManager().removePlayer(entityplayer.getBukkitEntity()); + // CraftBukkit end + +- return playerQuitEvent.getQuitMessage(); // CraftBukkit ++ return playerQuitEvent.quitMessage(); // Paper - Adventure + } + + // CraftBukkit start - Whole method, SocketAddress to LoginListener, added hostname to signature, return EntityPlayer +@@ -524,10 +524,10 @@ public abstract class PlayerList { + } + + // return chatmessage; +- if (!gameprofilebanentry.hasExpired()) event.disallow(PlayerLoginEvent.Result.KICK_BANNED, CraftChatMessage.fromComponent(chatmessage)); // Spigot ++ if (!gameprofilebanentry.hasExpired()) event.disallow(PlayerLoginEvent.Result.KICK_BANNED, PaperAdventure.asAdventure(chatmessage)); // Spigot // Paper - Adventure + } else if (!this.isWhitelisted(gameprofile)) { + chatmessage = new ChatMessage("multiplayer.disconnect.not_whitelisted"); +- event.disallow(PlayerLoginEvent.Result.KICK_WHITELIST, org.spigotmc.SpigotConfig.whitelistMessage); // Spigot ++ event.disallow(PlayerLoginEvent.Result.KICK_WHITELIST, net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(org.spigotmc.SpigotConfig.whitelistMessage)); // Spigot // Paper - Adventure + } else if (getIPBans().isBanned(socketaddress) && !getIPBans().get(socketaddress).hasExpired()) { + IpBanEntry ipbanentry = this.l.get(socketaddress); + +@@ -537,17 +537,17 @@ public abstract class PlayerList { + } + + // return chatmessage; +- event.disallow(PlayerLoginEvent.Result.KICK_BANNED, CraftChatMessage.fromComponent(chatmessage)); ++ event.disallow(PlayerLoginEvent.Result.KICK_BANNED, PaperAdventure.asAdventure(chatmessage)); // Paper - Adventure + } else { + // return this.players.size() >= this.maxPlayers && !this.f(gameprofile) ? new ChatMessage("multiplayer.disconnect.server_full") : null; + if (this.players.size() >= this.maxPlayers && !this.f(gameprofile)) { +- event.disallow(PlayerLoginEvent.Result.KICK_FULL, org.spigotmc.SpigotConfig.serverFullMessage); // Spigot ++ event.disallow(PlayerLoginEvent.Result.KICK_FULL, net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(org.spigotmc.SpigotConfig.serverFullMessage)); // Spigot // Paper - Adventure + } + } + + cserver.getPluginManager().callEvent(event); + if (event.getResult() != PlayerLoginEvent.Result.ALLOWED) { +- loginlistener.disconnect(event.getKickMessage()); ++ loginlistener.disconnect(PaperAdventure.asVanilla(event.kickMessage())); // Paper - Adventure + return null; + } + return entity; +@@ -1068,7 +1068,7 @@ public abstract class PlayerList { + public void shutdown() { + // CraftBukkit start - disconnect safely + for (EntityPlayer player : this.players) { +- player.playerConnection.disconnect(this.server.server.getShutdownMessage()); // CraftBukkit - add custom shutdown message ++ player.playerConnection.disconnect(PaperAdventure.asVanilla(this.server.server.shutdownMessage())); // CraftBukkit - add custom shutdown message // Paper - Adventure + } + // CraftBukkit end + +diff --git a/src/main/java/net/minecraft/server/WorldMap.java b/src/main/java/net/minecraft/server/WorldMap.java +index e6d97e7ffae3eadac586bad078123cd4aaa69916..d11725d61b888ceb08c4ea30f23d563170ce944d 100644 +--- a/src/main/java/net/minecraft/server/WorldMap.java ++++ b/src/main/java/net/minecraft/server/WorldMap.java +@@ -12,6 +12,7 @@ import org.apache.logging.log4j.LogManager; + import org.apache.logging.log4j.Logger; + + // CraftBukkit start ++import io.papermc.paper.adventure.PaperAdventure; // Paper + import java.util.UUID; + + import org.bukkit.craftbukkit.CraftServer; +@@ -453,7 +454,7 @@ public class WorldMap extends PersistentBase { + for ( org.bukkit.map.MapCursor cursor : render.cursors) { + + if (cursor.isVisible()) { +- icons.add(new MapIcon(MapIcon.Type.a(cursor.getRawType()), cursor.getX(), cursor.getY(), cursor.getDirection(), CraftChatMessage.fromStringOrNull(cursor.getCaption()))); ++ icons.add(new MapIcon(MapIcon.Type.a(cursor.getRawType()), cursor.getX(), cursor.getY(), cursor.getDirection(), PaperAdventure.asVanilla(cursor.caption()))); // Paper - Adventure + } + } + +diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +index 73bd46c980cb13d6cbe4aba41adb122eaab769be..b6f867c891c2f02a2e526a0d746d0adde250e202 100644 +--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java ++++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +@@ -564,8 +564,11 @@ public final class CraftServer implements Server { + } + + @Override ++ @Deprecated // Paper start + public int broadcastMessage(String message) { +- return broadcast(message, BROADCAST_CHANNEL_USERS); ++ this.sendMessage(net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(message)); ++ return this.getOnlinePlayers().size() + 1; ++ // Paper end + } + + public Player getPlayer(final EntityPlayer entity) { +@@ -1303,7 +1306,15 @@ public final class CraftServer implements Server { + return configuration.getInt("settings.spawn-radius", -1); + } + ++ // Paper start + @Override ++ public net.kyori.adventure.text.Component shutdownMessage() { ++ String msg = getShutdownMessage(); ++ return msg != null ? net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(msg) : null; ++ } ++ // Paper end ++ @Override ++ @Deprecated // Paper + public String getShutdownMessage() { + return configuration.getString("settings.shutdown-message"); + } +@@ -1419,7 +1430,15 @@ public final class CraftServer implements Server { + } + + @Override ++ @Deprecated // Paper + public int broadcast(String message, String permission) { ++ // Paper start - Adventure ++ return this.broadcast(net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(message), permission); ++ } ++ ++ @Override ++ public int broadcast(net.kyori.adventure.text.Component message, String permission) { ++ // Paper end + Set recipients = new HashSet<>(); + for (Permissible permissible : getPluginManager().getPermissionSubscriptions(permission)) { + if (permissible instanceof CommandSender && permissible.hasPermission(permission)) { +@@ -1427,14 +1446,14 @@ public final class CraftServer implements Server { + } + } + +- BroadcastMessageEvent broadcastMessageEvent = new BroadcastMessageEvent(!Bukkit.isPrimaryThread(), message, recipients); ++ BroadcastMessageEvent broadcastMessageEvent = new BroadcastMessageEvent(!Bukkit.isPrimaryThread(), message, recipients); // Paper - Adventure + getPluginManager().callEvent(broadcastMessageEvent); + + if (broadcastMessageEvent.isCancelled()) { + return 0; + } + +- message = broadcastMessageEvent.getMessage(); ++ message = broadcastMessageEvent.message(); // Paper - Adventure + + for (CommandSender recipient : recipients) { + recipient.sendMessage(message); +@@ -1660,6 +1679,14 @@ public final class CraftServer implements Server { + return CraftInventoryCreator.INSTANCE.createInventory(owner, type); + } + ++ // Paper start ++ @Override ++ public Inventory createInventory(InventoryHolder owner, InventoryType type, net.kyori.adventure.text.Component title) { ++ Validate.isTrue(type.isCreatable(), "Cannot open an inventory of type ", type); ++ return CraftInventoryCreator.INSTANCE.createInventory(owner, type, title); ++ } ++ // Paper end ++ + @Override + public Inventory createInventory(InventoryHolder owner, InventoryType type, String title) { + Validate.isTrue(type.isCreatable(), "Cannot open an inventory of type ", type); +@@ -1672,13 +1699,28 @@ public final class CraftServer implements Server { + return CraftInventoryCreator.INSTANCE.createInventory(owner, size); + } + ++ // Paper start ++ @Override ++ public Inventory createInventory(InventoryHolder owner, int size, net.kyori.adventure.text.Component title) throws IllegalArgumentException { ++ Validate.isTrue(9 <= size && size <= 54 && size % 9 == 0, "Size for custom inventory must be a multiple of 9 between 9 and 54 slots (got " + size + ")"); ++ return CraftInventoryCreator.INSTANCE.createInventory(owner, size, title); ++ } ++ // Paper end ++ + @Override + public Inventory createInventory(InventoryHolder owner, int size, String title) throws IllegalArgumentException { + Validate.isTrue(9 <= size && size <= 54 && size % 9 == 0, "Size for custom inventory must be a multiple of 9 between 9 and 54 slots (got " + size + ")"); + return CraftInventoryCreator.INSTANCE.createInventory(owner, size, title); + } + ++ // Paper start + @Override ++ public Merchant createMerchant(net.kyori.adventure.text.Component title) { ++ return new org.bukkit.craftbukkit.inventory.CraftMerchantCustom(title == null ? InventoryType.MERCHANT.defaultTitle() : title); ++ } ++ // Paper end ++ @Override ++ @Deprecated // Paper + public Merchant createMerchant(String title) { + return new CraftMerchantCustom(title == null ? InventoryType.MERCHANT.getDefaultTitle() : title); + } +@@ -1722,6 +1764,12 @@ public final class CraftServer implements Server { + return Thread.currentThread().equals(console.serverThread) || console.hasStopped() || !org.spigotmc.AsyncCatcher.enabled; // All bets are off if we have shut down (e.g. due to watchdog) + } + ++ // Paper start ++ @Override ++ public net.kyori.adventure.text.Component motd() { ++ return io.papermc.paper.adventure.PaperAdventure.asAdventure(new net.minecraft.server.ChatComponentText(console.getMotd())); ++ } ++ // Paper end + @Override + public String getMotd() { + return console.getMotd(); +@@ -2148,5 +2196,15 @@ public final class CraftServer implements Server { + return null; + } + } ++ ++ // Paper start ++ private Iterable adventure$audiences; ++ @Override ++ public Iterable audiences() { ++ if (this.adventure$audiences == null) { ++ this.adventure$audiences = com.google.common.collect.Iterables.concat(java.util.Collections.singleton(this.getConsoleSender()), this.getOnlinePlayers()); ++ } ++ return this.adventure$audiences; ++ } + // Paper end + } +diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBeacon.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBeacon.java +index 21ebceafbf27125761aa08cfe0785f6f05c77592..252b03e287cbe9212c7ec80be049647c4c77d37a 100644 +--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBeacon.java ++++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBeacon.java +@@ -70,6 +70,19 @@ public class CraftBeacon extends CraftBlockEntityState impleme + this.getSnapshot().secondaryEffect = (effect != null) ? MobEffectList.fromId(effect.getId()) : null; + } + ++ // Paper start ++ @Override ++ public net.kyori.adventure.text.Component customName() { ++ final TileEntityBeacon be = this.getSnapshot(); ++ return be.customName != null ? io.papermc.paper.adventure.PaperAdventure.asAdventure(be.customName) : null; ++ } ++ ++ @Override ++ public void customName(final net.kyori.adventure.text.Component customName) { ++ this.getSnapshot().setCustomName(customName != null ? io.papermc.paper.adventure.PaperAdventure.asVanilla(customName) : null); ++ } ++ // Paper end ++ + @Override + public String getCustomName() { + TileEntityBeacon beacon = this.getSnapshot(); +diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftContainer.java b/src/main/java/org/bukkit/craftbukkit/block/CraftContainer.java +index 36ba813e56c6e75528507c415d11e5a57a5f4ae3..a76fa169b0efbf02a4aebbfbd8e38c8f429eba83 100644 +--- a/src/main/java/org/bukkit/craftbukkit/block/CraftContainer.java ++++ b/src/main/java/org/bukkit/craftbukkit/block/CraftContainer.java +@@ -1,6 +1,7 @@ + package org.bukkit.craftbukkit.block; + + import net.minecraft.server.ChestLock; ++import net.minecraft.server.TileEntityBeacon; + import net.minecraft.server.TileEntityContainer; + import org.bukkit.Material; + import org.bukkit.block.Block; +@@ -32,6 +33,19 @@ public abstract class CraftContainer extends Craf + this.getSnapshot().chestLock = (key == null) ? ChestLock.a : new ChestLock(key); + } + ++ // Paper start ++ @Override ++ public net.kyori.adventure.text.Component customName() { ++ final T be = this.getSnapshot(); ++ return be.hasCustomName() ? io.papermc.paper.adventure.PaperAdventure.asAdventure(be.getCustomName()) : null; ++ } ++ ++ @Override ++ public void customName(final net.kyori.adventure.text.Component customName) { ++ this.getSnapshot().setCustomName(customName != null ? io.papermc.paper.adventure.PaperAdventure.asVanilla(customName) : null); ++ } ++ // Paper end ++ + @Override + public String getCustomName() { + T container = this.getSnapshot(); +diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftEnchantingTable.java b/src/main/java/org/bukkit/craftbukkit/block/CraftEnchantingTable.java +index 3a782294c15e2c2592976858e28ec33f049cb65e..772c6b2fa50deac27e5ed112e6d9f9ddd32f668e 100644 +--- a/src/main/java/org/bukkit/craftbukkit/block/CraftEnchantingTable.java ++++ b/src/main/java/org/bukkit/craftbukkit/block/CraftEnchantingTable.java +@@ -16,6 +16,19 @@ public class CraftEnchantingTable extends CraftBlockEntityState implements Sign { + + // Lazily initialized only if requested: +- private String[] originalLines = null; +- private String[] lines = null; ++ // Paper start ++ private java.util.ArrayList originalLines = null; // ArrayList for RandomAccess ++ private java.util.ArrayList lines = null; // ArrayList for RandomAccess ++ // Paper end + + public CraftSign(final Block block) { + super(block, TileEntitySign.class); +@@ -24,27 +26,52 @@ public class CraftSign extends CraftBlockEntityState implements + super(material, te); + } + ++ // Paper start + @Override +- public String[] getLines() { +- if (lines == null) { +- // Lazy initialization: +- TileEntitySign sign = this.getSnapshot(); +- lines = new String[sign.lines.length]; +- System.arraycopy(revertComponents(sign.lines), 0, lines, 0, lines.length); +- originalLines = new String[lines.length]; +- System.arraycopy(lines, 0, originalLines, 0, originalLines.length); ++ public java.util.List lines() { ++ this.loadLines(); ++ return this.lines; ++ } ++ ++ @Override ++ public net.kyori.adventure.text.Component line(int index) { ++ this.loadLines(); ++ return this.lines.get(index); ++ } ++ ++ @Override ++ public void line(int index, net.kyori.adventure.text.Component line) { ++ this.loadLines(); ++ this.lines.set(index, line); ++ } ++ ++ private void loadLines() { ++ if (lines != null) { ++ return; + } +- return lines; ++ ++ // Lazy initialization: ++ TileEntitySign sign = this.getSnapshot(); ++ lines = io.papermc.paper.adventure.PaperAdventure.asAdventure(com.google.common.collect.Lists.newArrayList(sign.lines)); ++ originalLines = new java.util.ArrayList<>(lines); ++ } ++ // Paper end ++ @Override ++ public String[] getLines() { ++ this.loadLines(); ++ return this.lines.stream().map(net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection()::serialize).toArray(String[]::new); // Paper + } + + @Override + public String getLine(int index) throws IndexOutOfBoundsException { +- return getLines()[index]; ++ this.loadLines(); ++ return net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().serialize(this.lines.get(index)); // Paper + } + + @Override + public void setLine(int index, String line) throws IndexOutOfBoundsException { +- getLines()[index] = line; ++ this.loadLines(); ++ this.lines.set(index, net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(line)); // Paper + } + + @Override +@@ -72,16 +99,32 @@ public class CraftSign extends CraftBlockEntityState implements + super.applyTo(sign); + + if (lines != null) { +- for (int i = 0; i < lines.length; i++) { +- String line = (lines[i] == null) ? "" : lines[i]; +- if (line.equals(originalLines[i])) { ++ // Paper start ++ for (int i = 0; i < this.lines.size(); ++i) { ++ net.kyori.adventure.text.Component component = this.lines.get(i); ++ net.kyori.adventure.text.Component origComp = this.lines.get(i); ++ if (component.equals(origComp)) { + continue; // The line contents are still the same, skip. + } +- sign.lines[i] = CraftChatMessage.fromString(line)[0]; ++ sign.lines[i] = io.papermc.paper.adventure.PaperAdventure.asVanilla(component); + } ++ // Paper end + } + } + ++ // Paper start ++ public static IChatBaseComponent[] sanitizeLines(java.util.List lines) { ++ IChatBaseComponent[] components = new IChatBaseComponent[4]; ++ for (int i = 0; i < 4; i++) { ++ if (i < lines.size() && lines.get(i) != null) { ++ components[i] = io.papermc.paper.adventure.PaperAdventure.asVanilla(lines.get(i)); ++ } else { ++ components[i] = new ChatComponentText(""); ++ } ++ } ++ return components; ++ } ++ // Paper end + public static IChatBaseComponent[] sanitizeLines(String[] lines) { + IChatBaseComponent[] components = new IChatBaseComponent[4]; + +diff --git a/src/main/java/org/bukkit/craftbukkit/command/CraftConsoleCommandSender.java b/src/main/java/org/bukkit/craftbukkit/command/CraftConsoleCommandSender.java +index 089fe4a3458ed3106fa214f89a7004a5d3c6bb95..5bb8c38c511ec000476afde8038587ddbc7549cc 100644 +--- a/src/main/java/org/bukkit/craftbukkit/command/CraftConsoleCommandSender.java ++++ b/src/main/java/org/bukkit/craftbukkit/command/CraftConsoleCommandSender.java +@@ -80,4 +80,11 @@ public class CraftConsoleCommandSender extends ServerCommandSender implements Co + public boolean isConversing() { + return conversationTracker.isConversing(); + } ++ ++ // Paper start ++ @Override ++ public void sendMessage(final net.kyori.adventure.identity.Identity identity, final net.kyori.adventure.text.Component message, final net.kyori.adventure.audience.MessageType type) { ++ this.sendRawMessage(net.kyori.adventure.text.serializer.plain.PlainComponentSerializer.plain().serialize(message)); ++ } ++ // Paper end + } +diff --git a/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java b/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java +index 34ceee4a81ef4ed05eb9007ca17c223f75f4ff50..11acf5f725a7f2e350a05268a00906ba843c623b 100644 +--- a/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java ++++ b/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java +@@ -187,6 +187,12 @@ public class CraftEnchantment extends Enchantment { + CraftEnchantment ench = (CraftEnchantment) other; + return !target.isCompatible(ench.target); + } ++ // Paper start ++ @Override ++ public net.kyori.adventure.text.Component displayName(int level) { ++ return io.papermc.paper.adventure.PaperAdventure.asAdventure(getHandle().getTranslationComponentForLevel(level)); ++ } ++ // Paper end + + public net.minecraft.server.Enchantment getHandle() { + return target; +diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +index db7c4011c8b90b6daca2b48a6d9ec447d31f7197..969bf1095bb2a90ad0f1cb1f1e023e056e3855c0 100644 +--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java ++++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +@@ -145,6 +145,7 @@ import net.minecraft.server.EntityZombieVillager; + import net.minecraft.server.IChatBaseComponent; + import net.minecraft.server.NBTBase; + import net.minecraft.server.NBTTagCompound; ++import net.minecraft.server.TileEntityEnchantTable; + import org.bukkit.Chunk; // Paper + import org.bukkit.EntityEffect; + import org.bukkit.Location; +@@ -768,6 +769,19 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { + return getHandle().getVehicle().getBukkitEntity(); + } + ++ // Paper start ++ @Override ++ public net.kyori.adventure.text.Component customName() { ++ final IChatBaseComponent name = this.getHandle().getCustomName(); ++ return name != null ? io.papermc.paper.adventure.PaperAdventure.asAdventure(name) : null; ++ } ++ ++ @Override ++ public void customName(final net.kyori.adventure.text.Component customName) { ++ this.getHandle().setCustomName(customName != null ? io.papermc.paper.adventure.PaperAdventure.asVanilla(customName) : null); ++ } ++ // Paper end ++ + @Override + public void setCustomName(String name) { + // sane limit for name length +diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +index af41d9f11c6da2609bd75e49f15f5ec129b92361..fb3378e22864335fe6b60d77a401e01a68b3553c 100644 +--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java ++++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +@@ -317,9 +317,12 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { + container = CraftEventFactory.callInventoryOpenEvent(player, container); + if (container == null) return; + +- String title = container.getBukkitView().getTitle(); ++ //String title = container.getBukkitView().getTitle(); // Paper - comment ++ net.kyori.adventure.text.Component adventure$title = container.getBukkitView().title(); // Paper ++ if (adventure$title == null) adventure$title = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(container.getBukkitView().getTitle()); // Paper + +- player.playerConnection.sendPacket(new PacketPlayOutOpenWindow(container.windowId, windowType, CraftChatMessage.fromString(title)[0])); ++ //player.playerConnection.sendPacket(new PacketPlayOutOpenWindow(container.windowId, windowType, CraftChatMessage.fromString(title)[0])); // Paper // Paper - comment ++ player.playerConnection.sendPacket(new PacketPlayOutOpenWindow(container.windowId, windowType, io.papermc.paper.adventure.PaperAdventure.asVanilla(adventure$title))); // Paper + getHandle().activeContainer = container; + getHandle().activeContainer.addSlotListener(player); + } +@@ -388,8 +391,12 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { + + // Now open the window + Containers windowType = CraftContainer.getNotchInventoryType(inventory.getTopInventory()); +- String title = inventory.getTitle(); +- player.playerConnection.sendPacket(new PacketPlayOutOpenWindow(container.windowId, windowType, CraftChatMessage.fromString(title)[0])); ++ ++ //String title = inventory.getTitle(); // Paper - comment ++ net.kyori.adventure.text.Component adventure$title = inventory.title(); // Paper ++ if (adventure$title == null) adventure$title = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(inventory.getTitle()); // Paper ++ //player.playerConnection.sendPacket(new PacketPlayOutOpenWindow(container.windowId, windowType, CraftChatMessage.fromString(title)[0])); // Paper - comment ++ player.playerConnection.sendPacket(new PacketPlayOutOpenWindow(container.windowId, windowType, io.papermc.paper.adventure.PaperAdventure.asVanilla(adventure$title))); // Paper + player.activeContainer = container; + player.activeContainer.addSlotListener(player); + } +diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +index 4001145980f4dabbd291336d5a464c3856144996..28368aa85e25ad5ee1e35255f093fd3f5a7a15bf 100644 +--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java ++++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +@@ -84,7 +84,6 @@ import org.bukkit.Particle; + import org.bukkit.Sound; + import org.bukkit.Statistic; + import org.bukkit.WeatherType; +-import org.bukkit.World; + import org.bukkit.block.data.BlockData; + import org.bukkit.configuration.serialization.DelegateDeserialization; + import org.bukkit.conversations.Conversation; +@@ -240,14 +239,39 @@ public class CraftPlayer extends CraftHumanEntity implements Player { + + @Override + public String getDisplayName() { ++ if(true) return net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().serialize(this.getHandle().adventure$displayName); // Paper + return getHandle().displayName; + } + + @Override + public void setDisplayName(final String name) { ++ this.getHandle().adventure$displayName = name != null ? net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(name) : null; if (true) return; // Paper + getHandle().displayName = name == null ? getName() : name; + } + ++ // Paper start ++ @Override ++ public void playerListName(net.kyori.adventure.text.Component name) { ++ getHandle().listName = name == null ? null : io.papermc.paper.adventure.PaperAdventure.asVanilla(name); ++ for (EntityPlayer player : server.getHandle().players) { ++ if (player.getBukkitEntity().canSee(this)) { ++ player.playerConnection.sendPacket(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.UPDATE_DISPLAY_NAME, getHandle())); ++ } ++ } ++ } ++ @Override ++ public net.kyori.adventure.text.Component playerListName() { ++ return getHandle().listName == null ? net.kyori.adventure.text.Component.text(getName()) : io.papermc.paper.adventure.PaperAdventure.asAdventure(getHandle().listName); ++ } ++ @Override ++ public net.kyori.adventure.text.Component playerListHeader() { ++ return playerListHeader; ++ } ++ @Override ++ public net.kyori.adventure.text.Component playerListFooter() { ++ return playerListFooter; ++ } ++ // Paper end + @Override + public String getPlayerListName() { + return getHandle().listName == null ? getName() : CraftChatMessage.fromComponent(getHandle().listName); +@@ -266,35 +290,35 @@ public class CraftPlayer extends CraftHumanEntity implements Player { + } + } + +- private IChatBaseComponent playerListHeader; +- private IChatBaseComponent playerListFooter; ++ private net.kyori.adventure.text.Component playerListHeader; // Paper - Adventure ++ private net.kyori.adventure.text.Component playerListFooter; // Paper - Adventure + + @Override + public String getPlayerListHeader() { +- return (playerListHeader == null) ? null : CraftChatMessage.fromComponent(playerListHeader); ++ return (playerListHeader == null) ? null : net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().serialize(playerListHeader); // Paper - Adventure + } + + @Override + public String getPlayerListFooter() { +- return (playerListFooter == null) ? null : CraftChatMessage.fromComponent(playerListFooter); ++ return (playerListFooter == null) ? null : net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().serialize(playerListFooter); // Paper - Adventure + } + + @Override + public void setPlayerListHeader(String header) { +- this.playerListHeader = CraftChatMessage.fromStringOrNull(header, true); ++ this.playerListHeader = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(header); // Paper - Adventure + updatePlayerListHeaderFooter(); + } + + @Override + public void setPlayerListFooter(String footer) { +- this.playerListFooter = CraftChatMessage.fromStringOrNull(footer, true); ++ this.playerListFooter = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(footer); // Paper - Adventure + updatePlayerListHeaderFooter(); + } + + @Override + public void setPlayerListHeaderFooter(String header, String footer) { +- this.playerListHeader = CraftChatMessage.fromStringOrNull(header, true); +- this.playerListFooter = CraftChatMessage.fromStringOrNull(footer, true); ++ this.playerListHeader = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(header); // Paper - Adventure ++ this.playerListFooter = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(footer); // Paper - Adventure + updatePlayerListHeaderFooter(); + } + +@@ -302,8 +326,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player { + if (getHandle().playerConnection == null) return; + + PacketPlayOutPlayerListHeaderFooter packet = new PacketPlayOutPlayerListHeaderFooter(); +- packet.header = (this.playerListHeader == null) ? new ChatComponentText("") : this.playerListHeader; +- packet.footer = (this.playerListFooter == null) ? new ChatComponentText("") : this.playerListFooter; ++ packet.header = (this.playerListHeader == null) ? new ChatComponentText("") : io.papermc.paper.adventure.PaperAdventure.asVanilla(this.playerListHeader); // Paper - Adventure ++ packet.footer = (this.playerListFooter == null) ? new ChatComponentText("") : io.papermc.paper.adventure.PaperAdventure.asVanilla(this.playerListFooter); // Paper - Adventure + getHandle().playerConnection.sendPacket(packet); + } + +@@ -335,6 +359,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player { + getHandle().playerConnection.disconnect(message == null ? "" : message); + } + ++ // Paper start ++ @Override ++ public void kick(final net.kyori.adventure.text.Component message) { ++ org.spigotmc.AsyncCatcher.catchOp("player kick"); ++ final PlayerConnection connection = this.getHandle().playerConnection; ++ if (connection != null) { ++ connection.disconnect(io.papermc.paper.adventure.PaperAdventure.asVanilla( ++ message == null ? net.kyori.adventure.text.Component.empty() : message ++ )); ++ } ++ } ++ // Paper end ++ + @Override + public void setCompassTarget(Location loc) { + if (getHandle().playerConnection == null) return; +@@ -549,6 +586,37 @@ public class CraftPlayer extends CraftHumanEntity implements Player { + getHandle().playerConnection.sendPacket(packet); + } + ++ // Paper start ++ @Override ++ public void sendSignChange(Location loc, List lines) { ++ this.sendSignChange(loc, lines, org.bukkit.DyeColor.BLACK); ++ } ++ @Override ++ public void sendSignChange(Location loc, List lines, DyeColor dyeColor) { ++ if (getHandle().playerConnection == null) { ++ return; ++ } ++ if (lines == null) { ++ lines = new java.util.ArrayList<>(4); ++ } ++ Validate.notNull(loc, "Location cannot be null"); ++ Validate.notNull(dyeColor, "DyeColor cannot be null"); ++ if (lines.size() < 4) { ++ throw new IllegalArgumentException("Must have at least 4 lines"); ++ } ++ IChatBaseComponent[] components = CraftSign.sanitizeLines(lines); ++ this.sendSignChange0(components, loc, dyeColor); ++ } ++ ++ private void sendSignChange0(IChatBaseComponent[] components, Location loc, DyeColor dyeColor) { ++ TileEntitySign sign = new TileEntitySign(); ++ sign.setPosition(new BlockPosition(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ())); ++ sign.setColor(EnumColor.fromColorIndex(dyeColor.getWoolData())); ++ System.arraycopy(components, 0, sign.lines, 0, sign.lines.length); ++ ++ getHandle().playerConnection.sendPacket(sign.getUpdatePacket()); ++ } ++ // Paper end + @Override + public void sendSignChange(Location loc, String[] lines) { + sendSignChange(loc, lines, DyeColor.BLACK); +@@ -571,12 +639,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { + } + + IChatBaseComponent[] components = CraftSign.sanitizeLines(lines); +- TileEntitySign sign = new TileEntitySign(); ++ /*TileEntitySign sign = new TileEntitySign(); // Paper + sign.setPosition(new BlockPosition(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ())); + sign.setColor(EnumColor.fromColorIndex(dyeColor.getWoolData())); + System.arraycopy(components, 0, sign.lines, 0, sign.lines.length); + +- getHandle().playerConnection.sendPacket(sign.getUpdatePacket()); ++ getHandle().playerConnection.sendPacket(sign.getUpdatePacket());*/ // Paper ++ this.sendSignChange0(components, loc, dyeColor); // Paper + } + + @Override +@@ -1706,6 +1775,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player { + return (getHandle().clientViewDistance == null) ? Bukkit.getViewDistance() : getHandle().clientViewDistance; + } + ++ // Paper start ++ @Override ++ public java.util.Locale locale() { ++ return getHandle().adventure$locale; ++ } ++ // Paper end + @Override + public String getLocale() { + return getHandle().locale; +@@ -1729,6 +1804,137 @@ public class CraftPlayer extends CraftHumanEntity implements Player { + getInventory().setItemInMainHand(hand); + } + ++ // Paper start ++ @Override ++ public net.kyori.adventure.text.Component displayName() { ++ return this.getHandle().adventure$displayName; ++ } ++ ++ @Override ++ public void displayName(final net.kyori.adventure.text.Component displayName) { ++ this.getHandle().adventure$displayName = displayName; ++ } ++ ++ @Override ++ public void sendMessage(final net.kyori.adventure.identity.Identity identity, final net.kyori.adventure.text.Component message, final net.kyori.adventure.audience.MessageType type) { ++ final PacketPlayOutChat packet = new PacketPlayOutChat(null, type == net.kyori.adventure.audience.MessageType.CHAT ? net.minecraft.server.ChatMessageType.CHAT : net.minecraft.server.ChatMessageType.SYSTEM, identity.uuid()); ++ packet.adventure$message = message; ++ this.getHandle().playerConnection.sendPacket(packet); ++ } ++ ++ @Override ++ public void sendActionBar(final net.kyori.adventure.text.Component message) { ++ final PacketPlayOutTitle packet = new PacketPlayOutTitle(PacketPlayOutTitle.EnumTitleAction.ACTIONBAR, null); ++ packet.adventure$text = message; ++ this.getHandle().playerConnection.sendPacket(packet); ++ } ++ ++ @Override ++ public void sendPlayerListHeader(final net.kyori.adventure.text.Component header) { ++ this.playerListHeader = header; ++ this.adventure$sendPlayerListHeaderAndFooter(); ++ } ++ ++ @Override ++ public void sendPlayerListFooter(final net.kyori.adventure.text.Component footer) { ++ this.playerListFooter = footer; ++ this.adventure$sendPlayerListHeaderAndFooter(); ++ } ++ ++ @Override ++ public void sendPlayerListHeaderAndFooter(final net.kyori.adventure.text.Component header, final net.kyori.adventure.text.Component footer) { ++ this.playerListHeader = header; ++ this.playerListFooter = footer; ++ this.adventure$sendPlayerListHeaderAndFooter(); ++ } ++ ++ private void adventure$sendPlayerListHeaderAndFooter() { ++ final PlayerConnection connection = this.getHandle().playerConnection; ++ if (connection == null) return; ++ final PacketPlayOutPlayerListHeaderFooter packet = new PacketPlayOutPlayerListHeaderFooter(); ++ packet.adventure$header = (this.playerListHeader == null) ? net.kyori.adventure.text.Component.empty() : this.playerListHeader; ++ packet.adventure$footer = (this.playerListFooter == null) ? net.kyori.adventure.text.Component.empty() : this.playerListFooter; ++ connection.sendPacket(packet); ++ } ++ ++ @Override ++ public void showTitle(final net.kyori.adventure.title.Title title) { ++ final PlayerConnection connection = this.getHandle().playerConnection; ++ final net.kyori.adventure.title.Title.Times times = title.times(); ++ if (times != null) { ++ connection.sendPacket(new PacketPlayOutTitle(ticks(times.fadeIn()), ticks(times.fadeOut()), ticks(times.stay()))); ++ } ++ final PacketPlayOutTitle sp = new PacketPlayOutTitle(PacketPlayOutTitle.EnumTitleAction.SUBTITLE, null); ++ sp.adventure$text = title.subtitle(); ++ connection.sendPacket(sp); ++ final PacketPlayOutTitle tp = new PacketPlayOutTitle(PacketPlayOutTitle.EnumTitleAction.TITLE, null); ++ tp.adventure$text = title.title(); ++ connection.sendPacket(tp); ++ } ++ ++ private static int ticks(final java.time.Duration duration) { ++ if (duration == null) { ++ return -1; ++ } ++ return (int) (duration.toMillis() / 50L); ++ } ++ ++ @Override ++ public void clearTitle() { ++ this.getHandle().playerConnection.sendPacket(new PacketPlayOutTitle(PacketPlayOutTitle.EnumTitleAction.CLEAR, null)); ++ } ++ ++ // resetTitle implemented above ++ ++ @Override ++ public void showBossBar(final net.kyori.adventure.bossbar.BossBar bar) { ++ ((net.kyori.adventure.bossbar.HackyBossBarPlatformBridge) bar).paper$playerShow(this); ++ } ++ ++ @Override ++ public void hideBossBar(final net.kyori.adventure.bossbar.BossBar bar) { ++ ((net.kyori.adventure.bossbar.HackyBossBarPlatformBridge) bar).paper$playerHide(this); ++ } ++ ++ @Override ++ public void playSound(final net.kyori.adventure.sound.Sound sound) { ++ final Vec3D pos = this.getHandle().getPositionVector(); ++ this.playSound(sound, pos.x, pos.y, pos.z); ++ } ++ ++ @Override ++ public void playSound(final net.kyori.adventure.sound.Sound sound, final double x, final double y, final double z) { ++ final MinecraftKey name = io.papermc.paper.adventure.PaperAdventure.asVanilla(sound.name()); ++ final java.util.Optional event = net.minecraft.server.IRegistry.SOUND_EVENT.getOptional(name); ++ if (event.isPresent()) { ++ this.getHandle().playerConnection.sendPacket(new PacketPlayOutNamedSoundEffect(event.get(), io.papermc.paper.adventure.PaperAdventure.asVanilla(sound.source()), x, y, z, sound.volume(), sound.pitch())); ++ } else { ++ this.getHandle().playerConnection.sendPacket(new PacketPlayOutCustomSoundEffect(name, io.papermc.paper.adventure.PaperAdventure.asVanilla(sound.source()), new Vec3D(x, y, z), sound.volume(), sound.pitch())); ++ } ++ } ++ ++ @Override ++ public void stopSound(final net.kyori.adventure.sound.SoundStop stop) { ++ this.getHandle().playerConnection.sendPacket(new PacketPlayOutStopSound( ++ io.papermc.paper.adventure.PaperAdventure.asVanillaNullable(stop.sound()), ++ io.papermc.paper.adventure.PaperAdventure.asVanillaNullable(stop.source()) ++ )); ++ } ++ ++ @Override ++ public void openBook(final net.kyori.adventure.inventory.Book book) { ++ final java.util.Locale locale = this.getHandle().adventure$locale; ++ final net.minecraft.server.ItemStack item = io.papermc.paper.adventure.PaperAdventure.asItemStack(book, locale); ++ final EntityPlayer player = this.getHandle(); ++ final PlayerConnection connection = player.playerConnection; ++ final net.minecraft.server.PlayerInventory inventory = player.inventory; ++ final int slot = inventory.items.size() + inventory.itemInHandIndex; ++ connection.sendPacket(new net.minecraft.server.PacketPlayOutSetSlot(0, slot, item)); ++ connection.sendPacket(new net.minecraft.server.PacketPlayOutOpenBook(net.minecraft.server.EnumHand.MAIN_HAND)); ++ connection.sendPacket(new net.minecraft.server.PacketPlayOutSetSlot(0, slot, inventory.getItemInHand())); ++ } ++ // Paper end ++ + // Spigot start + private final Player.Spigot spigot = new Player.Spigot() + { +diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +index dde25528de07857175b00ff85612d738eb43b9ec..b82dd03855dab546cc430dc0f0f07f9067365fa7 100644 +--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java ++++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +@@ -772,7 +772,7 @@ public class CraftEventFactory { + return event; + } + +- public static PlayerDeathEvent callPlayerDeathEvent(EntityPlayer victim, List drops, String deathMessage, boolean keepInventory) { ++ public static PlayerDeathEvent callPlayerDeathEvent(EntityPlayer victim, List drops, net.kyori.adventure.text.Component deathMessage, boolean keepInventory) { // Paper - Adventure + CraftPlayer entity = victim.getBukkitEntity(); + PlayerDeathEvent event = new PlayerDeathEvent(entity, drops, victim.getExpReward(), 0, deathMessage); + event.setKeepInventory(keepInventory); +@@ -798,7 +798,7 @@ public class CraftEventFactory { + * Server methods + */ + public static ServerListPingEvent callServerListPingEvent(Server craftServer, InetAddress address, String motd, int numPlayers, int maxPlayers) { +- ServerListPingEvent event = new ServerListPingEvent(address, motd, numPlayers, maxPlayers); ++ ServerListPingEvent event = new ServerListPingEvent(address, craftServer.motd(), numPlayers, maxPlayers); // Paper - Adventure + craftServer.getPluginManager().callEvent(event); + return event; + } +diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java +index 8c714c7430c0a6b8fd7f4a158d9a271e1642bd7a..97c9b528f9ee8eb156a311d68d5d897fb1d837b7 100644 +--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java ++++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java +@@ -39,6 +39,7 @@ public class CraftContainer extends Container { + + private final InventoryView view; + private InventoryType cachedType; ++ private net.kyori.adventure.text.Component adventure$title; // Paper + private String cachedTitle; + private Container delegate; + private final int cachedSize; +@@ -50,7 +51,9 @@ public class CraftContainer extends Container { + IInventory top = ((CraftInventory) view.getTopInventory()).getInventory(); + PlayerInventory bottom = (PlayerInventory) ((CraftInventory) view.getBottomInventory()).getInventory(); + cachedType = view.getType(); +- cachedTitle = view.getTitle(); ++ this.adventure$title = view.title(); // Paper ++ if (this.adventure$title == null) this.adventure$title = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(view.getTitle()); // Paper ++ //cachedTitle = view.getTitle(); // Paper - comment + cachedSize = getSize(); + setupSlots(top, bottom, player); + } +@@ -77,6 +80,13 @@ public class CraftContainer extends Container { + return inventory.getType(); + } + ++ // Paper start ++ @Override ++ public net.kyori.adventure.text.Component title() { ++ return inventory instanceof CraftInventoryCustom ? ((CraftInventoryCustom.MinecraftInventory) ((CraftInventory) inventory).getInventory()).title() : net.kyori.adventure.text.Component.text(inventory.getType().getDefaultTitle()); ++ } ++ // Paper end ++ + @Override + public String getTitle() { + return inventory instanceof CraftInventoryCustom ? ((CraftInventoryCustom.MinecraftInventory) ((CraftInventory) inventory).getInventory()).getTitle() : inventory.getType().getDefaultTitle(); +@@ -95,7 +105,8 @@ public class CraftContainer extends Container { + + @Override + public boolean c(EntityHuman entityhuman) { +- if (cachedType == view.getType() && cachedSize == getSize() && cachedTitle.equals(view.getTitle())) { ++ if (cachedType == view.getType() && cachedSize == getSize() && this.adventure$title.equals(view.title())) { // Paper ++ //if (cachedType == view.getType() && cachedSize == getSize() && cachedTitle.equals(view.getTitle())) { // Paper - comment + return true; + } + // If the window type has changed for some reason, update the player +@@ -103,7 +114,9 @@ public class CraftContainer extends Container { + // as good a place as any to put something like this. + boolean typeChanged = (cachedType != view.getType()); + cachedType = view.getType(); +- cachedTitle = view.getTitle(); ++ this.adventure$title = view.title(); // Paper ++ if (this.adventure$title == null) this.adventure$title = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(view.getTitle()); // Paper ++ //cachedTitle = view.getTitle(); // Paper - comment + if (view.getPlayer() instanceof CraftPlayer) { + CraftPlayer player = (CraftPlayer) view.getPlayer(); + Containers type = getNotchInventoryType(view.getTopInventory()); +@@ -115,7 +128,8 @@ public class CraftContainer extends Container { + setupSlots(top, bottom, player.getHandle()); + } + int size = getSize(); +- player.getHandle().playerConnection.sendPacket(new PacketPlayOutOpenWindow(this.windowId, type, new ChatComponentText(cachedTitle))); ++ player.getHandle().playerConnection.sendPacket(new PacketPlayOutOpenWindow(this.windowId, type, io.papermc.paper.adventure.PaperAdventure.asVanilla(this.adventure$title))); // Paper ++ //player.getHandle().playerConnection.sendPacket(new PacketPlayOutOpenWindow(this.windowId, type, new ChatComponentText(cachedTitle))); // Paper - comment + player.updateInventory(); + } + return true; +diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCustom.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCustom.java +index e1dfdb23f7d755b19cf14c0bf15358095406e9a0..ec8abc4b381cf6f323f92cc6d364088b55a0eaff 100644 +--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCustom.java ++++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCustom.java +@@ -19,6 +19,12 @@ public class CraftInventoryCustom extends CraftInventory { + super(new MinecraftInventory(owner, type)); + } + ++ // Paper start ++ public CraftInventoryCustom(InventoryHolder owner, InventoryType type, net.kyori.adventure.text.Component title) { ++ super(new MinecraftInventory(owner, type, title)); ++ } ++ // Paper end ++ + public CraftInventoryCustom(InventoryHolder owner, InventoryType type, String title) { + super(new MinecraftInventory(owner, type, title)); + } +@@ -27,6 +33,12 @@ public class CraftInventoryCustom extends CraftInventory { + super(new MinecraftInventory(owner, size)); + } + ++ // Paper start ++ public CraftInventoryCustom(InventoryHolder owner, int size, net.kyori.adventure.text.Component title) { ++ super(new MinecraftInventory(owner, size, title)); ++ } ++ // Paper end ++ + public CraftInventoryCustom(InventoryHolder owner, int size, String title) { + super(new MinecraftInventory(owner, size, title)); + } +@@ -35,10 +47,18 @@ public class CraftInventoryCustom extends CraftInventory { + private final NonNullList items; + private int maxStack = MAX_STACK; + private final List viewers; +- private final String title; ++ private final net.kyori.adventure.text.Component adventure$title; // Paper ++ private String title; // Paper - remove final + private InventoryType type; + private final InventoryHolder owner; + ++ // Paper start ++ public MinecraftInventory(InventoryHolder owner, InventoryType type, net.kyori.adventure.text.Component title) { ++ this(owner, type.getDefaultSize(), title); ++ this.type = type; ++ } ++ // Paper end ++ + public MinecraftInventory(InventoryHolder owner, InventoryType type) { + this(owner, type.getDefaultSize(), type.getDefaultTitle()); + this.type = type; +@@ -53,10 +73,16 @@ public class CraftInventoryCustom extends CraftInventory { + this(owner, size, "Chest"); + } + ++ // Paper start + public MinecraftInventory(InventoryHolder owner, int size, String title) { ++ this(owner, size, net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(title)); ++ } ++ // Paper end ++ ++ public MinecraftInventory(InventoryHolder owner, int size, net.kyori.adventure.text.Component title) { // Paper - String -> net.kyori.adventure.text.Component + Validate.notNull(title, "Title cannot be null"); + this.items = NonNullList.a(size, ItemStack.b); +- this.title = title; ++ this.adventure$title = title; + this.viewers = new ArrayList(); + this.owner = owner; + this.type = InventoryType.CHEST; +@@ -183,7 +209,18 @@ public class CraftInventoryCustom extends CraftInventory { + return null; + } + ++ // Paper start ++ public net.kyori.adventure.text.Component title() { ++ return this.adventure$title; ++ } ++ // Paper end ++ + public String getTitle() { ++ // Paper start ++ if (this.title == null) { ++ this.title = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().serialize(this.adventure$title); ++ } ++ // Paper end + return title; + } + +diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryView.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryView.java +index 4c6492a92821916fa98d6409a8ebf17f255535ad..80759d640d5af1620712aadbfb5f1ab7bc379f4b 100644 +--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryView.java ++++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryView.java +@@ -64,6 +64,13 @@ public class CraftInventoryView extends InventoryView { + return CraftItemStack.asCraftMirror(container.getSlot(slot).getItem()); + } + ++ // Paper start ++ @Override ++ public net.kyori.adventure.text.Component title() { ++ return io.papermc.paper.adventure.PaperAdventure.asAdventure(this.container.getTitle()); ++ } ++ // Paper end ++ + @Override + public String getTitle() { + return CraftChatMessage.fromComponent(container.getTitle()); +diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java +index 89a3617068421bb86baf4e8bfd9df2d0626adff7..a50eb746b8774a089c39652d534920acf708b137 100644 +--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java ++++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java +@@ -334,4 +334,12 @@ public final class CraftItemFactory implements ItemFactory { + public Material updateMaterial(ItemMeta meta, Material material) throws IllegalArgumentException { + return ((CraftMetaItem) meta).updateMaterial(material); + } ++ ++ // Paper start ++ @Override ++ public net.kyori.adventure.text.event.HoverEvent asHoverEvent(final ItemStack item, final java.util.function.UnaryOperator op) { ++ final net.minecraft.server.NBTTagCompound tag = CraftItemStack.asNMSCopy(item).getTag(); ++ return net.kyori.adventure.text.event.HoverEvent.showItem(op.apply(net.kyori.adventure.text.event.HoverEvent.ShowItem.of(item.getType().getKey(), item.getAmount(), io.papermc.paper.adventure.PaperAdventure.asBinaryTagHolder(tag)))); ++ } ++ // Paper end + } +diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantCustom.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantCustom.java +index 9f6e797d34e5ad21a496c89f5a45ddb0638d3adc..115ee3785b4e0ba6a235bbb31b643aa596705401 100644 +--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantCustom.java ++++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantCustom.java +@@ -14,10 +14,17 @@ import org.apache.commons.lang.Validate; + + public class CraftMerchantCustom extends CraftMerchant { + ++ @Deprecated // Paper - Adventure + public CraftMerchantCustom(String title) { + super(new MinecraftMerchant(title)); + getMerchant().craftMerchant = this; + } ++ // Paper start ++ public CraftMerchantCustom(net.kyori.adventure.text.Component title) { ++ super(new MinecraftMerchant(title)); ++ getMerchant().craftMerchant = this; ++ } ++ // Paper end + + @Override + public String toString() { +@@ -37,10 +44,17 @@ public class CraftMerchantCustom extends CraftMerchant { + private World tradingWorld; + protected CraftMerchant craftMerchant; + ++ @Deprecated // Paper - Adventure + public MinecraftMerchant(String title) { + Validate.notNull(title, "Title cannot be null"); + this.title = new ChatComponentText(title); + } ++ // Paper start ++ public MinecraftMerchant(net.kyori.adventure.text.Component title) { ++ Validate.notNull(title, "Title cannot be null"); ++ this.title = io.papermc.paper.adventure.PaperAdventure.asVanilla(title); ++ } ++ // Paper end + + @Override + public CraftMerchant getCraftMerchant() { +diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java +index 18faf5ea801984696ba45b9784aa0afdf6971e39..fb4d39a4cf101749f74da9c48bb3a27b0188fbeb 100644 +--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java ++++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java +@@ -2,12 +2,15 @@ package org.bukkit.craftbukkit.inventory; + + import com.google.common.collect.ImmutableList; + import com.google.common.collect.Lists; +-import com.google.common.collect.ImmutableMap.Builder; ++ ++import com.google.common.collect.ImmutableMap; // Paper + import java.util.ArrayList; + import java.util.Arrays; + import java.util.List; + import java.util.Map; + import java.util.Objects; ++import net.kyori.adventure.text.serializer.gson.GsonComponentSerializer; ++import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer; + import net.minecraft.server.IChatBaseComponent; + import net.minecraft.server.NBTTagCompound; + import net.minecraft.server.NBTTagList; +@@ -267,6 +270,135 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta { + this.generation = (generation == null) ? null : generation.ordinal(); + } + ++ // Paper start ++ @Override ++ public net.kyori.adventure.text.Component title() { ++ return this.title == null ? null : net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(this.title); ++ } ++ ++ @Override ++ public org.bukkit.inventory.meta.BookMeta title(net.kyori.adventure.text.Component title) { ++ this.setTitle(title == null ? null : net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().serialize(title)); ++ return this; ++ } ++ ++ @Override ++ public net.kyori.adventure.text.Component author() { ++ return this.author == null ? null : net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(this.author); ++ } ++ ++ @Override ++ public org.bukkit.inventory.meta.BookMeta author(net.kyori.adventure.text.Component author) { ++ this.setAuthor(author == null ? null : net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().serialize(author)); ++ return this; ++ } ++ ++ @Override ++ public net.kyori.adventure.text.Component page(final int page) { ++ Validate.isTrue(isValidPage(page), "Invalid page number"); ++ return this instanceof CraftMetaBookSigned ? GsonComponentSerializer.gson().deserialize(pages.get(page - 1)) : LegacyComponentSerializer.legacySection().deserialize(pages.get(page - 1)); ++ } ++ ++ @Override ++ public void page(final int page, net.kyori.adventure.text.Component data) { ++ if (!isValidPage(page)) { ++ throw new IllegalArgumentException("Invalid page number " + page + "/" + pages.size()); ++ } ++ if (data == null) { ++ data = net.kyori.adventure.text.Component.empty(); ++ } ++ pages.set(page - 1, this instanceof CraftMetaBookSigned ? GsonComponentSerializer.gson().serialize(data) : LegacyComponentSerializer.legacySection().serialize(data)); ++ } ++ ++ @Override ++ public List pages() { ++ if (this.pages == null) return ImmutableList.of(); ++ if (this instanceof CraftMetaBookSigned) ++ return pages.stream().map(GsonComponentSerializer.gson()::deserialize).collect(ImmutableList.toImmutableList()); ++ else ++ return pages.stream().map(LegacyComponentSerializer.legacySection()::deserialize).collect(ImmutableList.toImmutableList()); ++ } ++ ++ @Override ++ public BookMeta pages(List pages) { ++ if (this.pages != null) this.pages.clear(); ++ for (net.kyori.adventure.text.Component page : pages) { ++ addPages(page); ++ } ++ return this; ++ } ++ ++ @Override ++ public BookMeta pages(net.kyori.adventure.text.Component... pages) { ++ if (this.pages != null) this.pages.clear(); ++ addPages(pages); ++ return this; ++ } ++ ++ @Override ++ public void addPages(net.kyori.adventure.text.Component... pages) { ++ if (this.pages == null) this.pages = new ArrayList<>(); ++ for (net.kyori.adventure.text.Component page : pages) { ++ if (this.pages.size() >= MAX_PAGES) { ++ return; ++ } ++ ++ if (page == null) { ++ page = net.kyori.adventure.text.Component.empty(); ++ } ++ ++ this.pages.add(this instanceof CraftMetaBookSigned ? GsonComponentSerializer.gson().serialize(page) : LegacyComponentSerializer.legacySection().serialize(page)); ++ } ++ } ++ ++ private CraftMetaBook(net.kyori.adventure.text.Component title, net.kyori.adventure.text.Component author, List pages) { ++ super((org.bukkit.craftbukkit.inventory.CraftMetaItem) org.bukkit.Bukkit.getItemFactory().getItemMeta(org.bukkit.Material.WRITABLE_BOOK)); ++ this.title = title == null ? null : net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().serialize(title); ++ this.author = author == null ? null : net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().serialize(author); ++ this.pages = pages.subList(0, Math.min(MAX_PAGES, pages.size())).stream().map(LegacyComponentSerializer.legacySection()::serialize).collect(java.util.stream.Collectors.toList()); ++ } ++ ++ static final class CraftMetaBookBuilder implements BookMetaBuilder { ++ private net.kyori.adventure.text.Component title = null; ++ private net.kyori.adventure.text.Component author = null; ++ private final List pages = new java.util.ArrayList<>(); ++ ++ @Override ++ public BookMetaBuilder title(net.kyori.adventure.text.Component title) { ++ this.title = title; ++ return this; ++ } ++ ++ @Override ++ public BookMetaBuilder author(net.kyori.adventure.text.Component author) { ++ this.author = author; ++ return this; ++ } ++ ++ @Override ++ public BookMetaBuilder addPage(net.kyori.adventure.text.Component page) { ++ this.pages.add(page); ++ return this; ++ } ++ ++ @Override ++ public BookMetaBuilder pages(net.kyori.adventure.text.Component... pages) { ++ java.util.Collections.addAll(this.pages, pages); ++ return this; ++ } ++ ++ @Override ++ public BookMetaBuilder pages(java.util.Collection pages) { ++ this.pages.addAll(pages); ++ return this; ++ } ++ ++ @Override ++ public BookMeta build() { ++ return new CraftMetaBook(title, author, pages); ++ } ++ } ++ // Paper end + @Override + public String getPage(final int page) { + Validate.isTrue(isValidPage(page), "Invalid page number"); +@@ -411,7 +543,7 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta { + } + + @Override +- Builder serialize(Builder builder) { ++ ImmutableMap.Builder serialize(ImmutableMap.Builder builder) { + super.serialize(builder); + + if (hasTitle()) { +diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBookSigned.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBookSigned.java +index 0bd396ebee14bd4014744983b273dad832211178..06eec130166f7fef7674ea402123f2edf9f4e455 100644 +--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBookSigned.java ++++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBookSigned.java +@@ -1,6 +1,6 @@ + package org.bukkit.craftbukkit.inventory; + +-import com.google.common.collect.ImmutableMap.Builder; ++import com.google.common.collect.ImmutableMap; // Paper + import java.util.Map; + import net.minecraft.server.NBTTagCompound; + import org.bukkit.Material; +@@ -84,7 +84,7 @@ class CraftMetaBookSigned extends CraftMetaBook implements BookMeta { + } + + @Override +- Builder serialize(Builder builder) { ++ ImmutableMap.Builder serialize(ImmutableMap.Builder builder) { + super.serialize(builder); + return builder; + } +diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +index 60e04343b4b10b1de0bbd033b148a9da41b66aad..ac6be3da812c927a5486809c096b5a2e1aba617b 100644 +--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java ++++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +@@ -745,6 +745,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { + return !(hasDisplayName() || hasLocalizedName() || hasEnchants() || (lore != null) || hasCustomModelData() || hasBlockData() || hasRepairCost() || !unhandledTags.isEmpty() || !persistentDataContainer.isEmpty() || hideFlag != 0 || isUnbreakable() || hasDamage() || hasAttributeModifiers()); + } + ++ // Paper start ++ @Override ++ public net.kyori.adventure.text.Component displayName() { ++ return displayName == null ? null : net.kyori.adventure.text.serializer.gson.GsonComponentSerializer.gson().deserialize(displayName); ++ } ++ ++ @Override ++ public void displayName(final net.kyori.adventure.text.Component displayName) { ++ this.displayName = displayName == null ? null : net.kyori.adventure.text.serializer.gson.GsonComponentSerializer.gson().serialize(displayName); ++ } ++ // Paper end ++ + @Override + public String getDisplayName() { + return CraftChatMessage.fromJSONComponent(displayName); +@@ -780,6 +792,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { + return this.lore != null && !this.lore.isEmpty(); + } + ++ // Paper start ++ @Override ++ public List lore() { ++ return this.lore != null ? io.papermc.paper.adventure.PaperAdventure.asAdventureFromJson(this.lore) : null; ++ } ++ ++ @Override ++ public void lore(final List lore) { ++ this.lore = lore != null ? io.papermc.paper.adventure.PaperAdventure.asJson(lore) : null; ++ } ++ // Paper end ++ + @Override + public boolean hasRepairCost() { + return repairCost > 0; +diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftCustomInventoryConverter.java b/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftCustomInventoryConverter.java +index ed4415f6dd588c08c922efd5beebb3b124beb9d6..78a7ac47f20e84ccd67ff44d0bc7a2f2faa0d476 100644 +--- a/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftCustomInventoryConverter.java ++++ b/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftCustomInventoryConverter.java +@@ -12,6 +12,13 @@ public class CraftCustomInventoryConverter implements CraftInventoryCreator.Inve + return new CraftInventoryCustom(holder, type); + } + ++ // Paper start ++ @Override ++ public Inventory createInventory(InventoryHolder owner, InventoryType type, net.kyori.adventure.text.Component title) { ++ return new CraftInventoryCustom(owner, type, title); ++ } ++ // Paper end ++ + @Override + public Inventory createInventory(InventoryHolder owner, InventoryType type, String title) { + return new CraftInventoryCustom(owner, type, title); +@@ -21,6 +28,12 @@ public class CraftCustomInventoryConverter implements CraftInventoryCreator.Inve + return new CraftInventoryCustom(owner, size); + } + ++ // Paper start ++ public Inventory createInventory(InventoryHolder owner, int size, net.kyori.adventure.text.Component title) { ++ return new CraftInventoryCustom(owner, size, title); ++ } ++ // Paper end ++ + public Inventory createInventory(InventoryHolder owner, int size, String title) { + return new CraftInventoryCustom(owner, size, title); + } +diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftInventoryCreator.java b/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftInventoryCreator.java +index b51321c8dd70a90ab149f456c7ffb4587c4fbd34..94d807c5d09f165c6eedd0a1c4026c2b833806a0 100644 +--- a/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftInventoryCreator.java ++++ b/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftInventoryCreator.java +@@ -43,6 +43,17 @@ public final class CraftInventoryCreator { + return converterMap.get(type).createInventory(holder, type); + } + ++ // Paper start ++ public Inventory createInventory(InventoryHolder holder, InventoryType type, net.kyori.adventure.text.Component title) { ++ // Paper start ++ if (holder != null) { ++ return DEFAULT_CONVERTER.createInventory(holder, type, title); ++ } ++ //noinspection ConstantConditions // Paper end ++ return converterMap.get(type).createInventory(holder, type, title); ++ } ++ // Paper end ++ + public Inventory createInventory(InventoryHolder holder, InventoryType type, String title) { + return converterMap.get(type).createInventory(holder, type, title); + } +@@ -51,6 +62,12 @@ public final class CraftInventoryCreator { + return DEFAULT_CONVERTER.createInventory(holder, size); + } + ++ // Paper start ++ public Inventory createInventory(InventoryHolder holder, int size, net.kyori.adventure.text.Component title) { ++ return DEFAULT_CONVERTER.createInventory(holder, size, title); ++ } ++ // Paper end ++ + public Inventory createInventory(InventoryHolder holder, int size, String title) { + return DEFAULT_CONVERTER.createInventory(holder, size, title); + } +@@ -59,6 +76,10 @@ public final class CraftInventoryCreator { + + Inventory createInventory(InventoryHolder holder, InventoryType type); + ++ // Paper start ++ Inventory createInventory(InventoryHolder holder, InventoryType type, net.kyori.adventure.text.Component title); ++ // Paper end ++ + Inventory createInventory(InventoryHolder holder, InventoryType type, String title); + } + } +diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftTileInventoryConverter.java b/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftTileInventoryConverter.java +index ad91eabb47511268d0cf307d941070800ce9bd3f..b99ce1217461595f5ccc8c7565ec3b65d1df83d9 100644 +--- a/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftTileInventoryConverter.java ++++ b/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftTileInventoryConverter.java +@@ -31,6 +31,18 @@ public abstract class CraftTileInventoryConverter implements CraftInventoryCreat + return getInventory(getTileEntity()); + } + ++ // Paper start ++ @Override ++ public Inventory createInventory(InventoryHolder owner, InventoryType type, net.kyori.adventure.text.Component title) { ++ IInventory te = getTileEntity(); ++ if (te instanceof TileEntityLootable) { ++ ((TileEntityLootable) te).setCustomName(io.papermc.paper.adventure.PaperAdventure.asVanilla(title)); ++ } ++ ++ return getInventory(te); ++ } ++ // Paper end ++ + @Override + public Inventory createInventory(InventoryHolder holder, InventoryType type, String title) { + IInventory te = getTileEntity(); +@@ -54,6 +66,15 @@ public abstract class CraftTileInventoryConverter implements CraftInventoryCreat + return furnace; + } + ++ // Paper start ++ @Override ++ public Inventory createInventory(InventoryHolder owner, InventoryType type, net.kyori.adventure.text.Component title) { ++ IInventory tileEntity = getTileEntity(); ++ ((TileEntityFurnace) tileEntity).setCustomName(io.papermc.paper.adventure.PaperAdventure.asVanilla(title)); ++ return getInventory(tileEntity); ++ } ++ // Paper end ++ + @Override + public Inventory createInventory(InventoryHolder owner, InventoryType type, String title) { + IInventory tileEntity = getTileEntity(); +@@ -74,6 +95,18 @@ public abstract class CraftTileInventoryConverter implements CraftInventoryCreat + return new TileEntityBrewingStand(); + } + ++ // Paper start ++ @Override ++ public Inventory createInventory(InventoryHolder owner, InventoryType type, net.kyori.adventure.text.Component title) { ++ // BrewingStand does not extend TileEntityLootable ++ IInventory tileEntity = getTileEntity(); ++ if (tileEntity instanceof TileEntityBrewingStand) { ++ ((TileEntityBrewingStand) tileEntity).setCustomName(io.papermc.paper.adventure.PaperAdventure.asVanilla(title)); ++ } ++ return getInventory(tileEntity); ++ } ++ // Paper end ++ + @Override + public Inventory createInventory(InventoryHolder holder, InventoryType type, String title) { + // BrewingStand does not extend TileEntityLootable +diff --git a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftObjective.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftObjective.java +index 5eaea24d253d92078709af2a7d7fd0beda3e5520..37faafaf7136e02aa1c76d841b8f47c0f6b9a36c 100644 +--- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftObjective.java ++++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftObjective.java +@@ -31,6 +31,21 @@ final class CraftObjective extends CraftScoreboardComponent implements Objective + return objective.getName(); + } + ++ // Paper start ++ @Override ++ public net.kyori.adventure.text.Component displayName() throws IllegalStateException { ++ CraftScoreboard scoreboard = checkState(); ++ return io.papermc.paper.adventure.PaperAdventure.asAdventure(objective.getDisplayName()); ++ } ++ @Override ++ public void displayName(net.kyori.adventure.text.Component displayName) throws IllegalStateException, IllegalArgumentException { ++ if (displayName == null) { ++ displayName = net.kyori.adventure.text.Component.empty(); ++ } ++ CraftScoreboard scoreboard = checkState(); ++ objective.setDisplayName(io.papermc.paper.adventure.PaperAdventure.asVanilla(displayName)); ++ } ++ // Paper end + @Override + public String getDisplayName() throws IllegalStateException { + CraftScoreboard scoreboard = checkState(); +diff --git a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboard.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboard.java +index e3036fe23fa2be100044332c432d1ad5b4872823..d05959c7884d7ba19ff1a507c7d07c52bec038f6 100644 +--- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboard.java ++++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboard.java +@@ -28,6 +28,27 @@ public final class CraftScoreboard implements org.bukkit.scoreboard.Scoreboard { + public CraftObjective registerNewObjective(String name, String criteria) throws IllegalArgumentException { + return registerNewObjective(name, criteria, name); + } ++ // Paper start ++ @Override ++ public CraftObjective registerNewObjective(String name, String criteria, net.kyori.adventure.text.Component displayName) { ++ return registerNewObjective(name, criteria, displayName, org.bukkit.scoreboard.RenderType.INTEGER); ++ } ++ @Override ++ public CraftObjective registerNewObjective(String name, String criteria, net.kyori.adventure.text.Component displayName, RenderType renderType) { ++ if (displayName == null) { ++ displayName = net.kyori.adventure.text.Component.empty(); ++ } ++ Validate.notNull(name, "Objective name cannot be null"); ++ Validate.notNull(criteria, "Criteria cannot be null"); ++ Validate.notNull(displayName, "Display name cannot be null"); ++ Validate.notNull(renderType, "RenderType cannot be null"); ++ Validate.isTrue(name.length() <= 16, "The name '" + name + "' is longer than the limit of 16 characters"); ++ Validate.isTrue(board.getObjective(name) == null, "An objective of name '" + name + "' already exists"); ++ CraftCriteria craftCriteria = CraftCriteria.getFromBukkit(criteria); ++ ScoreboardObjective objective = board.registerObjective(name, craftCriteria.criteria, io.papermc.paper.adventure.PaperAdventure.asVanilla(displayName), CraftScoreboardTranslations.fromBukkitRender(renderType)); ++ return new CraftObjective(this, objective); ++ } ++ // Paper end + + @Override + public CraftObjective registerNewObjective(String name, String criteria, String displayName) throws IllegalArgumentException { +@@ -36,7 +57,7 @@ public final class CraftScoreboard implements org.bukkit.scoreboard.Scoreboard { + + @Override + public CraftObjective registerNewObjective(String name, String criteria, String displayName, RenderType renderType) throws IllegalArgumentException { +- Validate.notNull(name, "Objective name cannot be null"); ++ /*Validate.notNull(name, "Objective name cannot be null"); // Paper + Validate.notNull(criteria, "Criteria cannot be null"); + Validate.notNull(displayName, "Display name cannot be null"); + Validate.notNull(renderType, "RenderType cannot be null"); +@@ -46,7 +67,8 @@ public final class CraftScoreboard implements org.bukkit.scoreboard.Scoreboard { + + CraftCriteria craftCriteria = CraftCriteria.getFromBukkit(criteria); + ScoreboardObjective objective = board.registerObjective(name, craftCriteria.criteria, CraftChatMessage.fromStringOrNull(displayName), CraftScoreboardTranslations.fromBukkitRender(renderType)); +- return new CraftObjective(this, objective); ++ return new CraftObjective(this, objective);*/ // Paper ++ return registerNewObjective(name, criteria, net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(displayName)); // Paper + } + + @Override +diff --git a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java +index 0fba3d2a8d3bd7ec615d137e4625a7f357729d8d..b900aaf66f25e41956e7a4370b887fd4ed530570 100644 +--- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java ++++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java +@@ -27,6 +27,55 @@ final class CraftTeam extends CraftScoreboardComponent implements Team { + + return team.getName(); + } ++ // Paper start ++ @Override ++ public net.kyori.adventure.text.Component displayName() throws IllegalStateException { ++ CraftScoreboard scoreboard = checkState(); ++ return io.papermc.paper.adventure.PaperAdventure.asAdventure(team.getDisplayName()); ++ } ++ @Override ++ public void displayName(net.kyori.adventure.text.Component displayName) throws IllegalStateException, IllegalArgumentException { ++ if (displayName == null) displayName = net.kyori.adventure.text.Component.empty(); ++ CraftScoreboard scoreboard = checkState(); ++ team.setDisplayName(io.papermc.paper.adventure.PaperAdventure.asVanilla(displayName)); ++ } ++ @Override ++ public net.kyori.adventure.text.Component prefix() throws IllegalStateException { ++ CraftScoreboard scoreboard = checkState(); ++ return io.papermc.paper.adventure.PaperAdventure.asAdventure(team.getPrefix()); ++ } ++ @Override ++ public void prefix(net.kyori.adventure.text.Component prefix) throws IllegalStateException, IllegalArgumentException { ++ if (prefix == null) prefix = net.kyori.adventure.text.Component.empty(); ++ CraftScoreboard scoreboard = checkState(); ++ team.setPrefix(io.papermc.paper.adventure.PaperAdventure.asVanilla(prefix)); ++ } ++ @Override ++ public net.kyori.adventure.text.Component suffix() throws IllegalStateException { ++ CraftScoreboard scoreboard = checkState(); ++ return io.papermc.paper.adventure.PaperAdventure.asAdventure(team.getSuffix()); ++ } ++ @Override ++ public void suffix(net.kyori.adventure.text.Component suffix) throws IllegalStateException, IllegalArgumentException { ++ if (suffix == null) suffix = net.kyori.adventure.text.Component.empty(); ++ CraftScoreboard scoreboard = checkState(); ++ team.setSuffix(io.papermc.paper.adventure.PaperAdventure.asVanilla(suffix)); ++ } ++ @Override ++ public net.kyori.adventure.text.format.TextColor color() throws IllegalStateException { ++ CraftScoreboard scoreboard = checkState(); ++ if (team.getColor().getHexValue() == null) throw new IllegalStateException("Team colors must have hex values"); ++ net.kyori.adventure.text.format.TextColor color = net.kyori.adventure.text.format.TextColor.color(team.getColor().getHexValue()); ++ if (!(color instanceof net.kyori.adventure.text.format.NamedTextColor)) throw new IllegalStateException("Team doesn't have a NamedTextColor"); ++ return (net.kyori.adventure.text.format.NamedTextColor) color; ++ } ++ @Override ++ public void color(net.kyori.adventure.text.format.NamedTextColor color) { ++ if (color == null) color = net.kyori.adventure.text.format.NamedTextColor.WHITE; ++ CraftScoreboard scoreboard = checkState(); ++ team.setColor(io.papermc.paper.adventure.PaperAdventure.asVanilla(color)); ++ } ++ // Paper end + + @Override + public String getDisplayName() throws IllegalStateException { diff --git a/Spigot-Server-Patches/0010-Configurable-cactus-bamboo-and-reed-growth-heights.patch b/Spigot-Server-Patches/0011-Configurable-cactus-bamboo-and-reed-growth-heights.patch similarity index 100% rename from Spigot-Server-Patches/0010-Configurable-cactus-bamboo-and-reed-growth-heights.patch rename to Spigot-Server-Patches/0011-Configurable-cactus-bamboo-and-reed-growth-heights.patch diff --git a/Spigot-Server-Patches/0011-Configurable-baby-zombie-movement-speed.patch b/Spigot-Server-Patches/0012-Configurable-baby-zombie-movement-speed.patch similarity index 97% rename from Spigot-Server-Patches/0011-Configurable-baby-zombie-movement-speed.patch rename to Spigot-Server-Patches/0012-Configurable-baby-zombie-movement-speed.patch index 6cee456e8d..dfc9d64a5e 100644 --- a/Spigot-Server-Patches/0011-Configurable-baby-zombie-movement-speed.patch +++ b/Spigot-Server-Patches/0012-Configurable-baby-zombie-movement-speed.patch @@ -25,7 +25,7 @@ index 3618cc017feb60e257a28f67cbddca3f792a9833..796c17e0941922a9716212c6eae91643 + } } diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java -index f4c74db7c15fc8112b759516b7ab2c7bca6186b7..422632c9050d0bcc5398ac5d4cf51801cea9cdda 100644 +index a3f608e3a06abfa4268278b6f1298ece36264a02..d07847876e22971b4a90f67d8281bf08361424e0 100644 --- a/src/main/java/net/minecraft/server/EntityZombie.java +++ b/src/main/java/net/minecraft/server/EntityZombie.java @@ -21,7 +21,7 @@ import org.bukkit.event.entity.EntityTransformEvent; diff --git a/Spigot-Server-Patches/0012-Configurable-fishing-time-ranges.patch b/Spigot-Server-Patches/0013-Configurable-fishing-time-ranges.patch similarity index 100% rename from Spigot-Server-Patches/0012-Configurable-fishing-time-ranges.patch rename to Spigot-Server-Patches/0013-Configurable-fishing-time-ranges.patch diff --git a/Spigot-Server-Patches/0013-Allow-nerfed-mobs-to-jump-and-take-water-damage.patch b/Spigot-Server-Patches/0014-Allow-nerfed-mobs-to-jump-and-take-water-damage.patch similarity index 98% rename from Spigot-Server-Patches/0013-Allow-nerfed-mobs-to-jump-and-take-water-damage.patch rename to Spigot-Server-Patches/0014-Allow-nerfed-mobs-to-jump-and-take-water-damage.patch index 372b5493f5..ce8b05c302 100644 --- a/Spigot-Server-Patches/0013-Allow-nerfed-mobs-to-jump-and-take-water-damage.patch +++ b/Spigot-Server-Patches/0014-Allow-nerfed-mobs-to-jump-and-take-water-damage.patch @@ -31,7 +31,7 @@ index 2e869004c8c6b8bfbb002fb4eda04519d50390c8..22eb89df768819f0a18f91b806b56ace this.b.setJumping(this.a); this.a = false; diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 03933c24ed4d97e16bcebf6b89b1a8d1fc43cd0b..ae96ff73f78a514328862de86d3ecdb29fa9c145 100644 +index ace7d5a36c0a44763d554d5d83cee7817f77fcc1..b6ca0c88fbfec5cc0a3d06a33f1ab7cddd52cbe3 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -1020,6 +1020,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/0014-Add-configurable-despawn-distances-for-living-entiti.patch b/Spigot-Server-Patches/0015-Add-configurable-despawn-distances-for-living-entiti.patch similarity index 100% rename from Spigot-Server-Patches/0014-Add-configurable-despawn-distances-for-living-entiti.patch rename to Spigot-Server-Patches/0015-Add-configurable-despawn-distances-for-living-entiti.patch diff --git a/Spigot-Server-Patches/0015-Allow-for-toggling-of-spawn-chunks.patch b/Spigot-Server-Patches/0016-Allow-for-toggling-of-spawn-chunks.patch similarity index 94% rename from Spigot-Server-Patches/0015-Allow-for-toggling-of-spawn-chunks.patch rename to Spigot-Server-Patches/0016-Allow-for-toggling-of-spawn-chunks.patch index 7f96715faa..33345d1fce 100644 --- a/Spigot-Server-Patches/0015-Allow-for-toggling-of-spawn-chunks.patch +++ b/Spigot-Server-Patches/0016-Allow-for-toggling-of-spawn-chunks.patch @@ -20,7 +20,7 @@ index 2f0d582baf0eb2bb477944d0cb1369db6ca33956..89e76dd73811fd0f6f8c8e7e5af804d5 + } } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 09577ddcb3c2432a0af6047b287a387de5d2920a..0f602de85bc7002150247b6cb26c6905f0e4f585 100644 +index b4aeea40ee04fd2ed10484f40d25dbd2a3a01b53..ab1285ed371f7848cddd959c33019a8ff10e1c28 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -165,6 +165,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { diff --git a/Spigot-Server-Patches/0016-Drop-falling-block-and-tnt-entities-at-the-specified.patch b/Spigot-Server-Patches/0017-Drop-falling-block-and-tnt-entities-at-the-specified.patch similarity index 97% rename from Spigot-Server-Patches/0016-Drop-falling-block-and-tnt-entities-at-the-specified.patch rename to Spigot-Server-Patches/0017-Drop-falling-block-and-tnt-entities-at-the-specified.patch index 244c75378c..07033528a5 100644 --- a/Spigot-Server-Patches/0016-Drop-falling-block-and-tnt-entities-at-the-specified.patch +++ b/Spigot-Server-Patches/0017-Drop-falling-block-and-tnt-entities-at-the-specified.patch @@ -24,7 +24,7 @@ index 89e76dd73811fd0f6f8c8e7e5af804d5a4bb5a75..d16ae924bcbe31c964f7fb448757c748 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index ae96ff73f78a514328862de86d3ecdb29fa9c145..09bab3828197e3078a4ed95e7c8a9f34e8bf1b8d 100644 +index b6ca0c88fbfec5cc0a3d06a33f1ab7cddd52cbe3..0f47b10c9c3357f7a462680e2f26d7808a5f8afc 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -1765,6 +1765,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/0017-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch b/Spigot-Server-Patches/0018-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch similarity index 98% rename from Spigot-Server-Patches/0017-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch rename to Spigot-Server-Patches/0018-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch index 6cfa97dec0..101208beb3 100644 --- a/Spigot-Server-Patches/0017-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch +++ b/Spigot-Server-Patches/0018-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch @@ -32,10 +32,10 @@ index 89d3ff83f0e152e9747c554693af4145f0a7d07e..dd104b1cd544983024ac60888940a1c0 public CrashReport b(CrashReport crashreport) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 351440f534653c9d315ccaf1e923e03ca6ba01f6..a9dc09b8d9ed97cca2a3852bd6c740ad53b0e39b 100644 +index b6f867c891c2f02a2e526a0d746d0adde250e202..73ede1a37b141007a6085adcdced82236ef656e9 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -226,7 +226,7 @@ import org.yaml.snakeyaml.error.MarkedYAMLException; +@@ -227,7 +227,7 @@ import org.yaml.snakeyaml.error.MarkedYAMLException; import net.md_5.bungee.api.chat.BaseComponent; // Spigot public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/0018-Implement-Paper-VersionChecker.patch b/Spigot-Server-Patches/0019-Implement-Paper-VersionChecker.patch similarity index 100% rename from Spigot-Server-Patches/0018-Implement-Paper-VersionChecker.patch rename to Spigot-Server-Patches/0019-Implement-Paper-VersionChecker.patch diff --git a/Spigot-Server-Patches/0019-Add-version-history-to-version-command.patch b/Spigot-Server-Patches/0020-Add-version-history-to-version-command.patch similarity index 100% rename from Spigot-Server-Patches/0019-Add-version-history-to-version-command.patch rename to Spigot-Server-Patches/0020-Add-version-history-to-version-command.patch diff --git a/Spigot-Server-Patches/0020-Player-affects-spawning-API.patch b/Spigot-Server-Patches/0021-Player-affects-spawning-API.patch similarity index 96% rename from Spigot-Server-Patches/0020-Player-affects-spawning-API.patch rename to Spigot-Server-Patches/0021-Player-affects-spawning-API.patch index 34099e0ce4..88916f0083 100644 --- a/Spigot-Server-Patches/0020-Player-affects-spawning-API.patch +++ b/Spigot-Server-Patches/0021-Player-affects-spawning-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Player affects spawning API diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 09bab3828197e3078a4ed95e7c8a9f34e8bf1b8d..dc996792df6046d442565a7993ec299af6605d92 100644 +index 0f47b10c9c3357f7a462680e2f26d7808a5f8afc..14646561f8fe661ba2b815c1abfb81af61f027d4 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -1269,6 +1269,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -131,10 +131,10 @@ index 90af43930f9141b0c7f51bb3d887d7b9c4d935eb..1741ec5e241f8ae7a3c30a9021d14cb0 public void c() { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 8428ef53e0408c4a7f74cc03e7e238be9c2f1888..84bb5f41064ba8899febb624c75e1357869b4edf 100644 +index 28368aa85e25ad5ee1e35255f093fd3f5a7a15bf..79c070cc790eafbf27ef30f367373406f68a9f7c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1708,7 +1708,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1784,8 +1784,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @Override public String getLocale() { return getHandle().locale; @@ -144,13 +144,14 @@ index 8428ef53e0408c4a7f74cc03e7e238be9c2f1888..84bb5f41064ba8899febb624c75e1357 + // Paper start + public void setAffectsSpawning(boolean affects) { + this.getHandle().affectsSpawning = affects; -+ } -+ + } + + @Override + public boolean getAffectsSpawning() { + return this.getHandle().affectsSpawning; - } ++ } + // Paper end - ++ @Override public void updateCommands() { + if (getHandle().playerConnection == null) return; diff --git a/Spigot-Server-Patches/0021-Remove-invalid-mob-spawner-tile-entities.patch b/Spigot-Server-Patches/0022-Remove-invalid-mob-spawner-tile-entities.patch similarity index 87% rename from Spigot-Server-Patches/0021-Remove-invalid-mob-spawner-tile-entities.patch rename to Spigot-Server-Patches/0022-Remove-invalid-mob-spawner-tile-entities.patch index bbd1eaf65c..1abdd2b2db 100644 --- a/Spigot-Server-Patches/0021-Remove-invalid-mob-spawner-tile-entities.patch +++ b/Spigot-Server-Patches/0022-Remove-invalid-mob-spawner-tile-entities.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Remove invalid mob spawner tile entities diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 0aea16df16b55b1d4756b51d10c8c22d37aef9a3..0d0f36c62d260390827321aa6472f51a3a204c95 100644 +index 19ddcabdc17c23c4ec46f5669ba0fd56d4bbee58..0da51a454b599f54f3bd443040cdcac57b1c7d7c 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -614,6 +614,10 @@ public class Chunk implements IChunkAccess { +@@ -612,6 +612,10 @@ public class Chunk implements IChunkAccess { } // CraftBukkit start diff --git a/Spigot-Server-Patches/0022-Optimize-TileEntity-Ticking.patch b/Spigot-Server-Patches/0023-Optimize-TileEntity-Ticking.patch similarity index 100% rename from Spigot-Server-Patches/0022-Optimize-TileEntity-Ticking.patch rename to Spigot-Server-Patches/0023-Optimize-TileEntity-Ticking.patch diff --git a/Spigot-Server-Patches/0023-Further-improve-server-tick-loop.patch b/Spigot-Server-Patches/0024-Further-improve-server-tick-loop.patch similarity index 96% rename from Spigot-Server-Patches/0023-Further-improve-server-tick-loop.patch rename to Spigot-Server-Patches/0024-Further-improve-server-tick-loop.patch index bce1a93452..5d5ea5ffea 100644 --- a/Spigot-Server-Patches/0023-Further-improve-server-tick-loop.patch +++ b/Spigot-Server-Patches/0024-Further-improve-server-tick-loop.patch @@ -140,10 +140,10 @@ index dd104b1cd544983024ac60888940a1c0917d05a1..478dfe231720324e995dc4123fbf19b9 GameProfilerTick gameprofilertick = GameProfilerTick.a("Server"); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index a9dc09b8d9ed97cca2a3852bd6c740ad53b0e39b..0b1bd76438a94f26728d416ab54fd67189e041a2 100644 +index 73ede1a37b141007a6085adcdced82236ef656e9..bf9afb9d4dd7d9d6b8647c760e1ba31a8c0ba150 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2065,6 +2065,17 @@ public final class CraftServer implements Server { +@@ -2114,6 +2114,17 @@ public final class CraftServer implements Server { return CraftMagicNumbers.INSTANCE; } @@ -158,14 +158,14 @@ index a9dc09b8d9ed97cca2a3852bd6c740ad53b0e39b..0b1bd76438a94f26728d416ab54fd671 + } + // Paper end + - // Spigot start private final Spigot spigot = new Spigot() { + diff --git a/src/main/java/org/spigotmc/TicksPerSecondCommand.java b/src/main/java/org/spigotmc/TicksPerSecondCommand.java -index f5b6dec1cbe7501ce2ee9125920e810bc94670cc..e62890433ffbe0b4e48942fe6c38b599a19e58fd 100644 +index 9cd57c9d5fe59ceb2cd307e4e1a2052c9ac428fe..7218f23df4d06ff1ca612286e4a404246389ab18 100644 --- a/src/main/java/org/spigotmc/TicksPerSecondCommand.java +++ b/src/main/java/org/spigotmc/TicksPerSecondCommand.java -@@ -24,22 +24,30 @@ public class TicksPerSecondCommand extends Command +@@ -26,22 +26,30 @@ public class TicksPerSecondCommand extends Command return true; } diff --git a/Spigot-Server-Patches/0024-Only-refresh-abilities-if-needed.patch b/Spigot-Server-Patches/0025-Only-refresh-abilities-if-needed.patch similarity index 86% rename from Spigot-Server-Patches/0024-Only-refresh-abilities-if-needed.patch rename to Spigot-Server-Patches/0025-Only-refresh-abilities-if-needed.patch index c3b5753a41..2982966f5f 100644 --- a/Spigot-Server-Patches/0024-Only-refresh-abilities-if-needed.patch +++ b/Spigot-Server-Patches/0025-Only-refresh-abilities-if-needed.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Only refresh abilities if needed diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 84bb5f41064ba8899febb624c75e1357869b4edf..4bff3bb57ced7d8b6434e7e19c1103a503222fd1 100644 +index 79c070cc790eafbf27ef30f367373406f68a9f7c..86ab4dbfd4231ad026a39aa9ff4b128bd64818dc 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1388,12 +1388,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1458,12 +1458,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @Override public void setFlying(boolean value) { diff --git a/Spigot-Server-Patches/0025-Entity-Origin-API.patch b/Spigot-Server-Patches/0026-Entity-Origin-API.patch similarity index 96% rename from Spigot-Server-Patches/0025-Entity-Origin-API.patch rename to Spigot-Server-Patches/0026-Entity-Origin-API.patch index 4bf46fadcf..452207df71 100644 --- a/Spigot-Server-Patches/0025-Entity-Origin-API.patch +++ b/Spigot-Server-Patches/0026-Entity-Origin-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Entity Origin API diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index dc996792df6046d442565a7993ec299af6605d92..c6b91de58c0190aca0455aacc04994f8ea5d81b7 100644 +index 14646561f8fe661ba2b815c1abfb81af61f027d4..48ebaa4cdb5d5f52334e7bd4f80309a10ecedfa9 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -162,6 +162,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -117,10 +117,10 @@ index 21e4088cfdb7218e78fb771fe4c9bd2027594663..89c22be536a45199a29d328b125bdcb9 } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index db7c4011c8b90b6daca2b48a6d9ec447d31f7197..b9a789b161d20aefd93142cb7549f3023d402e8c 100644 +index 969bf1095bb2a90ad0f1cb1f1e023e056e3855c0..0582d15e14d4fde7630759849b573cb2e08fabe6 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -@@ -1049,4 +1049,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { +@@ -1063,4 +1063,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { return spigot; } // Spigot end diff --git a/Spigot-Server-Patches/0026-Prevent-tile-entity-and-entity-crashes.patch b/Spigot-Server-Patches/0027-Prevent-tile-entity-and-entity-crashes.patch similarity index 92% rename from Spigot-Server-Patches/0026-Prevent-tile-entity-and-entity-crashes.patch rename to Spigot-Server-Patches/0027-Prevent-tile-entity-and-entity-crashes.patch index 70e621b552..0b96e0c635 100644 --- a/Spigot-Server-Patches/0026-Prevent-tile-entity-and-entity-crashes.patch +++ b/Spigot-Server-Patches/0027-Prevent-tile-entity-and-entity-crashes.patch @@ -23,7 +23,7 @@ index f1d0e2faffb3ef27f5a41d06d0ff7d787f1098f5..da96a91c6b4cc03ad2e4539053bd30e7 } } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 0f602de85bc7002150247b6cb26c6905f0e4f585..bc1946ea3060220f4598aae2e1aed3d84ab18387 100644 +index ab1285ed371f7848cddd959c33019a8ff10e1c28..21868a246d01c0f8c8642e42f82f66632b3bcadd 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -685,11 +685,13 @@ public abstract class World implements GeneratorAccess, AutoCloseable { @@ -42,10 +42,10 @@ index 0f602de85bc7002150247b6cb26c6905f0e4f585..bc1946ea3060220f4598aae2e1aed3d8 + this.tileEntityListTick.remove(tileTickPosition--); + continue; + // Paper end - // Spigot start - } finally { - tileentity.tickTimer.stopTiming(); -@@ -754,11 +756,12 @@ public abstract class World implements GeneratorAccess, AutoCloseable { + } + // Spigot start + finally { +@@ -755,11 +757,12 @@ public abstract class World implements GeneratorAccess, AutoCloseable { try { consumer.accept(entity); } catch (Throwable throwable) { diff --git a/Spigot-Server-Patches/0027-Configurable-top-of-nether-void-damage.patch b/Spigot-Server-Patches/0028-Configurable-top-of-nether-void-damage.patch similarity index 97% rename from Spigot-Server-Patches/0027-Configurable-top-of-nether-void-damage.patch rename to Spigot-Server-Patches/0028-Configurable-top-of-nether-void-damage.patch index 38ca85512a..9c5fbe6b57 100644 --- a/Spigot-Server-Patches/0027-Configurable-top-of-nether-void-damage.patch +++ b/Spigot-Server-Patches/0028-Configurable-top-of-nether-void-damage.patch @@ -29,7 +29,7 @@ index d16ae924bcbe31c964f7fb448757c748e5c4418c..4bba6977a0287837b8927718c040ac61 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index c6b91de58c0190aca0455aacc04994f8ea5d81b7..d3e7a49a4161d68733cfba8d9ffd1cd9821ab2e3 100644 +index 48ebaa4cdb5d5f52334e7bd4f80309a10ecedfa9..8850047050ca8a608c156b63bc6e05eaef140d03 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -415,9 +415,16 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/0028-Check-online-mode-before-converting-and-renaming-pla.patch b/Spigot-Server-Patches/0029-Check-online-mode-before-converting-and-renaming-pla.patch similarity index 100% rename from Spigot-Server-Patches/0028-Check-online-mode-before-converting-and-renaming-pla.patch rename to Spigot-Server-Patches/0029-Check-online-mode-before-converting-and-renaming-pla.patch diff --git a/Spigot-Server-Patches/0029-Always-tick-falling-blocks.patch b/Spigot-Server-Patches/0030-Always-tick-falling-blocks.patch similarity index 85% rename from Spigot-Server-Patches/0029-Always-tick-falling-blocks.patch rename to Spigot-Server-Patches/0030-Always-tick-falling-blocks.patch index e75c94b5a7..f663925974 100644 --- a/Spigot-Server-Patches/0029-Always-tick-falling-blocks.patch +++ b/Spigot-Server-Patches/0030-Always-tick-falling-blocks.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Always tick falling blocks diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java -index 093a11b6e355f9e1236ecca921ea55488d70451d..d44ef056bdab3bcff39aea45b40a4c7e9c62398f 100644 +index 2b00258ccd808e3332af5ab3f7e4967f03dd4aa3..78f0fb5d97b077673ec542cd70bbc3ffa13f916c 100644 --- a/src/main/java/org/spigotmc/ActivationRange.java +++ b/src/main/java/org/spigotmc/ActivationRange.java -@@ -12,6 +12,7 @@ import net.minecraft.server.EntityCreature; +@@ -13,6 +13,7 @@ import net.minecraft.server.EntityCreature; import net.minecraft.server.EntityCreeper; import net.minecraft.server.EntityEnderCrystal; import net.minecraft.server.EntityEnderDragon; @@ -16,7 +16,7 @@ index 093a11b6e355f9e1236ecca921ea55488d70451d..d44ef056bdab3bcff39aea45b40a4c7e import net.minecraft.server.EntityFireball; import net.minecraft.server.EntityFireworks; import net.minecraft.server.EntityHuman; -@@ -91,6 +92,7 @@ public class ActivationRange +@@ -93,6 +94,7 @@ public class ActivationRange || entity instanceof EntityFireball || entity instanceof EntityLightning || entity instanceof EntityTNTPrimed diff --git a/Spigot-Server-Patches/0030-Configurable-end-credits.patch b/Spigot-Server-Patches/0031-Configurable-end-credits.patch similarity index 90% rename from Spigot-Server-Patches/0030-Configurable-end-credits.patch rename to Spigot-Server-Patches/0031-Configurable-end-credits.patch index 46fe409128..73f5065134 100644 --- a/Spigot-Server-Patches/0030-Configurable-end-credits.patch +++ b/Spigot-Server-Patches/0031-Configurable-end-credits.patch @@ -20,10 +20,10 @@ index 4bba6977a0287837b8927718c040ac61463f0469..e6e18f309dc09ea9416ea37dcc697ddc + } } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 37a84b44a46e1490f7b79839b04aef012ddc9fa3..46f1a60b7cb7b2e946fe741f0a4d38f104b552a5 100644 +index 0445bffdd1a6c9548c5c98c1ea4fd2c0c517acf4..317d9688fb4bc8a885314a6879f561d5cb44fa26 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -62,7 +62,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -63,7 +63,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { private long ca = SystemUtils.getMonotonicMillis(); private Entity spectatedEntity; public boolean worldChangeInvuln; @@ -32,7 +32,7 @@ index 37a84b44a46e1490f7b79839b04aef012ddc9fa3..46f1a60b7cb7b2e946fe741f0a4d38f1 private final RecipeBookServer recipeBook = new RecipeBookServer(); private Vec3D cf; private int cg; -@@ -771,6 +771,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -768,6 +768,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { this.decouple(); this.getWorldServer().removePlayer(this); if (!this.viewingCredits) { diff --git a/Spigot-Server-Patches/0031-Fix-lag-from-explosions-processing-dead-entities.patch b/Spigot-Server-Patches/0032-Fix-lag-from-explosions-processing-dead-entities.patch similarity index 100% rename from Spigot-Server-Patches/0031-Fix-lag-from-explosions-processing-dead-entities.patch rename to Spigot-Server-Patches/0032-Fix-lag-from-explosions-processing-dead-entities.patch diff --git a/Spigot-Server-Patches/0032-Optimize-explosions.patch b/Spigot-Server-Patches/0033-Optimize-explosions.patch similarity index 98% rename from Spigot-Server-Patches/0032-Optimize-explosions.patch rename to Spigot-Server-Patches/0033-Optimize-explosions.patch index 0780513cc9..6fe7788fe1 100644 --- a/Spigot-Server-Patches/0032-Optimize-explosions.patch +++ b/Spigot-Server-Patches/0033-Optimize-explosions.patch @@ -135,7 +135,7 @@ index 478dfe231720324e995dc4123fbf19b9ce26c16e..5b4b6810586761072a790b7bbe3368d2 this.methodProfiler.exitEnter("connection"); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index bc1946ea3060220f4598aae2e1aed3d84ab18387..e062f68b87bd70b128f46394881c09ad63278fdc 100644 +index 21868a246d01c0f8c8642e42f82f66632b3bcadd..ca874ef00a925095c01767f5b41737302645f149 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -84,6 +84,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { diff --git a/Spigot-Server-Patches/0033-Disable-explosion-knockback.patch b/Spigot-Server-Patches/0034-Disable-explosion-knockback.patch similarity index 100% rename from Spigot-Server-Patches/0033-Disable-explosion-knockback.patch rename to Spigot-Server-Patches/0034-Disable-explosion-knockback.patch diff --git a/Spigot-Server-Patches/0034-Disable-thunder.patch b/Spigot-Server-Patches/0035-Disable-thunder.patch similarity index 100% rename from Spigot-Server-Patches/0034-Disable-thunder.patch rename to Spigot-Server-Patches/0035-Disable-thunder.patch diff --git a/Spigot-Server-Patches/0035-Disable-ice-and-snow.patch b/Spigot-Server-Patches/0036-Disable-ice-and-snow.patch similarity index 100% rename from Spigot-Server-Patches/0035-Disable-ice-and-snow.patch rename to Spigot-Server-Patches/0036-Disable-ice-and-snow.patch diff --git a/Spigot-Server-Patches/0036-Configurable-mob-spawner-tick-rate.patch b/Spigot-Server-Patches/0037-Configurable-mob-spawner-tick-rate.patch similarity index 100% rename from Spigot-Server-Patches/0036-Configurable-mob-spawner-tick-rate.patch rename to Spigot-Server-Patches/0037-Configurable-mob-spawner-tick-rate.patch diff --git a/Spigot-Server-Patches/0037-Send-absolute-position-the-first-time-an-entity-is-s.patch b/Spigot-Server-Patches/0038-Send-absolute-position-the-first-time-an-entity-is-s.patch similarity index 100% rename from Spigot-Server-Patches/0037-Send-absolute-position-the-first-time-an-entity-is-s.patch rename to Spigot-Server-Patches/0038-Send-absolute-position-the-first-time-an-entity-is-s.patch diff --git a/Spigot-Server-Patches/0038-Add-BeaconEffectEvent.patch b/Spigot-Server-Patches/0039-Add-BeaconEffectEvent.patch similarity index 100% rename from Spigot-Server-Patches/0038-Add-BeaconEffectEvent.patch rename to Spigot-Server-Patches/0039-Add-BeaconEffectEvent.patch diff --git a/Spigot-Server-Patches/0039-Configurable-container-update-tick-rate.patch b/Spigot-Server-Patches/0040-Configurable-container-update-tick-rate.patch similarity index 89% rename from Spigot-Server-Patches/0039-Configurable-container-update-tick-rate.patch rename to Spigot-Server-Patches/0040-Configurable-container-update-tick-rate.patch index d647f3bc5e..3701ee14fc 100644 --- a/Spigot-Server-Patches/0039-Configurable-container-update-tick-rate.patch +++ b/Spigot-Server-Patches/0040-Configurable-container-update-tick-rate.patch @@ -19,10 +19,10 @@ index 4de86b09c6bc3c1974ce61b550ccb73d37f6f170..5a4c3a8c511f22c8c3240c9c7cd83a65 + } } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 46f1a60b7cb7b2e946fe741f0a4d38f104b552a5..46754524a7a4a3087f56ab5460e3dac665c06052 100644 +index 317d9688fb4bc8a885314a6879f561d5cb44fa26..5dd83b62d8d6f8f7b8483064be5658a439824052 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -81,6 +81,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -82,6 +82,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { public boolean e; public int ping; public boolean viewingCredits; @@ -30,7 +30,7 @@ index 46f1a60b7cb7b2e946fe741f0a4d38f104b552a5..46754524a7a4a3087f56ab5460e3dac6 // CraftBukkit start public String displayName; -@@ -403,7 +404,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -406,7 +407,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting { --this.noDamageTicks; } diff --git a/Spigot-Server-Patches/0040-Use-UserCache-for-player-heads.patch b/Spigot-Server-Patches/0041-Use-UserCache-for-player-heads.patch similarity index 100% rename from Spigot-Server-Patches/0040-Use-UserCache-for-player-heads.patch rename to Spigot-Server-Patches/0041-Use-UserCache-for-player-heads.patch diff --git a/Spigot-Server-Patches/0041-Disable-spigot-tick-limiters.patch b/Spigot-Server-Patches/0042-Disable-spigot-tick-limiters.patch similarity index 92% rename from Spigot-Server-Patches/0041-Disable-spigot-tick-limiters.patch rename to Spigot-Server-Patches/0042-Disable-spigot-tick-limiters.patch index f1daeff684..7699cd6a0f 100644 --- a/Spigot-Server-Patches/0041-Disable-spigot-tick-limiters.patch +++ b/Spigot-Server-Patches/0042-Disable-spigot-tick-limiters.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Disable spigot tick limiters diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index e062f68b87bd70b128f46394881c09ad63278fdc..193d5973b69cf3d4c408ccbc924d91ff9a06b382 100644 +index ca874ef00a925095c01767f5b41737302645f149..564e252a366ed5df602ea4d608f482c80a187606 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -655,9 +655,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { diff --git a/Spigot-Server-Patches/0042-Add-PlayerInitialSpawnEvent.patch b/Spigot-Server-Patches/0043-Add-PlayerInitialSpawnEvent.patch similarity index 88% rename from Spigot-Server-Patches/0042-Add-PlayerInitialSpawnEvent.patch rename to Spigot-Server-Patches/0043-Add-PlayerInitialSpawnEvent.patch index 2d17ac1d9a..4feae95174 100644 --- a/Spigot-Server-Patches/0042-Add-PlayerInitialSpawnEvent.patch +++ b/Spigot-Server-Patches/0043-Add-PlayerInitialSpawnEvent.patch @@ -9,10 +9,10 @@ This is a duplicate API from spigot, so use our duplicate subclass and improve setPosition to use raw diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 5b49047b820dbe1f326320b71445ac216bf688b5..3b7c4c611e8936faef09f3bec80f96037e45d77d 100644 +index 1b0fe4f27a7346a1466db97e796c4a65b11e1ab8..fedc9e453cdf17c1b69c87de9fa32a145d4b6f70 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -143,7 +143,7 @@ public abstract class PlayerList { +@@ -145,7 +145,7 @@ public abstract class PlayerList { // Spigot start - spawn location event Player bukkitPlayer = entityplayer.getBukkitEntity(); @@ -21,7 +21,7 @@ index 5b49047b820dbe1f326320b71445ac216bf688b5..3b7c4c611e8936faef09f3bec80f9603 Bukkit.getPluginManager().callEvent(ev); Location loc = ev.getSpawnLocation(); -@@ -151,7 +151,7 @@ public abstract class PlayerList { +@@ -153,7 +153,7 @@ public abstract class PlayerList { entityplayer.spawnIn(worldserver1); entityplayer.playerInteractManager.a((WorldServer) entityplayer.world); diff --git a/Spigot-Server-Patches/0043-Configurable-Disabling-Cat-Chest-Detection.patch b/Spigot-Server-Patches/0044-Configurable-Disabling-Cat-Chest-Detection.patch similarity index 100% rename from Spigot-Server-Patches/0043-Configurable-Disabling-Cat-Chest-Detection.patch rename to Spigot-Server-Patches/0044-Configurable-Disabling-Cat-Chest-Detection.patch diff --git a/Spigot-Server-Patches/0044-Ensure-commands-are-not-ran-async.patch b/Spigot-Server-Patches/0045-Ensure-commands-are-not-ran-async.patch similarity index 93% rename from Spigot-Server-Patches/0044-Ensure-commands-are-not-ran-async.patch rename to Spigot-Server-Patches/0045-Ensure-commands-are-not-ran-async.patch index fb83f2fa68..bb0d9bbfb8 100644 --- a/Spigot-Server-Patches/0044-Ensure-commands-are-not-ran-async.patch +++ b/Spigot-Server-Patches/0045-Ensure-commands-are-not-ran-async.patch @@ -14,10 +14,10 @@ big slowdown in execution but throwing an exception at same time to raise awaren that it is happening so that plugin authors can fix their code to stop executing commands async. diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index d34e91887cd73009bf852fb849e495a8affed7a9..c70e290405c7c5ba247c1d3cce286579260cc76d 100644 +index 287d1c6abd407dc8f1e5b29a95579ff9875bdaec..cfacd979d75fd612937586cbc9f55570b1b04e6f 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -1700,6 +1700,29 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -1702,6 +1702,29 @@ public class PlayerConnection implements PacketListenerPlayIn { } if (!async && s.startsWith("/")) { @@ -48,10 +48,10 @@ index d34e91887cd73009bf852fb849e495a8affed7a9..c70e290405c7c5ba247c1d3cce286579 } else if (this.player.getChatFlags() == EnumChatVisibility.SYSTEM) { // Do nothing, this is coming from a plugin diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 0b1bd76438a94f26728d416ab54fd67189e041a2..8117f9df377d797adb9f4a913709b7493c5c2ba1 100644 +index bf9afb9d4dd7d9d6b8647c760e1ba31a8c0ba150..6b26a8f09c022f398b847411166d11d2e2d0ca76 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -759,6 +759,29 @@ public final class CraftServer implements Server { +@@ -763,6 +763,29 @@ public final class CraftServer implements Server { Validate.notNull(commandLine, "CommandLine cannot be null"); org.spigotmc.AsyncCatcher.catchOp("command dispatch"); // Spigot @@ -106,7 +106,7 @@ index aeed7697254af17ffefe8e578353ad216e15f9f3..9f7d2ef932ab41cef5d3d0736d20a7c7 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 56445844c7f542dd74c166bb09abd79cc17e1e12..26795b22e3ebc9594af79f93506a3c217cb784e2 100644 +index e7b953ca312533f7ede12cdab42b2289aefc3b95..ccea803f58e09067cc998c62ffa134d6604878ff 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 diff --git a/Spigot-Server-Patches/0045-All-chunks-are-slime-spawn-chunks-toggle.patch b/Spigot-Server-Patches/0046-All-chunks-are-slime-spawn-chunks-toggle.patch similarity index 100% rename from Spigot-Server-Patches/0045-All-chunks-are-slime-spawn-chunks-toggle.patch rename to Spigot-Server-Patches/0046-All-chunks-are-slime-spawn-chunks-toggle.patch diff --git a/Spigot-Server-Patches/0046-Expose-server-CommandMap.patch b/Spigot-Server-Patches/0047-Expose-server-CommandMap.patch similarity index 78% rename from Spigot-Server-Patches/0046-Expose-server-CommandMap.patch rename to Spigot-Server-Patches/0047-Expose-server-CommandMap.patch index ab930d9c1c..3ad8f7a0ca 100644 --- a/Spigot-Server-Patches/0046-Expose-server-CommandMap.patch +++ b/Spigot-Server-Patches/0047-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 8117f9df377d797adb9f4a913709b7493c5c2ba1..9799058bd098a9f8fc973ca86791dc0f44a82a81 100644 +index 6b26a8f09c022f398b847411166d11d2e2d0ca76..5faa720f7249cbe0028927bb274cb45009068359 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1710,6 +1710,7 @@ public final class CraftServer implements Server { +@@ -1753,6 +1753,7 @@ public final class CraftServer implements Server { return helpMap; } diff --git a/Spigot-Server-Patches/0047-Be-a-bit-more-informative-in-maxHealth-exception.patch b/Spigot-Server-Patches/0048-Be-a-bit-more-informative-in-maxHealth-exception.patch similarity index 100% rename from Spigot-Server-Patches/0047-Be-a-bit-more-informative-in-maxHealth-exception.patch rename to Spigot-Server-Patches/0048-Be-a-bit-more-informative-in-maxHealth-exception.patch diff --git a/Spigot-Server-Patches/0048-Player-Tab-List-and-Title-APIs.patch b/Spigot-Server-Patches/0049-Player-Tab-List-and-Title-APIs.patch similarity index 80% rename from Spigot-Server-Patches/0048-Player-Tab-List-and-Title-APIs.patch rename to Spigot-Server-Patches/0049-Player-Tab-List-and-Title-APIs.patch index 3ae9d1cbd5..78a046f533 100644 --- a/Spigot-Server-Patches/0048-Player-Tab-List-and-Title-APIs.patch +++ b/Spigot-Server-Patches/0049-Player-Tab-List-and-Title-APIs.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Player Tab List and Title APIs diff --git a/src/main/java/net/minecraft/server/IChatBaseComponent.java b/src/main/java/net/minecraft/server/IChatBaseComponent.java -index 7441beeaa4ee83467dac4d68176132efc6247337..b8770066a86df25d6ba9ecf74d846c730d228c01 100644 +index de6bfc27cd38fd6293853d55cf62699aade94212..65aec1dc2fd9ef9c9a9f022f13008505383a0af4 100644 --- a/src/main/java/net/minecraft/server/IChatBaseComponent.java +++ b/src/main/java/net/minecraft/server/IChatBaseComponent.java -@@ -352,6 +352,7 @@ public interface IChatBaseComponent extends Message, IChatFormatted, Iterable { +@@ -44,6 +44,17 @@ public class PacketPlayOutTitle implements Packet { } } @@ -38,21 +38,8 @@ index 3a6e780007bc1b1fa799166daa01d3a9e15c7ab0..535056c64ef866e645b1bfbd149b50c5 @Override public void b(PacketDataSerializer packetdataserializer) throws IOException { - packetdataserializer.a((Enum) this.a); - if (this.a == PacketPlayOutTitle.EnumTitleAction.TITLE || this.a == PacketPlayOutTitle.EnumTitleAction.SUBTITLE || this.a == PacketPlayOutTitle.EnumTitleAction.ACTIONBAR) { -- packetdataserializer.a(this.b); -+ // Paper start -+ if (this.components != null) { -+ packetdataserializer.a(net.md_5.bungee.chat.ComponentSerializer.toString(components)); -+ } else { -+ packetdataserializer.a(this.b); -+ } -+ // Paper end - } - - if (this.a == PacketPlayOutTitle.EnumTitleAction.TIMES) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 4bff3bb57ced7d8b6434e7e19c1103a503222fd1..6f651ff6d6ac678dcb1207dea9a122da86750f6f 100644 +index 86ab4dbfd4231ad026a39aa9ff4b128bd64818dc..4328ed755ad909fb3096bfd3b5ae1e8d9ef7283a 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1,5 +1,6 @@ @@ -71,15 +58,15 @@ index 4bff3bb57ced7d8b6434e7e19c1103a503222fd1..6f651ff6d6ac678dcb1207dea9a122da + public void setPlayerListHeaderFooter(BaseComponent[] header, BaseComponent[] footer) { + if (header != null) { + String headerJson = net.md_5.bungee.chat.ComponentSerializer.toString(header); -+ playerListHeader = net.minecraft.server.ChatBaseComponent.ChatSerializer.jsonToComponent(headerJson); ++ playerListHeader = net.kyori.adventure.text.serializer.gson.GsonComponentSerializer.gson().deserialize(headerJson); + } else { + playerListHeader = null; + } + + if (footer != null) { + String footerJson = net.md_5.bungee.chat.ComponentSerializer.toString(footer); -+ playerListFooter = net.minecraft.server.ChatBaseComponent.ChatSerializer.jsonToComponent(footerJson); -+ } else { ++ playerListFooter = net.kyori.adventure.text.serializer.gson.GsonComponentSerializer.gson().deserialize(footerJson); ++ } else { + playerListFooter = null; + } + @@ -158,4 +145,4 @@ index 4bff3bb57ced7d8b6434e7e19c1103a503222fd1..6f651ff6d6ac678dcb1207dea9a122da + @Override public String getDisplayName() { - return getHandle().displayName; + if(true) return net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().serialize(this.getHandle().adventure$displayName); // Paper diff --git a/Spigot-Server-Patches/0049-Ensure-inv-drag-is-in-bounds.patch b/Spigot-Server-Patches/0050-Ensure-inv-drag-is-in-bounds.patch similarity index 100% rename from Spigot-Server-Patches/0049-Ensure-inv-drag-is-in-bounds.patch rename to Spigot-Server-Patches/0050-Ensure-inv-drag-is-in-bounds.patch diff --git a/Spigot-Server-Patches/0050-Change-implementation-of-tile-entity-removal-list.patch b/Spigot-Server-Patches/0051-Change-implementation-of-tile-entity-removal-list.patch similarity index 91% rename from Spigot-Server-Patches/0050-Change-implementation-of-tile-entity-removal-list.patch rename to Spigot-Server-Patches/0051-Change-implementation-of-tile-entity-removal-list.patch index 75679510b1..2f1303e147 100644 --- a/Spigot-Server-Patches/0050-Change-implementation-of-tile-entity-removal-list.patch +++ b/Spigot-Server-Patches/0051-Change-implementation-of-tile-entity-removal-list.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Change implementation of (tile)entity removal list use sets for faster removal diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 193d5973b69cf3d4c408ccbc924d91ff9a06b382..eb0af6775d60e2cd610dde6e7c4874d4b01d6054 100644 +index 564e252a366ed5df602ea4d608f482c80a187606..895436e36e6ef6f78dfd42e3ef3a0132506663f2 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -37,7 +37,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { diff --git a/Spigot-Server-Patches/0051-Add-configurable-portal-search-radius.patch b/Spigot-Server-Patches/0052-Add-configurable-portal-search-radius.patch similarity index 97% rename from Spigot-Server-Patches/0051-Add-configurable-portal-search-radius.patch rename to Spigot-Server-Patches/0052-Add-configurable-portal-search-radius.patch index 52a69ad5ba..480af3a30b 100644 --- a/Spigot-Server-Patches/0051-Add-configurable-portal-search-radius.patch +++ b/Spigot-Server-Patches/0052-Add-configurable-portal-search-radius.patch @@ -23,7 +23,7 @@ index 416a6760883cb40367535c7c5acd779742bb8af5..670efbe53241a0ae32d618c83da601cc + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index d3e7a49a4161d68733cfba8d9ffd1cd9821ab2e3..26022146538dd9fb443304966c0905f19a6902c6 100644 +index 8850047050ca8a608c156b63bc6e05eaef140d03..295fbae9946fda8061c5c7294cdaefc426d0edce 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -2528,7 +2528,13 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/0052-Add-velocity-warnings.patch b/Spigot-Server-Patches/0053-Add-velocity-warnings.patch similarity index 93% rename from Spigot-Server-Patches/0052-Add-velocity-warnings.patch rename to Spigot-Server-Patches/0053-Add-velocity-warnings.patch index 288b372816..0d24f4df6c 100644 --- a/Spigot-Server-Patches/0052-Add-velocity-warnings.patch +++ b/Spigot-Server-Patches/0053-Add-velocity-warnings.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add velocity warnings diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 9799058bd098a9f8fc973ca86791dc0f44a82a81..e2237167df0a132f51d40a2c2070e8ea416b4237 100644 +index 5faa720f7249cbe0028927bb274cb45009068359..09d28f816520abb0f092bc6cd1bb1f0e3cfe1417 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -262,6 +262,7 @@ public final class CraftServer implements Server { +@@ -263,6 +263,7 @@ public final class CraftServer implements Server { public boolean ignoreVanillaPermissions = false; private final List playerView; public int reloadCount; @@ -17,10 +17,10 @@ index 9799058bd098a9f8fc973ca86791dc0f44a82a81..e2237167df0a132f51d40a2c2070e8ea static { ConfigurationSerialization.registerClass(CraftOfflinePlayer.class); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index b9a789b161d20aefd93142cb7549f3023d402e8c..baa54065500b98e3fabce053ad659b44d0a200ff 100644 +index 0582d15e14d4fde7630759849b573cb2e08fabe6..14c06298157c4a6c6061df01b213e69b6c3481d5 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -@@ -424,10 +424,41 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { +@@ -425,10 +425,41 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { public void setVelocity(Vector velocity) { Preconditions.checkArgument(velocity != null, "velocity"); velocity.checkFinite(); diff --git a/Spigot-Server-Patches/0053-Configurable-inter-world-teleportation-safety.patch b/Spigot-Server-Patches/0054-Configurable-inter-world-teleportation-safety.patch similarity index 93% rename from Spigot-Server-Patches/0053-Configurable-inter-world-teleportation-safety.patch rename to Spigot-Server-Patches/0054-Configurable-inter-world-teleportation-safety.patch index 78f2484a88..ddc8e498fb 100644 --- a/Spigot-Server-Patches/0053-Configurable-inter-world-teleportation-safety.patch +++ b/Spigot-Server-Patches/0054-Configurable-inter-world-teleportation-safety.patch @@ -30,10 +30,10 @@ index 670efbe53241a0ae32d618c83da601ccc1f26e37..abbbe1786eb68af02f9d39650aad730a + } } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 6f651ff6d6ac678dcb1207dea9a122da86750f6f..72b82fb1cf46cd02b0adc46086c8704ebdd1eb16 100644 +index 4328ed755ad909fb3096bfd3b5ae1e8d9ef7283a..b2e153306ffc1ee0456bb37fb164b5a1eb68f117 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -782,7 +782,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -852,7 +852,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { if (fromWorld == toWorld) { entity.playerConnection.teleport(to); } else { diff --git a/Spigot-Server-Patches/0054-Add-exception-reporting-event.patch b/Spigot-Server-Patches/0055-Add-exception-reporting-event.patch similarity index 97% rename from Spigot-Server-Patches/0054-Add-exception-reporting-event.patch rename to Spigot-Server-Patches/0055-Add-exception-reporting-event.patch index 7f597196e0..13553e5403 100644 --- a/Spigot-Server-Patches/0054-Add-exception-reporting-event.patch +++ b/Spigot-Server-Patches/0055-Add-exception-reporting-event.patch @@ -49,7 +49,7 @@ index 0000000000000000000000000000000000000000..f699ce18ca044f813e194ef2786b7ea8 + } +} diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 0d0f36c62d260390827321aa6472f51a3a204c95..01655fd86f9a3218036f8b5404e233d32e0904a5 100644 +index 0da51a454b599f54f3bd443040cdcac57b1c7d7c..81c6ce3ba87da692675bca8b2831a90fabfa4e37 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -1,5 +1,6 @@ @@ -59,7 +59,7 @@ index 0d0f36c62d260390827321aa6472f51a3a204c95..01655fd86f9a3218036f8b5404e233d3 import com.google.common.collect.Maps; import com.google.common.collect.Sets; import it.unimi.dsi.fastutil.longs.LongOpenHashSet; -@@ -619,10 +620,15 @@ public class Chunk implements IChunkAccess { +@@ -617,10 +618,15 @@ public class Chunk implements IChunkAccess { this.tileEntities.remove(blockposition); // Paper end } else { @@ -187,7 +187,7 @@ index 1844a6504acc420bdfaaf8f045c569e970d055db..d6aadbda5c5a17976659f57ee04cf9b9 } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index eb0af6775d60e2cd610dde6e7c4874d4b01d6054..3638ae7c0eba5b1ef811bc1629334e9c483bef6f 100644 +index 895436e36e6ef6f78dfd42e3ef3a0132506663f2..1c54c081c6ea1f422c19db1aa9e1935ce066d910 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -1,5 +1,10 @@ @@ -214,7 +214,7 @@ index eb0af6775d60e2cd610dde6e7c4874d4b01d6054..3638ae7c0eba5b1ef811bc1629334e9c tilesThisCycle--; this.tileEntityListTick.remove(tileTickPosition--); continue; -@@ -756,8 +764,10 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -757,8 +765,10 @@ public abstract class World implements GeneratorAccess, AutoCloseable { consumer.accept(entity); } catch (Throwable throwable) { // Paper start - Prevent tile entity and entity crashes diff --git a/Spigot-Server-Patches/0055-Don-t-nest-if-we-don-t-need-to-when-cerealising-text.patch b/Spigot-Server-Patches/0056-Don-t-nest-if-we-don-t-need-to-when-cerealising-text.patch similarity index 84% rename from Spigot-Server-Patches/0055-Don-t-nest-if-we-don-t-need-to-when-cerealising-text.patch rename to Spigot-Server-Patches/0056-Don-t-nest-if-we-don-t-need-to-when-cerealising-text.patch index 77180fe309..79fef10215 100644 --- a/Spigot-Server-Patches/0055-Don-t-nest-if-we-don-t-need-to-when-cerealising-text.patch +++ b/Spigot-Server-Patches/0056-Don-t-nest-if-we-don-t-need-to-when-cerealising-text.patch @@ -6,11 +6,11 @@ Subject: [PATCH] Don't nest if we don't need to when cerealising text diff --git a/src/main/java/net/minecraft/server/PacketPlayOutChat.java b/src/main/java/net/minecraft/server/PacketPlayOutChat.java -index 9ae419f9ad971ee5c743ee931426ab482b6184f1..6ae26f8c3637e0c9e56ed3e14aaac0e3f781cb43 100644 +index 47328ca5e3f1e71ed25ba89df5b666f041e49b76..b9cb21c5eb6f4a0318c3c63ec66f88b1750782ac 100644 --- a/src/main/java/net/minecraft/server/PacketPlayOutChat.java +++ b/src/main/java/net/minecraft/server/PacketPlayOutChat.java -@@ -29,7 +29,14 @@ public class PacketPlayOutChat implements Packet { - public void b(PacketDataSerializer packetdataserializer) throws IOException { +@@ -35,7 +35,14 @@ public class PacketPlayOutChat implements Packet { + // Paper end // Spigot start if (components != null) { - packetdataserializer.a(net.md_5.bungee.chat.ComponentSerializer.toString(components)); diff --git a/Spigot-Server-Patches/0056-Disable-Scoreboards-for-non-players-by-default.patch b/Spigot-Server-Patches/0057-Disable-Scoreboards-for-non-players-by-default.patch similarity index 96% rename from Spigot-Server-Patches/0056-Disable-Scoreboards-for-non-players-by-default.patch rename to Spigot-Server-Patches/0057-Disable-Scoreboards-for-non-players-by-default.patch index 444fc533ae..45e3b09d45 100644 --- a/Spigot-Server-Patches/0056-Disable-Scoreboards-for-non-players-by-default.patch +++ b/Spigot-Server-Patches/0057-Disable-Scoreboards-for-non-players-by-default.patch @@ -25,7 +25,7 @@ index abbbe1786eb68af02f9d39650aad730ac44aac8a..3ac2ac3db9b1c271b3c21930bb137166 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 26022146538dd9fb443304966c0905f19a6902c6..99edd9811f9bd9f2150fcc83459d58063156ca26 100644 +index 295fbae9946fda8061c5c7294cdaefc426d0edce..31857636a08eeb281b4d21dd72811d40eb00055c 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -2199,6 +2199,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/0057-Add-methods-for-working-with-arrows-stuck-in-living-.patch b/Spigot-Server-Patches/0058-Add-methods-for-working-with-arrows-stuck-in-living-.patch similarity index 100% rename from Spigot-Server-Patches/0057-Add-methods-for-working-with-arrows-stuck-in-living-.patch rename to Spigot-Server-Patches/0058-Add-methods-for-working-with-arrows-stuck-in-living-.patch diff --git a/Spigot-Server-Patches/0058-Complete-resource-pack-API.patch b/Spigot-Server-Patches/0059-Complete-resource-pack-API.patch similarity index 92% rename from Spigot-Server-Patches/0058-Complete-resource-pack-API.patch rename to Spigot-Server-Patches/0059-Complete-resource-pack-API.patch index 5ecbd8f82e..84b328d888 100644 --- a/Spigot-Server-Patches/0058-Complete-resource-pack-API.patch +++ b/Spigot-Server-Patches/0059-Complete-resource-pack-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Complete resource pack API diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index c70e290405c7c5ba247c1d3cce286579260cc76d..a6596d17a6c942061d98fed2cbb71045c7d3849f 100644 +index cfacd979d75fd612937586cbc9f55570b1b04e6f..3f482b20c4486fce2b1324a9c58d0af1bd357444 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -1453,7 +1453,11 @@ public class PlayerConnection implements PacketListenerPlayIn { @@ -22,7 +22,7 @@ index c70e290405c7c5ba247c1d3cce286579260cc76d..a6596d17a6c942061d98fed2cbb71045 // CraftBukkit end diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 72b82fb1cf46cd02b0adc46086c8704ebdd1eb16..5e3b36c1cc3346b2a1b6f84ea4a412beaff8b7b3 100644 +index b2e153306ffc1ee0456bb37fb164b5a1eb68f117..0c5d3360cbd38b0ac32e115b2b889e6d24dc4164 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -137,6 +137,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -36,7 +36,7 @@ index 72b82fb1cf46cd02b0adc46086c8704ebdd1eb16..5e3b36c1cc3346b2a1b6f84ea4a412be public CraftPlayer(CraftServer server, EntityPlayer entity) { super(server, entity); -@@ -1812,6 +1816,32 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1888,6 +1892,32 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public boolean getAffectsSpawning() { return this.getHandle().affectsSpawning; } diff --git a/Spigot-Server-Patches/0059-Chunk-Save-Reattempt.patch b/Spigot-Server-Patches/0060-Chunk-Save-Reattempt.patch similarity index 100% rename from Spigot-Server-Patches/0059-Chunk-Save-Reattempt.patch rename to Spigot-Server-Patches/0060-Chunk-Save-Reattempt.patch diff --git a/Spigot-Server-Patches/0060-Default-loading-permissions.yml-before-plugins.patch b/Spigot-Server-Patches/0061-Default-loading-permissions.yml-before-plugins.patch similarity index 91% rename from Spigot-Server-Patches/0060-Default-loading-permissions.yml-before-plugins.patch rename to Spigot-Server-Patches/0061-Default-loading-permissions.yml-before-plugins.patch index 8cd24e744f..556f6620ee 100644 --- a/Spigot-Server-Patches/0060-Default-loading-permissions.yml-before-plugins.patch +++ b/Spigot-Server-Patches/0061-Default-loading-permissions.yml-before-plugins.patch @@ -30,10 +30,10 @@ index 1d03a79e9010bc514b72a81ba0ad4a62aeff1bb7..436e555205327afcb8e294370810cf27 + } } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index e2237167df0a132f51d40a2c2070e8ea416b4237..da3bf7ce01435284108f9bc614534646379afc47 100644 +index 09d28f816520abb0f092bc6cd1bb1f0e3cfe1417..499e2da0c9085cfffdb882df9801d654f4804d7f 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -399,6 +399,7 @@ public final class CraftServer implements Server { +@@ -400,6 +400,7 @@ public final class CraftServer implements Server { if (type == PluginLoadOrder.STARTUP) { helpMap.clear(); helpMap.initializeGeneralTopics(); @@ -41,7 +41,7 @@ index e2237167df0a132f51d40a2c2070e8ea416b4237..da3bf7ce01435284108f9bc614534646 } Plugin[] plugins = pluginManager.getPlugins(); -@@ -418,7 +419,7 @@ public final class CraftServer implements Server { +@@ -419,7 +420,7 @@ public final class CraftServer implements Server { commandMap.registerServerAliases(); DefaultPermissions.registerCorePermissions(); CraftDefaultPermissions.registerCorePermissions(); diff --git a/Spigot-Server-Patches/0061-Allow-Reloading-of-Custom-Permissions.patch b/Spigot-Server-Patches/0062-Allow-Reloading-of-Custom-Permissions.patch similarity index 87% rename from Spigot-Server-Patches/0061-Allow-Reloading-of-Custom-Permissions.patch rename to Spigot-Server-Patches/0062-Allow-Reloading-of-Custom-Permissions.patch index 1dcd95d596..ef359867f7 100644 --- a/Spigot-Server-Patches/0061-Allow-Reloading-of-Custom-Permissions.patch +++ b/Spigot-Server-Patches/0062-Allow-Reloading-of-Custom-Permissions.patch @@ -6,12 +6,12 @@ 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 da3bf7ce01435284108f9bc614534646379afc47..025abb797de805f9fdfee8aaac77c4f098044bf1 100644 +index 499e2da0c9085cfffdb882df9801d654f4804d7f..5bbf334d9621822ffc0e731c6dbd26644a5e80d7 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2186,5 +2186,23 @@ public final class CraftServer implements Server { - return null; +@@ -2243,5 +2243,23 @@ public final class CraftServer implements Server { } + return this.adventure$audiences; } + + @Override diff --git a/Spigot-Server-Patches/0062-Remove-Metadata-on-reload.patch b/Spigot-Server-Patches/0063-Remove-Metadata-on-reload.patch similarity index 88% rename from Spigot-Server-Patches/0062-Remove-Metadata-on-reload.patch rename to Spigot-Server-Patches/0063-Remove-Metadata-on-reload.patch index ced7749ab4..9b5b3088ae 100644 --- a/Spigot-Server-Patches/0062-Remove-Metadata-on-reload.patch +++ b/Spigot-Server-Patches/0063-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 025abb797de805f9fdfee8aaac77c4f098044bf1..92d286a8f1f2d222e456be01e355b703fc412d64 100644 +index 5bbf334d9621822ffc0e731c6dbd26644a5e80d7..0dd537392e0fdbd42466c39d69b03ea3c68c5fb6 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -870,8 +870,18 @@ public final class CraftServer implements Server { +@@ -874,8 +874,18 @@ public final class CraftServer implements Server { world.paperConfig.init(); // Paper } diff --git a/Spigot-Server-Patches/0063-Handle-Item-Meta-Inconsistencies.patch b/Spigot-Server-Patches/0064-Handle-Item-Meta-Inconsistencies.patch similarity index 98% rename from Spigot-Server-Patches/0063-Handle-Item-Meta-Inconsistencies.patch rename to Spigot-Server-Patches/0064-Handle-Item-Meta-Inconsistencies.patch index 7af370d2f5..57b2d03628 100644 --- a/Spigot-Server-Patches/0063-Handle-Item-Meta-Inconsistencies.patch +++ b/Spigot-Server-Patches/0064-Handle-Item-Meta-Inconsistencies.patch @@ -194,7 +194,7 @@ index 721a1c6bd4505cb132e7004c45b795d4959389e3..9913d0136841dac35b6649cb1afbe1e9 static Map getEnchantments(net.minecraft.server.ItemStack item) { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index 60e04343b4b10b1de0bbd033b148a9da41b66aad..9a41ad703ce382670f11cf84c4644d53f0e3cd1d 100644 +index ac6be3da812c927a5486809c096b5a2e1aba617b..da1af372453b0e32177454d87437bda5c5b530d0 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -6,6 +6,7 @@ import com.google.common.collect.ImmutableList; @@ -280,7 +280,7 @@ index 60e04343b4b10b1de0bbd033b148a9da41b66aad..9a41ad703ce382670f11cf84c4644d53 for (Map.Entry entry : ench.entrySet()) { // Doctor older enchants String enchantKey = entry.getKey().toString(); -@@ -803,14 +806,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -827,14 +830,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @Override public Map getEnchants() { @@ -297,7 +297,7 @@ index 60e04343b4b10b1de0bbd033b148a9da41b66aad..9a41ad703ce382670f11cf84c4644d53 } if (ignoreRestrictions || level >= ench.getStartLevel() && level <= ench.getMaxLevel()) { -@@ -1191,7 +1194,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1215,7 +1218,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { clone.customModelData = this.customModelData; clone.blockData = this.blockData; if (this.enchantments != null) { @@ -306,7 +306,7 @@ index 60e04343b4b10b1de0bbd033b148a9da41b66aad..9a41ad703ce382670f11cf84c4644d53 } if (this.hasAttributeModifiers()) { clone.attributeModifiers = LinkedHashMultimap.create(this.attributeModifiers); -@@ -1423,4 +1426,22 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1447,4 +1450,22 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { return HANDLED_TAGS; } } diff --git a/Spigot-Server-Patches/0064-Configurable-Non-Player-Arrow-Despawn-Rate.patch b/Spigot-Server-Patches/0065-Configurable-Non-Player-Arrow-Despawn-Rate.patch similarity index 100% rename from Spigot-Server-Patches/0064-Configurable-Non-Player-Arrow-Despawn-Rate.patch rename to Spigot-Server-Patches/0065-Configurable-Non-Player-Arrow-Despawn-Rate.patch diff --git a/Spigot-Server-Patches/0065-Add-World-Util-Methods.patch b/Spigot-Server-Patches/0066-Add-World-Util-Methods.patch similarity index 97% rename from Spigot-Server-Patches/0065-Add-World-Util-Methods.patch rename to Spigot-Server-Patches/0066-Add-World-Util-Methods.patch index 79522c0a15..ebd45acb9d 100644 --- a/Spigot-Server-Patches/0065-Add-World-Util-Methods.patch +++ b/Spigot-Server-Patches/0066-Add-World-Util-Methods.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Add World Util Methods Methods that can be used for other patches to help improve logic. diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 3638ae7c0eba5b1ef811bc1629334e9c483bef6f..4a25c3d77a960dd256aeffdac08bb035b9429f63 100644 +index 1c54c081c6ea1f422c19db1aa9e1935ce066d910..4aa4a8d10b5126125ae420037c5e1faabdbe147b 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -245,11 +245,27 @@ public abstract class World implements GeneratorAccess, AutoCloseable { diff --git a/Spigot-Server-Patches/0066-Custom-replacement-for-eaten-items.patch b/Spigot-Server-Patches/0067-Custom-replacement-for-eaten-items.patch similarity index 100% rename from Spigot-Server-Patches/0066-Custom-replacement-for-eaten-items.patch rename to Spigot-Server-Patches/0067-Custom-replacement-for-eaten-items.patch diff --git a/Spigot-Server-Patches/0067-handle-NaN-health-absorb-values-and-repair-bad-data.patch b/Spigot-Server-Patches/0068-handle-NaN-health-absorb-values-and-repair-bad-data.patch similarity index 93% rename from Spigot-Server-Patches/0067-handle-NaN-health-absorb-values-and-repair-bad-data.patch rename to Spigot-Server-Patches/0068-handle-NaN-health-absorb-values-and-repair-bad-data.patch index 89d2dedb36..56afd02127 100644 --- a/Spigot-Server-Patches/0067-handle-NaN-health-absorb-values-and-repair-bad-data.patch +++ b/Spigot-Server-Patches/0068-handle-NaN-health-absorb-values-and-repair-bad-data.patch @@ -44,10 +44,10 @@ index a001629eda462ba34555aed6fe162078c18e0c02..d20f405287fb25fd4b221345b0845a0c } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 5e3b36c1cc3346b2a1b6f84ea4a412beaff8b7b3..35c6c4871f21157fe349e87cb8fd0d5ab77a8c2a 100644 +index 0c5d3360cbd38b0ac32e115b2b889e6d24dc4164..b118be95ac05300278435f3d1c2d759fbba7e942 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1629,6 +1629,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1699,6 +1699,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } public void setRealHealth(double health) { diff --git a/Spigot-Server-Patches/0068-Use-a-Shared-Random-for-Entities.patch b/Spigot-Server-Patches/0069-Use-a-Shared-Random-for-Entities.patch similarity index 94% rename from Spigot-Server-Patches/0068-Use-a-Shared-Random-for-Entities.patch rename to Spigot-Server-Patches/0069-Use-a-Shared-Random-for-Entities.patch index b2d14878db..7224678d23 100644 --- a/Spigot-Server-Patches/0068-Use-a-Shared-Random-for-Entities.patch +++ b/Spigot-Server-Patches/0069-Use-a-Shared-Random-for-Entities.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Use a Shared Random for Entities Reduces memory usage and provides ensures more randomness, Especially since a lot of garbage entity objects get created. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 99edd9811f9bd9f2150fcc83459d58063156ca26..487d041999fd1edc4b48790dbc975cf8cea8ba54 100644 +index 31857636a08eeb281b4d21dd72811d40eb00055c..dba28796a921beda2e5d15ba1565c55f54e36435 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -58,6 +58,21 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/0069-Configurable-spawn-chances-for-skeleton-horses.patch b/Spigot-Server-Patches/0070-Configurable-spawn-chances-for-skeleton-horses.patch similarity index 100% rename from Spigot-Server-Patches/0069-Configurable-spawn-chances-for-skeleton-horses.patch rename to Spigot-Server-Patches/0070-Configurable-spawn-chances-for-skeleton-horses.patch diff --git a/Spigot-Server-Patches/0070-Optimize-isValidLocation-getType-and-getBlockData-fo.patch b/Spigot-Server-Patches/0071-Optimize-isValidLocation-getType-and-getBlockData-fo.patch similarity index 98% rename from Spigot-Server-Patches/0070-Optimize-isValidLocation-getType-and-getBlockData-fo.patch rename to Spigot-Server-Patches/0071-Optimize-isValidLocation-getType-and-getBlockData-fo.patch index 0b68e4649e..d4c2fb09ff 100644 --- a/Spigot-Server-Patches/0070-Optimize-isValidLocation-getType-and-getBlockData-fo.patch +++ b/Spigot-Server-Patches/0071-Optimize-isValidLocation-getType-and-getBlockData-fo.patch @@ -33,7 +33,7 @@ index f6a5ebd4c7ec045c8dd6841831f8fcc0b32d964e..63a9ce32fb8b98695e104f7d820cd9b1 this.a = i; this.b = j; diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 01655fd86f9a3218036f8b5404e233d32e0904a5..9ef17a2ad31c8e11ba433b49aa9a31cf8df57dc8 100644 +index 81c6ce3ba87da692675bca8b2831a90fabfa4e37..b6ff6095543d720382786e159a9f1cdd6eb6f166 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -312,12 +312,27 @@ public class Chunk implements IChunkAccess { @@ -192,7 +192,7 @@ index 5cfddbfe0bd84c994ed7fa4968bcf4fc13381001..420bf7116def909d3dd7dc9a79972344 @Override public Fluid getFluid(BlockPosition blockposition) { diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 4a25c3d77a960dd256aeffdac08bb035b9429f63..7c6127739f1d88ee0dc411db5fcaa37d7fff36f7 100644 +index 4aa4a8d10b5126125ae420037c5e1faabdbe147b..096a1d3bf0e9c51244ecd9ad2fbd240f3e01f461 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -187,7 +187,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { diff --git a/Spigot-Server-Patches/0071-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch b/Spigot-Server-Patches/0072-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch similarity index 98% rename from Spigot-Server-Patches/0071-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch rename to Spigot-Server-Patches/0072-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch index eba6614858..4bbf6f42c2 100644 --- a/Spigot-Server-Patches/0071-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch +++ b/Spigot-Server-Patches/0072-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch @@ -44,7 +44,7 @@ index 5b4b6810586761072a790b7bbe3368d26cd5bb13..a3913ee0756f79159ea0671c9041ab68 this.methodProfiler.a(() -> { return worldserver + " " + worldserver.getDimensionKey().a(); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 7c6127739f1d88ee0dc411db5fcaa37d7fff36f7..5ce86030a71c181c4c28b8934be4fa8c7eafc299 100644 +index 096a1d3bf0e9c51244ecd9ad2fbd240f3e01f461..e04d2182915ca3ac69353ef967ae3f703ab9fc30 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -406,7 +406,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { diff --git a/Spigot-Server-Patches/0072-Entity-AddTo-RemoveFrom-World-Events.patch b/Spigot-Server-Patches/0073-Entity-AddTo-RemoveFrom-World-Events.patch similarity index 100% rename from Spigot-Server-Patches/0072-Entity-AddTo-RemoveFrom-World-Events.patch rename to Spigot-Server-Patches/0073-Entity-AddTo-RemoveFrom-World-Events.patch diff --git a/Spigot-Server-Patches/0073-Configurable-Chunk-Inhabited-Time.patch b/Spigot-Server-Patches/0074-Configurable-Chunk-Inhabited-Time.patch similarity index 92% rename from Spigot-Server-Patches/0073-Configurable-Chunk-Inhabited-Time.patch rename to Spigot-Server-Patches/0074-Configurable-Chunk-Inhabited-Time.patch index f3ecbeea8b..7898d4b537 100644 --- a/Spigot-Server-Patches/0073-Configurable-Chunk-Inhabited-Time.patch +++ b/Spigot-Server-Patches/0074-Configurable-Chunk-Inhabited-Time.patch @@ -30,10 +30,10 @@ index cd64fb9d0c6d123e1c86cb33f12cd9cefc9f80d0..74ba5dbb83c13ce1721619b755036a78 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 9ef17a2ad31c8e11ba433b49aa9a31cf8df57dc8..83858165764a7459843433de1a077037692a2a97 100644 +index b6ff6095543d720382786e159a9f1cdd6eb6f166..f9ad646f3061914e55e424602abe27da7f1c0865 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -986,7 +986,7 @@ public class Chunk implements IChunkAccess { +@@ -984,7 +984,7 @@ public class Chunk implements IChunkAccess { @Override public long getInhabitedTime() { diff --git a/Spigot-Server-Patches/0074-EntityPathfindEvent.patch b/Spigot-Server-Patches/0075-EntityPathfindEvent.patch similarity index 100% rename from Spigot-Server-Patches/0074-EntityPathfindEvent.patch rename to Spigot-Server-Patches/0075-EntityPathfindEvent.patch diff --git a/Spigot-Server-Patches/0075-Sanitise-RegionFileCache-and-make-configurable.patch b/Spigot-Server-Patches/0076-Sanitise-RegionFileCache-and-make-configurable.patch similarity index 100% rename from Spigot-Server-Patches/0075-Sanitise-RegionFileCache-and-make-configurable.patch rename to Spigot-Server-Patches/0076-Sanitise-RegionFileCache-and-make-configurable.patch diff --git a/Spigot-Server-Patches/0076-Do-not-load-chunks-for-Pathfinding.patch b/Spigot-Server-Patches/0077-Do-not-load-chunks-for-Pathfinding.patch similarity index 100% rename from Spigot-Server-Patches/0076-Do-not-load-chunks-for-Pathfinding.patch rename to Spigot-Server-Patches/0077-Do-not-load-chunks-for-Pathfinding.patch diff --git a/Spigot-Server-Patches/0077-Add-PlayerUseUnknownEntityEvent.patch b/Spigot-Server-Patches/0078-Add-PlayerUseUnknownEntityEvent.patch similarity index 91% rename from Spigot-Server-Patches/0077-Add-PlayerUseUnknownEntityEvent.patch rename to Spigot-Server-Patches/0078-Add-PlayerUseUnknownEntityEvent.patch index 149fae3974..d555a7a405 100644 --- a/Spigot-Server-Patches/0077-Add-PlayerUseUnknownEntityEvent.patch +++ b/Spigot-Server-Patches/0078-Add-PlayerUseUnknownEntityEvent.patch @@ -18,10 +18,10 @@ index 49c911e54eb3b20d820f3e1895c057eead6d312b..09c757a3bb1d9a49343cf58e18f736e1 private Vec3D c; private EnumHand d; diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index a6596d17a6c942061d98fed2cbb71045c7d3849f..12f521d96a47a39b7e8e5b0f95a47286ac7a5247 100644 +index 3f482b20c4486fce2b1324a9c58d0af1bd357444..9430ddad295fb6cc49656d79041df2f9410a7505 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -2041,6 +2041,16 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -2053,6 +2053,16 @@ public class PlayerConnection implements PacketListenerPlayIn { } } } diff --git a/Spigot-Server-Patches/0078-Fix-reducedDebugInfo-not-initialized-on-client.patch b/Spigot-Server-Patches/0079-Fix-reducedDebugInfo-not-initialized-on-client.patch similarity index 88% rename from Spigot-Server-Patches/0078-Fix-reducedDebugInfo-not-initialized-on-client.patch rename to Spigot-Server-Patches/0079-Fix-reducedDebugInfo-not-initialized-on-client.patch index eb48a68d00..997fa3f3c4 100644 --- a/Spigot-Server-Patches/0078-Fix-reducedDebugInfo-not-initialized-on-client.patch +++ b/Spigot-Server-Patches/0079-Fix-reducedDebugInfo-not-initialized-on-client.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix reducedDebugInfo not initialized on client diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 3b7c4c611e8936faef09f3bec80f96037e45d77d..8d12df108d32819f5dc87a8ee5e9578a900a0e93 100644 +index fedc9e453cdf17c1b69c87de9fa32a145d4b6f70..430d86aba42de6de057a78d78e9d8c41bc6fd680 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -174,6 +174,7 @@ public abstract class PlayerList { +@@ -176,6 +176,7 @@ public abstract class PlayerList { playerconnection.sendPacket(new PacketPlayOutHeldItemSlot(entityplayer.inventory.itemInHandIndex)); playerconnection.sendPacket(new PacketPlayOutRecipeUpdate(this.server.getCraftingManager().b())); playerconnection.sendPacket(new PacketPlayOutTags(this.server.getTagRegistry())); diff --git a/Spigot-Server-Patches/0079-Configurable-Grass-Spread-Tick-Rate.patch b/Spigot-Server-Patches/0080-Configurable-Grass-Spread-Tick-Rate.patch similarity index 100% rename from Spigot-Server-Patches/0079-Configurable-Grass-Spread-Tick-Rate.patch rename to Spigot-Server-Patches/0080-Configurable-Grass-Spread-Tick-Rate.patch diff --git a/Spigot-Server-Patches/0080-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch b/Spigot-Server-Patches/0081-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch similarity index 90% rename from Spigot-Server-Patches/0080-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch rename to Spigot-Server-Patches/0081-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch index cdc99defce..118e8cdcbd 100644 --- a/Spigot-Server-Patches/0080-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch +++ b/Spigot-Server-Patches/0081-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix Cancelling BlockPlaceEvent triggering physics diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 5ce86030a71c181c4c28b8934be4fa8c7eafc299..d6ee6aae693519a379b4a6ba26642d5ef78e4deb 100644 +index e04d2182915ca3ac69353ef967ae3f703ab9fc30..3dd789131e8ebe5ac82b1fac2cd15aa5893704ee 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -466,6 +466,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { diff --git a/Spigot-Server-Patches/0081-Optimize-DataBits.patch b/Spigot-Server-Patches/0082-Optimize-DataBits.patch similarity index 100% rename from Spigot-Server-Patches/0081-Optimize-DataBits.patch rename to Spigot-Server-Patches/0082-Optimize-DataBits.patch diff --git a/Spigot-Server-Patches/0082-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch b/Spigot-Server-Patches/0082-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch deleted file mode 100644 index e09c82992c..0000000000 --- a/Spigot-Server-Patches/0082-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Zach Brown -Date: Wed, 6 Apr 2016 01:04:23 -0500 -Subject: [PATCH] Option to use vanilla per-world scoreboard coloring on names - -This change is basically a bandaid to fix CB's complete and utter lack -of support for vanilla scoreboard name modifications. - -In the future, finding a way to merge the vanilla expectations in with -bukkit's concept of a display name would be preferable. There was a PR -for this on CB at one point but I can't find it. We may need to do this -ourselves at some point in the future. - -diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index db2dddd12f54e6d15916c4cee623676541de37fb..1942f5224aaebb18adb591d6f70a419cfc1a7bdd 100644 ---- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -254,4 +254,9 @@ public class PaperWorldConfig { - grassUpdateRate = Math.max(0, getInt("grass-spread-tick-rate", grassUpdateRate)); - log("Grass Spread Tick Rate: " + grassUpdateRate); - } -+ -+ public boolean useVanillaScoreboardColoring; -+ private void useVanillaScoreboardColoring() { -+ useVanillaScoreboardColoring = getBoolean("use-vanilla-world-scoreboard-name-coloring", false); -+ } - } -diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 12f521d96a47a39b7e8e5b0f95a47286ac7a5247..638402acdaf841a59febc83d2c1f00fbbab7b646 100644 ---- a/src/main/java/net/minecraft/server/PlayerConnection.java -+++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -1778,7 +1778,16 @@ public class PlayerConnection implements PacketListenerPlayIn { - return; - } - -- s = String.format(event.getFormat(), event.getPlayer().getDisplayName(), event.getMessage()); -+ // Paper Start - (Meh) Support for vanilla world scoreboard name coloring -+ String displayName = event.getPlayer().getDisplayName(); -+ if (this.player.getWorld().paperConfig.useVanillaScoreboardColoring) { -+ IChatBaseComponent nameFromTeam = ScoreboardTeam.a(this.player.getScoreboardTeam(), ((CraftPlayer) player).getHandle().getDisplayName()); -+ // Explicitly add a RESET here, vanilla uses components for this now... -+ displayName = new net.md_5.bungee.api.chat.TextComponent(net.md_5.bungee.chat.ComponentSerializer.parse(IChatBaseComponent.ChatSerializer.componentToJson(nameFromTeam))).toLegacyText() + org.bukkit.ChatColor.RESET; -+ } -+ -+ s = String.format(event.getFormat(), displayName, event.getMessage()); -+ // Paper end - minecraftServer.console.sendMessage(s); - if (((LazyPlayerSet) event.getRecipients()).isLazy()) { - for (Object recipient : minecraftServer.getPlayerList().players) { diff --git a/Spigot-Server-Patches/0083-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch b/Spigot-Server-Patches/0083-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch new file mode 100644 index 0000000000..215ae5a596 --- /dev/null +++ b/Spigot-Server-Patches/0083-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch @@ -0,0 +1,75 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Zach Brown +Date: Wed, 6 Apr 2016 01:04:23 -0500 +Subject: [PATCH] Option to use vanilla per-world scoreboard coloring on names + +This change is basically a bandaid to fix CB's complete and utter lack +of support for vanilla scoreboard name modifications. + +In the future, finding a way to merge the vanilla expectations in with +bukkit's concept of a display name would be preferable. There was a PR +for this on CB at one point but I can't find it. We may need to do this +ourselves at some point in the future. + +diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +index db2dddd12f54e6d15916c4cee623676541de37fb..1942f5224aaebb18adb591d6f70a419cfc1a7bdd 100644 +--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java ++++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +@@ -254,4 +254,9 @@ public class PaperWorldConfig { + grassUpdateRate = Math.max(0, getInt("grass-spread-tick-rate", grassUpdateRate)); + log("Grass Spread Tick Rate: " + grassUpdateRate); + } ++ ++ public boolean useVanillaScoreboardColoring; ++ private void useVanillaScoreboardColoring() { ++ useVanillaScoreboardColoring = getBoolean("use-vanilla-world-scoreboard-name-coloring", false); ++ } + } +diff --git a/src/main/java/io/papermc/paper/adventure/VanillaChatMessageLogic.java b/src/main/java/io/papermc/paper/adventure/VanillaChatMessageLogic.java +index 39c1e750ae1270ca780a5d8624f8daa45bd27637..215123a2162841fbbced5e070c1bef1981c7a380 100644 +--- a/src/main/java/io/papermc/paper/adventure/VanillaChatMessageLogic.java ++++ b/src/main/java/io/papermc/paper/adventure/VanillaChatMessageLogic.java +@@ -5,11 +5,21 @@ import java.util.regex.MatchResult; + import net.kyori.adventure.text.Component; + import net.kyori.adventure.text.ComponentLike; + import net.kyori.adventure.text.TextComponent; ++import net.kyori.adventure.text.format.NamedTextColor; ++import net.kyori.adventure.text.format.Style; + import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer; ++import net.minecraft.server.IChatBaseComponent; ++import net.minecraft.server.ScoreboardTeam; ++import org.bukkit.craftbukkit.CraftWorld; + import org.bukkit.craftbukkit.entity.CraftPlayer; + + public class VanillaChatMessageLogic { + public static Component displayNameForChat(final CraftPlayer player) { ++ if (((CraftWorld) player.getWorld()).getHandle().paperConfig.useVanillaScoreboardColoring) { ++ IChatBaseComponent nameFromTeam = ScoreboardTeam.a(player.getHandle().getScoreboardTeam(), player.getHandle().getDisplayName()); ++ // Explicitly add a RESET here, vanilla uses components for this now... ++ return PaperAdventure.asAdventure(nameFromTeam); ++ } + return player.displayName(); + } + +diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java +index 9430ddad295fb6cc49656d79041df2f9410a7505..3d81636634fdc4cd0fb51e7e19df3620f7dc64b7 100644 +--- a/src/main/java/net/minecraft/server/PlayerConnection.java ++++ b/src/main/java/net/minecraft/server/PlayerConnection.java +@@ -1733,7 +1733,7 @@ public class PlayerConnection implements PacketListenerPlayIn { + } else if (this.player.getChatFlags() == EnumChatVisibility.SYSTEM) { + // Do nothing, this is coming from a plugin + } else { +- Player player = this.getPlayer(); ++ CraftPlayer player = this.getPlayer(); // Paper + AsyncPlayerChatEvent event = new AsyncPlayerChatEvent(async, player, s, new LazyPlayerSet(minecraftServer)); + this.server.getPluginManager().callEvent(event); + +@@ -1750,7 +1750,7 @@ public class PlayerConnection implements PacketListenerPlayIn { + return null; + } + +- final net.kyori.adventure.text.Component adventure$msg = VanillaChatMessageLogic.formatChat(VanillaChatMessageLogic.displayNameForChat((CraftPlayer) player), queueEvent.getFormat(), queueEvent.getMessage()); // Paper ++ final net.kyori.adventure.text.Component adventure$msg = VanillaChatMessageLogic.formatChat(VanillaChatMessageLogic.displayNameForChat(player), queueEvent.getFormat(), queueEvent.getMessage()); // Paper + //String message = String.format(queueEvent.getFormat(), queueEvent.getPlayer().getDisplayName(), queueEvent.getMessage()); // Paper - comment + //PlayerConnection.this.minecraftServer.console.sendMessage(message); // Paper - comment + PlayerConnection.this.minecraftServer.console.sendMessage(adventure$msg); // Paper diff --git a/Spigot-Server-Patches/0083-Workaround-for-setting-passengers-on-players.patch b/Spigot-Server-Patches/0084-Workaround-for-setting-passengers-on-players.patch similarity index 87% rename from Spigot-Server-Patches/0083-Workaround-for-setting-passengers-on-players.patch rename to Spigot-Server-Patches/0084-Workaround-for-setting-passengers-on-players.patch index efbba57c28..4178b914d3 100644 --- a/Spigot-Server-Patches/0083-Workaround-for-setting-passengers-on-players.patch +++ b/Spigot-Server-Patches/0084-Workaround-for-setting-passengers-on-players.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Workaround for setting passengers on players SPIGOT-1915 & GH-114 diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 35c6c4871f21157fe349e87cb8fd0d5ab77a8c2a..c1205594a8da1a28ac9ee30d1d70f1011f0a2327 100644 +index b118be95ac05300278435f3d1c2d759fbba7e942..2d8228878bbf17a0a9c77ccc67b40a9a833cb37d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -791,6 +791,17 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -861,6 +861,17 @@ public class CraftPlayer extends CraftHumanEntity implements Player { return true; } diff --git a/Spigot-Server-Patches/0084-Remove-unused-World-Tile-Entity-List.patch b/Spigot-Server-Patches/0085-Remove-unused-World-Tile-Entity-List.patch similarity index 90% rename from Spigot-Server-Patches/0084-Remove-unused-World-Tile-Entity-List.patch rename to Spigot-Server-Patches/0085-Remove-unused-World-Tile-Entity-List.patch index a6188cbf9a..f2b040421b 100644 --- a/Spigot-Server-Patches/0084-Remove-unused-World-Tile-Entity-List.patch +++ b/Spigot-Server-Patches/0085-Remove-unused-World-Tile-Entity-List.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Remove unused World Tile Entity List Massive hit to performance and it is completely unnecessary. diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index d6ee6aae693519a379b4a6ba26642d5ef78e4deb..369a6b42a89fd75aeb3da4930f47b6917a1ae393 100644 +index 3dd789131e8ebe5ac82b1fac2cd15aa5893704ee..05bd9dd542ddb2508cb0c7138833371b52f1164e 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -39,7 +39,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { @@ -39,7 +39,7 @@ index d6ee6aae693519a379b4a6ba26642d5ef78e4deb..369a6b42a89fd75aeb3da4930f47b691 this.tileEntityListUnload.clear(); } -@@ -729,7 +729,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -730,7 +730,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { tilesThisCycle--; this.tileEntityListTick.remove(tileTickPosition--); // Spigot end @@ -48,7 +48,7 @@ index d6ee6aae693519a379b4a6ba26642d5ef78e4deb..369a6b42a89fd75aeb3da4930f47b691 if (this.isLoaded(tileentity.getPosition())) { this.getChunkAtWorldCoords(tileentity.getPosition()).removeTileEntity(tileentity.getPosition()); } -@@ -759,7 +759,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -760,7 +760,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { this.notify(tileentity1.getPosition(), iblockdata, iblockdata, 3); // CraftBukkit start // From above, don't screw this up - SPIGOT-1746 @@ -57,7 +57,7 @@ index d6ee6aae693519a379b4a6ba26642d5ef78e4deb..369a6b42a89fd75aeb3da4930f47b691 this.a(tileentity1); } // CraftBukkit end -@@ -905,7 +905,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -906,7 +906,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { } else { if (tileentity != null) { this.tileEntityListPending.remove(tileentity); @@ -67,10 +67,10 @@ index d6ee6aae693519a379b4a6ba26642d5ef78e4deb..369a6b42a89fd75aeb3da4930f47b691 } diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index dbb022fb186b181b9b1912adfaebbb00fa1c7d4b..486ba1efc934c6851d2b570493af6e1079a7abd5 100644 +index d199191220b5afc42d639f316878501c91514a50..4be09328cea0808c3a41681aea860cd04f799bbd 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1611,7 +1611,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1600,7 +1600,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { } bufferedwriter.write(String.format("entities: %d\n", this.entitiesById.size())); @@ -79,7 +79,7 @@ index dbb022fb186b181b9b1912adfaebbb00fa1c7d4b..486ba1efc934c6851d2b570493af6e10 bufferedwriter.write(String.format("block_ticks: %d\n", this.getBlockTickList().a())); bufferedwriter.write(String.format("fluid_ticks: %d\n", this.getFluidTickList().a())); bufferedwriter.write("distance_manager: " + playerchunkmap.e().c() + "\n"); -@@ -1750,7 +1750,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1739,7 +1739,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { private void a(Writer writer) throws IOException { CSVWriter csvwriter = CSVWriter.a().a("x").a("y").a("z").a("type").a(writer); diff --git a/Spigot-Server-Patches/0085-Don-t-tick-Skulls-unused-code.patch b/Spigot-Server-Patches/0086-Don-t-tick-Skulls-unused-code.patch similarity index 100% rename from Spigot-Server-Patches/0085-Don-t-tick-Skulls-unused-code.patch rename to Spigot-Server-Patches/0086-Don-t-tick-Skulls-unused-code.patch diff --git a/Spigot-Server-Patches/0086-Configurable-Player-Collision.patch b/Spigot-Server-Patches/0087-Configurable-Player-Collision.patch similarity index 97% rename from Spigot-Server-Patches/0086-Configurable-Player-Collision.patch rename to Spigot-Server-Patches/0087-Configurable-Player-Collision.patch index 42e8a32242..d6de975ed6 100644 --- a/Spigot-Server-Patches/0086-Configurable-Player-Collision.patch +++ b/Spigot-Server-Patches/0087-Configurable-Player-Collision.patch @@ -57,10 +57,10 @@ index d1581c9d9838797eb425020d21bd0fba432e5652..99dc43159f240135957aee35f6129f19 packetdataserializer.a(this.c); packetdataserializer.a(this.d); diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 8d12df108d32819f5dc87a8ee5e9578a900a0e93..234a6e73122c68358029ce2d578d82ab92ad5b45 100644 +index 430d86aba42de6de057a78d78e9d8c41bc6fd680..a1ec2ae7c3152019b3d01166547e6931d4bf2b57 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -75,6 +75,7 @@ public abstract class PlayerList { +@@ -77,6 +77,7 @@ public abstract class PlayerList { // CraftBukkit start private CraftServer cserver; private final Map playersByName = new java.util.HashMap<>(); diff --git a/Spigot-Server-Patches/0087-Add-handshake-event-to-allow-plugins-to-handle-clien.patch b/Spigot-Server-Patches/0088-Add-handshake-event-to-allow-plugins-to-handle-clien.patch similarity index 100% rename from Spigot-Server-Patches/0087-Add-handshake-event-to-allow-plugins-to-handle-clien.patch rename to Spigot-Server-Patches/0088-Add-handshake-event-to-allow-plugins-to-handle-clien.patch diff --git a/Spigot-Server-Patches/0088-Configurable-RCON-IP-address.patch b/Spigot-Server-Patches/0089-Configurable-RCON-IP-address.patch similarity index 100% rename from Spigot-Server-Patches/0088-Configurable-RCON-IP-address.patch rename to Spigot-Server-Patches/0089-Configurable-RCON-IP-address.patch diff --git a/Spigot-Server-Patches/0089-Prevent-Fire-from-loading-chunks-wrongly-spread.patch b/Spigot-Server-Patches/0090-Prevent-Fire-from-loading-chunks-wrongly-spread.patch similarity index 100% rename from Spigot-Server-Patches/0089-Prevent-Fire-from-loading-chunks-wrongly-spread.patch rename to Spigot-Server-Patches/0090-Prevent-Fire-from-loading-chunks-wrongly-spread.patch diff --git a/Spigot-Server-Patches/0090-Implement-PlayerLocaleChangeEvent.patch b/Spigot-Server-Patches/0091-Implement-PlayerLocaleChangeEvent.patch similarity index 75% rename from Spigot-Server-Patches/0090-Implement-PlayerLocaleChangeEvent.patch rename to Spigot-Server-Patches/0091-Implement-PlayerLocaleChangeEvent.patch index f98673a19c..eeed1f6e92 100644 --- a/Spigot-Server-Patches/0090-Implement-PlayerLocaleChangeEvent.patch +++ b/Spigot-Server-Patches/0091-Implement-PlayerLocaleChangeEvent.patch @@ -5,18 +5,19 @@ Subject: [PATCH] Implement PlayerLocaleChangeEvent diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 46754524a7a4a3087f56ab5460e3dac665c06052..d82643dd24fbd4b35dc526292d6f66234617857f 100644 +index 5dd83b62d8d6f8f7b8483064be5658a439824052..89b1561bfce8b0a0b34e3f2ce706e3149fb5949d 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -1561,16 +1561,17 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1558,7 +1558,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { return s; } - public String locale = "en_us"; // CraftBukkit - add, lowercase -+ public String locale = null; // CraftBukkit - lowercase // Paper - default to null ++ public String locale = null; // CraftBukkit - add, lowercase // Paper - default to null + public java.util.Locale adventure$locale = java.util.Locale.US; // Paper public void a(PacketPlayInSettings packetplayinsettings) { // CraftBukkit start - if (getMainHand() != packetplayinsettings.getMainHand()) { +@@ -1566,9 +1566,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting { PlayerChangedMainHandEvent event = new PlayerChangedMainHandEvent(getBukkitEntity(), getMainHand() == EnumMainHand.LEFT ? MainHand.LEFT : MainHand.RIGHT); this.server.server.getPluginManager().callEvent(event); } @@ -27,13 +28,13 @@ index 46754524a7a4a3087f56ab5460e3dac665c06052..d82643dd24fbd4b35dc526292d6f6623 + new com.destroystokyo.paper.event.player.PlayerLocaleChangeEvent(this.getBukkitEntity(), this.locale, packetplayinsettings.locale).callEvent(); // Paper } this.locale = packetplayinsettings.locale; - this.clientViewDistance = packetplayinsettings.viewDistance; + // Paper start diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index c1205594a8da1a28ac9ee30d1d70f1011f0a2327..0c2637ae7e01535088bf9177f5ccf1b1bade98e9 100644 +index 2d8228878bbf17a0a9c77ccc67b40a9a833cb37d..b5f296b23f5ed30f855fec79775d0026ff2f1d6e 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1815,8 +1815,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { - +@@ -1891,8 +1891,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { + // Paper end @Override public String getLocale() { - return getHandle().locale; diff --git a/Spigot-Server-Patches/0091-EntityRegainHealthEvent-isFastRegen-API.patch b/Spigot-Server-Patches/0092-EntityRegainHealthEvent-isFastRegen-API.patch similarity index 100% rename from Spigot-Server-Patches/0091-EntityRegainHealthEvent-isFastRegen-API.patch rename to Spigot-Server-Patches/0092-EntityRegainHealthEvent-isFastRegen-API.patch diff --git a/Spigot-Server-Patches/0092-Add-ability-to-configure-frosted_ice-properties.patch b/Spigot-Server-Patches/0093-Add-ability-to-configure-frosted_ice-properties.patch similarity index 100% rename from Spigot-Server-Patches/0092-Add-ability-to-configure-frosted_ice-properties.patch rename to Spigot-Server-Patches/0093-Add-ability-to-configure-frosted_ice-properties.patch diff --git a/Spigot-Server-Patches/0093-remove-null-possibility-for-getServer-singleton.patch b/Spigot-Server-Patches/0094-remove-null-possibility-for-getServer-singleton.patch similarity index 100% rename from Spigot-Server-Patches/0093-remove-null-possibility-for-getServer-singleton.patch rename to Spigot-Server-Patches/0094-remove-null-possibility-for-getServer-singleton.patch diff --git a/Spigot-Server-Patches/0094-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch b/Spigot-Server-Patches/0095-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch similarity index 93% rename from Spigot-Server-Patches/0094-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch rename to Spigot-Server-Patches/0095-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch index 32958c224f..6b82dc4107 100644 --- a/Spigot-Server-Patches/0094-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch +++ b/Spigot-Server-Patches/0095-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch @@ -30,10 +30,10 @@ index 371648709a63b394fb7577722c18d4b9a1738b2b..bc930015082ad6b2c5d744f823d9ad28 return entityitem; } diff --git a/src/main/java/net/minecraft/server/WorldMap.java b/src/main/java/net/minecraft/server/WorldMap.java -index e6d97e7ffae3eadac586bad078123cd4aaa69916..225353e072033d1e5aaf5604b8db255d9a154dc8 100644 +index d11725d61b888ceb08c4ea30f23d563170ce944d..7251793423e5413dacc1e031ed75d41fc35cd32e 100644 --- a/src/main/java/net/minecraft/server/WorldMap.java +++ b/src/main/java/net/minecraft/server/WorldMap.java -@@ -36,6 +36,7 @@ public class WorldMap extends PersistentBase { +@@ -37,6 +37,7 @@ public class WorldMap extends PersistentBase { private final Map m = Maps.newHashMap(); public final Map decorations = Maps.newLinkedHashMap(); private final Map n = Maps.newHashMap(); @@ -41,7 +41,7 @@ index e6d97e7ffae3eadac586bad078123cd4aaa69916..225353e072033d1e5aaf5604b8db255d // CraftBukkit start public final CraftMapView mapView; -@@ -48,6 +49,7 @@ public class WorldMap extends PersistentBase { +@@ -49,6 +50,7 @@ public class WorldMap extends PersistentBase { // CraftBukkit start mapView = new CraftMapView(this); server = (CraftServer) org.bukkit.Bukkit.getServer(); @@ -49,7 +49,7 @@ index e6d97e7ffae3eadac586bad078123cd4aaa69916..225353e072033d1e5aaf5604b8db255d // CraftBukkit end } -@@ -115,6 +117,7 @@ public class WorldMap extends PersistentBase { +@@ -116,6 +118,7 @@ public class WorldMap extends PersistentBase { this.m.put(mapiconbanner.f(), mapiconbanner); this.a(mapiconbanner.c(), (GeneratorAccess) null, mapiconbanner.f(), (double) mapiconbanner.a().getX(), (double) mapiconbanner.a().getZ(), 180.0D, mapiconbanner.d()); } @@ -57,7 +57,7 @@ index e6d97e7ffae3eadac586bad078123cd4aaa69916..225353e072033d1e5aaf5604b8db255d NBTTagList nbttaglist1 = nbttagcompound.getList("frames", 10); -@@ -195,6 +198,7 @@ public class WorldMap extends PersistentBase { +@@ -196,6 +199,7 @@ public class WorldMap extends PersistentBase { this.b(); } @@ -65,7 +65,7 @@ index e6d97e7ffae3eadac586bad078123cd4aaa69916..225353e072033d1e5aaf5604b8db255d public void a(EntityHuman entityhuman, ItemStack itemstack) { if (!this.humans.containsKey(entityhuman)) { WorldMap.WorldMapHumanTracker worldmap_worldmaphumantracker = new WorldMap.WorldMapHumanTracker(entityhuman); -@@ -430,6 +434,21 @@ public class WorldMap extends PersistentBase { +@@ -431,6 +435,21 @@ public class WorldMap extends PersistentBase { public class WorldMapHumanTracker { @@ -87,7 +87,7 @@ index e6d97e7ffae3eadac586bad078123cd4aaa69916..225353e072033d1e5aaf5604b8db255d public final EntityHuman trackee; private boolean d = true; private int e; -@@ -446,9 +465,12 @@ public class WorldMap extends PersistentBase { +@@ -447,9 +466,12 @@ public class WorldMap extends PersistentBase { @Nullable public Packet a(ItemStack itemstack) { // CraftBukkit start diff --git a/Spigot-Server-Patches/0095-LootTable-API-Replenishable-Lootables-Feature.patch b/Spigot-Server-Patches/0096-LootTable-API-Replenishable-Lootables-Feature.patch similarity index 99% rename from Spigot-Server-Patches/0095-LootTable-API-Replenishable-Lootables-Feature.patch rename to Spigot-Server-Patches/0096-LootTable-API-Replenishable-Lootables-Feature.patch index 24cde970f1..ac8c2de7bc 100644 --- a/Spigot-Server-Patches/0095-LootTable-API-Replenishable-Lootables-Feature.patch +++ b/Spigot-Server-Patches/0096-LootTable-API-Replenishable-Lootables-Feature.patch @@ -518,7 +518,7 @@ index 0000000000000000000000000000000000000000..a1923aff2b5e2e867670a5a064a76791 + } +} diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 487d041999fd1edc4b48790dbc975cf8cea8ba54..0dd63d2e0ed16eb08cf97dbf8c293e24a5a1bda9 100644 +index dba28796a921beda2e5d15ba1565c55f54e36435..df6377b5849aab20246a29b312744604b4cbf6bf 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -73,6 +73,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -646,7 +646,7 @@ index 9265bc7331f5d3cb43394a7457ab89140b731c8b..d9be182a574daaedcc7a106c759c2bde if (entityhuman != null) { diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java -index df71eb9672ecc69ac92c773925d9b692ad343fee..8a7e9302b4b6be086144add8df610b76b58e00d6 100644 +index da5a80267b189d75374375211a574ca5f18d96be..26cc40e57f5b73b9c32859bff37c4a3d94904c56 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java @@ -64,7 +64,7 @@ public class CraftBlockEntityState extends CraftBlockState diff --git a/Spigot-Server-Patches/0096-Don-t-save-empty-scoreboard-teams-to-scoreboard.dat.patch b/Spigot-Server-Patches/0097-Don-t-save-empty-scoreboard-teams-to-scoreboard.dat.patch similarity index 100% rename from Spigot-Server-Patches/0096-Don-t-save-empty-scoreboard-teams-to-scoreboard.dat.patch rename to Spigot-Server-Patches/0097-Don-t-save-empty-scoreboard-teams-to-scoreboard.dat.patch diff --git a/Spigot-Server-Patches/0097-System-property-for-disabling-watchdoge.patch b/Spigot-Server-Patches/0098-System-property-for-disabling-watchdoge.patch similarity index 100% rename from Spigot-Server-Patches/0097-System-property-for-disabling-watchdoge.patch rename to Spigot-Server-Patches/0098-System-property-for-disabling-watchdoge.patch diff --git a/Spigot-Server-Patches/0098-Optimize-UserCache-Thread-Safe.patch b/Spigot-Server-Patches/0099-Optimize-UserCache-Thread-Safe.patch similarity index 100% rename from Spigot-Server-Patches/0098-Optimize-UserCache-Thread-Safe.patch rename to Spigot-Server-Patches/0099-Optimize-UserCache-Thread-Safe.patch diff --git a/Spigot-Server-Patches/0099-Avoid-blocking-on-Network-Manager-creation.patch b/Spigot-Server-Patches/0100-Avoid-blocking-on-Network-Manager-creation.patch similarity index 100% rename from Spigot-Server-Patches/0099-Avoid-blocking-on-Network-Manager-creation.patch rename to Spigot-Server-Patches/0100-Avoid-blocking-on-Network-Manager-creation.patch diff --git a/Spigot-Server-Patches/0100-Optional-TNT-doesn-t-move-in-water.patch b/Spigot-Server-Patches/0101-Optional-TNT-doesn-t-move-in-water.patch similarity index 98% rename from Spigot-Server-Patches/0100-Optional-TNT-doesn-t-move-in-water.patch rename to Spigot-Server-Patches/0101-Optional-TNT-doesn-t-move-in-water.patch index 3d80d5d5e0..6fb1c8ea3f 100644 --- a/Spigot-Server-Patches/0100-Optional-TNT-doesn-t-move-in-water.patch +++ b/Spigot-Server-Patches/0101-Optional-TNT-doesn-t-move-in-water.patch @@ -32,7 +32,7 @@ index eb04fdb172a50ec1f5b7fe78fa0e7655246abd60..6eca3f300020006f02dd36253b522db4 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 0dd63d2e0ed16eb08cf97dbf8c293e24a5a1bda9..6aa29495802b7d52c4c0f283495c7d1762f657fa 100644 +index df6377b5849aab20246a29b312744604b4cbf6bf..7abe7bcddd3c60bfb0f290e2475d28396d5319cf 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -2681,6 +2681,11 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/0101-Faster-redstone-torch-rapid-clock-removal.patch b/Spigot-Server-Patches/0102-Faster-redstone-torch-rapid-clock-removal.patch similarity index 98% rename from Spigot-Server-Patches/0101-Faster-redstone-torch-rapid-clock-removal.patch rename to Spigot-Server-Patches/0102-Faster-redstone-torch-rapid-clock-removal.patch index 5119caba5f..5f47af71fd 100644 --- a/Spigot-Server-Patches/0101-Faster-redstone-torch-rapid-clock-removal.patch +++ b/Spigot-Server-Patches/0102-Faster-redstone-torch-rapid-clock-removal.patch @@ -77,7 +77,7 @@ index d88d435b7777f731bc0bb728ebe4d4cb31c6376e..a63a60348fe45f63deec6fcb27b6be09 public RedstoneUpdateInfo(BlockPosition blockposition, long i) { this.a = blockposition; diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 369a6b42a89fd75aeb3da4930f47b6917a1ae393..9ac1f42372a18c0907c7b0137b6a83022e3e984d 100644 +index 05bd9dd542ddb2508cb0c7138833371b52f1164e..dbc7cbba7134ff0281c6e77cd246073bba8b9ce2 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -90,6 +90,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { diff --git a/Spigot-Server-Patches/0102-Add-server-name-parameter.patch b/Spigot-Server-Patches/0103-Add-server-name-parameter.patch similarity index 100% rename from Spigot-Server-Patches/0102-Add-server-name-parameter.patch rename to Spigot-Server-Patches/0103-Add-server-name-parameter.patch diff --git a/Spigot-Server-Patches/0103-Only-send-Dragon-Wither-Death-sounds-to-same-world.patch b/Spigot-Server-Patches/0104-Only-send-Dragon-Wither-Death-sounds-to-same-world.patch similarity index 100% rename from Spigot-Server-Patches/0103-Only-send-Dragon-Wither-Death-sounds-to-same-world.patch rename to Spigot-Server-Patches/0104-Only-send-Dragon-Wither-Death-sounds-to-same-world.patch diff --git a/Spigot-Server-Patches/0104-Fix-Double-World-Add-issues.patch b/Spigot-Server-Patches/0105-Fix-Double-World-Add-issues.patch similarity index 100% rename from Spigot-Server-Patches/0104-Fix-Double-World-Add-issues.patch rename to Spigot-Server-Patches/0105-Fix-Double-World-Add-issues.patch diff --git a/Spigot-Server-Patches/0105-Fix-Old-Sign-Conversion.patch b/Spigot-Server-Patches/0106-Fix-Old-Sign-Conversion.patch similarity index 100% rename from Spigot-Server-Patches/0105-Fix-Old-Sign-Conversion.patch rename to Spigot-Server-Patches/0106-Fix-Old-Sign-Conversion.patch diff --git a/Spigot-Server-Patches/0106-Don-t-lookup-game-profiles-that-have-no-UUID-and-no-.patch b/Spigot-Server-Patches/0107-Don-t-lookup-game-profiles-that-have-no-UUID-and-no-.patch similarity index 100% rename from Spigot-Server-Patches/0106-Don-t-lookup-game-profiles-that-have-no-UUID-and-no-.patch rename to Spigot-Server-Patches/0107-Don-t-lookup-game-profiles-that-have-no-UUID-and-no-.patch diff --git a/Spigot-Server-Patches/0107-Add-setting-for-proxy-online-mode-status.patch b/Spigot-Server-Patches/0108-Add-setting-for-proxy-online-mode-status.patch similarity index 95% rename from Spigot-Server-Patches/0107-Add-setting-for-proxy-online-mode-status.patch rename to Spigot-Server-Patches/0108-Add-setting-for-proxy-online-mode-status.patch index 0f569934e0..16dcf212d8 100644 --- a/Spigot-Server-Patches/0107-Add-setting-for-proxy-online-mode-status.patch +++ b/Spigot-Server-Patches/0108-Add-setting-for-proxy-online-mode-status.patch @@ -45,10 +45,10 @@ index 060887d765604e4be82913607bb6266a278f5db6..c5957c2d6c54b076ebe7f9a432e30551 } 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 92d286a8f1f2d222e456be01e355b703fc412d64..aa21e9bf00ee0f3dbe4874f76079fb5c0843db57 100644 +index 0dd537392e0fdbd42466c39d69b03ea3c68c5fb6..027d5409ae70015cdb5469a1502f861ed466ada1 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1488,7 +1488,8 @@ public final class CraftServer implements Server { +@@ -1508,7 +1508,8 @@ public final class CraftServer implements Server { // Spigot Start GameProfile profile = null; // Only fetch an online UUID in online mode diff --git a/Spigot-Server-Patches/0108-Optimise-BlockState-s-hashCode-equals.patch b/Spigot-Server-Patches/0109-Optimise-BlockState-s-hashCode-equals.patch similarity index 100% rename from Spigot-Server-Patches/0108-Optimise-BlockState-s-hashCode-equals.patch rename to Spigot-Server-Patches/0109-Optimise-BlockState-s-hashCode-equals.patch diff --git a/Spigot-Server-Patches/0109-Configurable-packet-in-spam-threshold.patch b/Spigot-Server-Patches/0110-Configurable-packet-in-spam-threshold.patch similarity index 96% rename from Spigot-Server-Patches/0109-Configurable-packet-in-spam-threshold.patch rename to Spigot-Server-Patches/0110-Configurable-packet-in-spam-threshold.patch index 2045147f88..47d831b7e0 100644 --- a/Spigot-Server-Patches/0109-Configurable-packet-in-spam-threshold.patch +++ b/Spigot-Server-Patches/0110-Configurable-packet-in-spam-threshold.patch @@ -23,7 +23,7 @@ index 91f8d4e2f747f980a597bca533af631bbff6d6bd..5452e0f0e9b468ea3b1f832f1a2494d9 + } } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 638402acdaf841a59febc83d2c1f00fbbab7b646..577ad4e5e29f85cd3460c5dcc355b55df96252c2 100644 +index 3d81636634fdc4cd0fb51e7e19df3620f7dc64b7..fdf1d57670bf62dba7038f91df9dc589247b57ad 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -1313,13 +1313,14 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0110-Configurable-flying-kick-messages.patch b/Spigot-Server-Patches/0111-Configurable-flying-kick-messages.patch similarity index 91% rename from Spigot-Server-Patches/0110-Configurable-flying-kick-messages.patch rename to Spigot-Server-Patches/0111-Configurable-flying-kick-messages.patch index ece0aac9dc..2f304e4d66 100644 --- a/Spigot-Server-Patches/0110-Configurable-flying-kick-messages.patch +++ b/Spigot-Server-Patches/0111-Configurable-flying-kick-messages.patch @@ -21,10 +21,10 @@ index 5452e0f0e9b468ea3b1f832f1a2494d99b2fafcb..3449ba199bdb426ad36dc4a281925f91 + } } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 577ad4e5e29f85cd3460c5dcc355b55df96252c2..372b47e539b9d696f5e0dfe8255b503daaa480df 100644 +index fdf1d57670bf62dba7038f91df9dc589247b57ad..3bee1397a00cd5879504c77a761a3112cc73b5c3 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -158,7 +158,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -160,7 +160,7 @@ public class PlayerConnection implements PacketListenerPlayIn { if (this.B && !this.player.isSleeping()) { if (++this.C > 80) { PlayerConnection.LOGGER.warn("{} was kicked for floating too long!", this.player.getDisplayName().getString()); @@ -33,7 +33,7 @@ index 577ad4e5e29f85cd3460c5dcc355b55df96252c2..372b47e539b9d696f5e0dfe8255b503d return; } } else { -@@ -177,7 +177,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -179,7 +179,7 @@ public class PlayerConnection implements PacketListenerPlayIn { if (this.D && this.player.getRootVehicle().getRidingPassenger() == this.player) { if (++this.E > 80) { PlayerConnection.LOGGER.warn("{} was kicked for floating a vehicle too long!", this.player.getDisplayName().getString()); diff --git a/Spigot-Server-Patches/0111-Chunk-registration-fixes.patch b/Spigot-Server-Patches/0112-Chunk-registration-fixes.patch similarity index 100% rename from Spigot-Server-Patches/0111-Chunk-registration-fixes.patch rename to Spigot-Server-Patches/0112-Chunk-registration-fixes.patch diff --git a/Spigot-Server-Patches/0112-Remove-FishingHook-reference-on-Craft-Entity-removal.patch b/Spigot-Server-Patches/0113-Remove-FishingHook-reference-on-Craft-Entity-removal.patch similarity index 100% rename from Spigot-Server-Patches/0112-Remove-FishingHook-reference-on-Craft-Entity-removal.patch rename to Spigot-Server-Patches/0113-Remove-FishingHook-reference-on-Craft-Entity-removal.patch diff --git a/Spigot-Server-Patches/0113-Auto-fix-bad-Y-levels-on-player-login.patch b/Spigot-Server-Patches/0114-Auto-fix-bad-Y-levels-on-player-login.patch similarity index 86% rename from Spigot-Server-Patches/0113-Auto-fix-bad-Y-levels-on-player-login.patch rename to Spigot-Server-Patches/0114-Auto-fix-bad-Y-levels-on-player-login.patch index eb1cee8110..7de83e2dd8 100644 --- a/Spigot-Server-Patches/0113-Auto-fix-bad-Y-levels-on-player-login.patch +++ b/Spigot-Server-Patches/0114-Auto-fix-bad-Y-levels-on-player-login.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Auto fix bad Y levels on player login Bring down to a saner Y level if super high, as this can cause the server to crash diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index d82643dd24fbd4b35dc526292d6f66234617857f..5de1bd8014a9e89f631d84a7f52332c4693642e9 100644 +index 89b1561bfce8b0a0b34e3f2ce706e3149fb5949d..a0bc829ed49661bc381f535d1e462bf8e0dc6ae1 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -209,6 +209,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -212,6 +212,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @Override public void loadData(NBTTagCompound nbttagcompound) { super.loadData(nbttagcompound); diff --git a/Spigot-Server-Patches/0114-Option-to-remove-corrupt-tile-entities.patch b/Spigot-Server-Patches/0115-Option-to-remove-corrupt-tile-entities.patch similarity index 91% rename from Spigot-Server-Patches/0114-Option-to-remove-corrupt-tile-entities.patch rename to Spigot-Server-Patches/0115-Option-to-remove-corrupt-tile-entities.patch index ecea71ce5e..f1fa88135e 100644 --- a/Spigot-Server-Patches/0114-Option-to-remove-corrupt-tile-entities.patch +++ b/Spigot-Server-Patches/0115-Option-to-remove-corrupt-tile-entities.patch @@ -19,10 +19,10 @@ index 6eca3f300020006f02dd36253b522db442e3cc33..622affa0dc3cc1eadaed400511f2ca2c + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 83858165764a7459843433de1a077037692a2a97..380690cdb1052b12d0574c111c2162bd7ed8ecca 100644 +index f9ad646f3061914e55e424602abe27da7f1c0865..8dd560c8207f14123ab9c9820d8ce7333775db35 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -643,6 +643,12 @@ public class Chunk implements IChunkAccess { +@@ -641,6 +641,12 @@ public class Chunk implements IChunkAccess { "Chunk coordinates: " + (this.loc.x * 16) + "," + (this.loc.z * 16)); e.printStackTrace(); ServerInternalException.reportInternalException(e); diff --git a/Spigot-Server-Patches/0115-Add-EntityZapEvent.patch b/Spigot-Server-Patches/0116-Add-EntityZapEvent.patch similarity index 95% rename from Spigot-Server-Patches/0115-Add-EntityZapEvent.patch rename to Spigot-Server-Patches/0116-Add-EntityZapEvent.patch index d9aa616915..34d52b1101 100644 --- a/Spigot-Server-Patches/0115-Add-EntityZapEvent.patch +++ b/Spigot-Server-Patches/0116-Add-EntityZapEvent.patch @@ -38,10 +38,10 @@ index 824e172f06e57f86010836a1006a14d0a3b0bda3..eedec25373cfc8adec7ac8a99b146770 entitywitch.prepare(worldserver, worldserver.getDamageScaler(entitywitch.getChunkCoordinates()), EnumMobSpawn.CONVERSION, (GroupDataEntity) null, (NBTTagCompound) null); entitywitch.setNoAI(this.isNoAI()); diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index f6688c7151734f4bdb63a71e810996e04b09e22c..4b05e6b9abb318055444bea50e05c4ea07fb0def 100644 +index b82dd03855dab546cc430dc0f0f07f9067365fa7..dc6c1e4adfe14bb0ae1c60a2ffdb0fb03fe17c22 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1076,6 +1076,14 @@ public class CraftEventFactory { +@@ -1082,6 +1082,14 @@ public class CraftEventFactory { return event; } diff --git a/Spigot-Server-Patches/0116-Filter-bad-data-from-ArmorStand-and-SpawnEgg-items.patch b/Spigot-Server-Patches/0117-Filter-bad-data-from-ArmorStand-and-SpawnEgg-items.patch similarity index 100% rename from Spigot-Server-Patches/0116-Filter-bad-data-from-ArmorStand-and-SpawnEgg-items.patch rename to Spigot-Server-Patches/0117-Filter-bad-data-from-ArmorStand-and-SpawnEgg-items.patch diff --git a/Spigot-Server-Patches/0117-Cache-user-authenticator-threads.patch b/Spigot-Server-Patches/0118-Cache-user-authenticator-threads.patch similarity index 91% rename from Spigot-Server-Patches/0117-Cache-user-authenticator-threads.patch rename to Spigot-Server-Patches/0118-Cache-user-authenticator-threads.patch index 1b8d1034d8..c81a748290 100644 --- a/Spigot-Server-Patches/0117-Cache-user-authenticator-threads.patch +++ b/Spigot-Server-Patches/0118-Cache-user-authenticator-threads.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Cache user authenticator threads diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 5de1bd8014a9e89f631d84a7f52332c4693642e9..c2f3b2f72e7f025a69b89e8a52e23160c33a6cc8 100644 +index a0bc829ed49661bc381f535d1e462bf8e0dc6ae1..f8c9515f3ee922b6b96d97676ca740bba617721a 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -4,7 +4,9 @@ import com.google.common.collect.Lists; @@ -18,7 +18,7 @@ index 5de1bd8014a9e89f631d84a7f52332c4693642e9..c2f3b2f72e7f025a69b89e8a52e23160 import java.util.Iterator; import java.util.List; import java.util.Optional; -@@ -43,7 +45,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -44,7 +46,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { public PlayerConnection playerConnection; public final MinecraftServer server; public final PlayerInteractManager playerInteractManager; @@ -27,7 +27,7 @@ index 5de1bd8014a9e89f631d84a7f52332c4693642e9..c2f3b2f72e7f025a69b89e8a52e23160 private final AdvancementDataPlayer advancementDataPlayer; private final ServerStatisticManager serverStatisticManager; private float lastHealthScored = Float.MIN_VALUE; -@@ -419,13 +421,20 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -422,13 +424,20 @@ public class EntityPlayer extends EntityHuman implements ICrafting { while (!this.removeQueue.isEmpty()) { int i = Math.min(this.removeQueue.size(), Integer.MAX_VALUE); int[] aint = new int[i]; @@ -50,7 +50,7 @@ index 5de1bd8014a9e89f631d84a7f52332c4693642e9..c2f3b2f72e7f025a69b89e8a52e23160 this.playerConnection.sendPacket(new PacketPlayOutEntityDestroy(aint)); } -@@ -1428,7 +1437,14 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1425,7 +1434,14 @@ public class EntityPlayer extends EntityHuman implements ICrafting { this.lastHealthSent = -1.0F; this.lastFoodSent = -1; // this.recipeBook.a((RecipeBook) entityplayer.recipeBook); // CraftBukkit diff --git a/Spigot-Server-Patches/0118-Optimise-removeQueue.patch b/Spigot-Server-Patches/0119-Optimise-removeQueue.patch similarity index 85% rename from Spigot-Server-Patches/0118-Optimise-removeQueue.patch rename to Spigot-Server-Patches/0119-Optimise-removeQueue.patch index 502410e7ee..bc4c358c1e 100644 --- a/Spigot-Server-Patches/0118-Optimise-removeQueue.patch +++ b/Spigot-Server-Patches/0119-Optimise-removeQueue.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Optimise removeQueue diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java -index 291baeb12c796cfaa64d60d44007ee537ddedce2..d7c48b3fd1a70fe500df80bb57ce9e2a91feb8ef 100644 +index b6544feaffacd511191054386614d3e921b26d6c..643c66a8a81ce7131cfd6d9f956d1a9cc85fc56b 100644 --- a/src/main/java/net/minecraft/server/LoginListener.java +++ b/src/main/java/net/minecraft/server/LoginListener.java -@@ -97,6 +97,12 @@ public class LoginListener implements PacketLoginInListener { +@@ -98,6 +98,12 @@ public class LoginListener implements PacketLoginInListener { } @@ -21,7 +21,7 @@ index 291baeb12c796cfaa64d60d44007ee537ddedce2..d7c48b3fd1a70fe500df80bb57ce9e2a // Spigot start public void initUUID() { -@@ -175,8 +181,8 @@ public class LoginListener implements PacketLoginInListener { +@@ -176,8 +182,8 @@ public class LoginListener implements PacketLoginInListener { this.networkManager.sendPacket(new PacketLoginOutEncryptionBegin("", this.server.getKeyPair().getPublic().getEncoded(), this.e)); } else { // Spigot start @@ -32,7 +32,7 @@ index 291baeb12c796cfaa64d60d44007ee537ddedce2..d7c48b3fd1a70fe500df80bb57ce9e2a @Override public void run() { try { -@@ -187,7 +193,8 @@ public class LoginListener implements PacketLoginInListener { +@@ -188,7 +194,8 @@ public class LoginListener implements PacketLoginInListener { server.server.getLogger().log(java.util.logging.Level.WARNING, "Exception verifying " + i.getName(), ex); } } @@ -42,7 +42,7 @@ index 291baeb12c796cfaa64d60d44007ee537ddedce2..d7c48b3fd1a70fe500df80bb57ce9e2a // Spigot end } -@@ -216,7 +223,8 @@ public class LoginListener implements PacketLoginInListener { +@@ -217,7 +224,8 @@ public class LoginListener implements PacketLoginInListener { throw new IllegalStateException("Protocol error", cryptographyexception); } @@ -52,7 +52,7 @@ index 291baeb12c796cfaa64d60d44007ee537ddedce2..d7c48b3fd1a70fe500df80bb57ce9e2a public void run() { GameProfile gameprofile = LoginListener.this.i; -@@ -261,10 +269,8 @@ public class LoginListener implements PacketLoginInListener { +@@ -262,10 +270,8 @@ public class LoginListener implements PacketLoginInListener { return LoginListener.this.server.W() && socketaddress instanceof InetSocketAddress ? ((InetSocketAddress) socketaddress).getAddress() : null; } diff --git a/Spigot-Server-Patches/0119-Allow-Reloading-of-Command-Aliases.patch b/Spigot-Server-Patches/0120-Allow-Reloading-of-Command-Aliases.patch similarity index 90% rename from Spigot-Server-Patches/0119-Allow-Reloading-of-Command-Aliases.patch rename to Spigot-Server-Patches/0120-Allow-Reloading-of-Command-Aliases.patch index d54b31cf0b..2666f495b1 100644 --- a/Spigot-Server-Patches/0119-Allow-Reloading-of-Command-Aliases.patch +++ b/Spigot-Server-Patches/0120-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 aa21e9bf00ee0f3dbe4874f76079fb5c0843db57..864909728f8bab2c43e0c449b01d9680e5800355 100644 +index 027d5409ae70015cdb5469a1502f861ed466ada1..995b00b6ece91319e06022fb89356345fa257b54 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2215,5 +2215,24 @@ public final class CraftServer implements Server { +@@ -2272,5 +2272,24 @@ public final class CraftServer implements Server { DefaultPermissions.registerCorePermissions(); CraftDefaultPermissions.registerCorePermissions(); } diff --git a/Spigot-Server-Patches/0120-Add-source-to-PlayerExpChangeEvent.patch b/Spigot-Server-Patches/0121-Add-source-to-PlayerExpChangeEvent.patch similarity index 91% rename from Spigot-Server-Patches/0120-Add-source-to-PlayerExpChangeEvent.patch rename to Spigot-Server-Patches/0121-Add-source-to-PlayerExpChangeEvent.patch index 03d5884e96..ef52777fd1 100644 --- a/Spigot-Server-Patches/0120-Add-source-to-PlayerExpChangeEvent.patch +++ b/Spigot-Server-Patches/0121-Add-source-to-PlayerExpChangeEvent.patch @@ -18,10 +18,10 @@ index fda68abbdd7c970048ba710d7ef35214f2aaa74c..2c2d44562f732c75532cda910db5ce67 this.die(); diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 4b05e6b9abb318055444bea50e05c4ea07fb0def..5562d0449aa35b76a8b0448bfe69fe9664f2f3b0 100644 +index dc6c1e4adfe14bb0ae1c60a2ffdb0fb03fe17c22..5f6255ceeede4e4ba3e6e8993b6aad6311f50462 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -117,6 +117,7 @@ import org.bukkit.entity.ThrownPotion; +@@ -121,6 +121,7 @@ import org.bukkit.entity.ThrownPotion; import org.bukkit.entity.Vehicle; import org.bukkit.entity.Villager; import org.bukkit.entity.Villager.Profession; @@ -29,7 +29,7 @@ index 4b05e6b9abb318055444bea50e05c4ea07fb0def..5562d0449aa35b76a8b0448bfe69fe96 import org.bukkit.event.Cancellable; import org.bukkit.event.Event; import org.bukkit.event.Event.Result; -@@ -1035,6 +1036,17 @@ public class CraftEventFactory { +@@ -1041,6 +1042,17 @@ public class CraftEventFactory { return event; } diff --git a/Spigot-Server-Patches/0121-Don-t-let-fishinghooks-use-portals.patch b/Spigot-Server-Patches/0122-Don-t-let-fishinghooks-use-portals.patch similarity index 100% rename from Spigot-Server-Patches/0121-Don-t-let-fishinghooks-use-portals.patch rename to Spigot-Server-Patches/0122-Don-t-let-fishinghooks-use-portals.patch diff --git a/Spigot-Server-Patches/0122-Add-ProjectileCollideEvent.patch b/Spigot-Server-Patches/0123-Add-ProjectileCollideEvent.patch similarity index 97% rename from Spigot-Server-Patches/0122-Add-ProjectileCollideEvent.patch rename to Spigot-Server-Patches/0123-Add-ProjectileCollideEvent.patch index 5f8c4ac959..c474617b6d 100644 --- a/Spigot-Server-Patches/0122-Add-ProjectileCollideEvent.patch +++ b/Spigot-Server-Patches/0123-Add-ProjectileCollideEvent.patch @@ -71,10 +71,10 @@ index 7391fd31148dbde60e34955841a296f454ac768e..53a8ea7d1eff84abe6c49464d556aa27 this.checkBlockCollisions(); diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 5562d0449aa35b76a8b0448bfe69fe9664f2f3b0..3dc4d0a3abe4eb0c2024dfc77f3be57f3d2a018c 100644 +index 5f6255ceeede4e4ba3e6e8993b6aad6311f50462..1db30da4294f1187eeacecfc056a44963378a1cc 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1180,6 +1180,16 @@ public class CraftEventFactory { +@@ -1186,6 +1186,16 @@ public class CraftEventFactory { return CraftItemStack.asNMSCopy(bitem); } diff --git a/Spigot-Server-Patches/0123-Prevent-Pathfinding-out-of-World-Border.patch b/Spigot-Server-Patches/0124-Prevent-Pathfinding-out-of-World-Border.patch similarity index 100% rename from Spigot-Server-Patches/0123-Prevent-Pathfinding-out-of-World-Border.patch rename to Spigot-Server-Patches/0124-Prevent-Pathfinding-out-of-World-Border.patch diff --git a/Spigot-Server-Patches/0124-Optimize-World.isLoaded-BlockPosition-Z.patch b/Spigot-Server-Patches/0125-Optimize-World.isLoaded-BlockPosition-Z.patch similarity index 91% rename from Spigot-Server-Patches/0124-Optimize-World.isLoaded-BlockPosition-Z.patch rename to Spigot-Server-Patches/0125-Optimize-World.isLoaded-BlockPosition-Z.patch index 95b1113104..0b8a494c67 100644 --- a/Spigot-Server-Patches/0124-Optimize-World.isLoaded-BlockPosition-Z.patch +++ b/Spigot-Server-Patches/0125-Optimize-World.isLoaded-BlockPosition-Z.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Optimize World.isLoaded(BlockPosition)Z Reduce method invocations for World.isLoaded(BlockPosition)Z diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 9ac1f42372a18c0907c7b0137b6a83022e3e984d..7deac857ab2218d7caa71a8b7b42fea0ab200b96 100644 +index dbc7cbba7134ff0281c6e77cd246073bba8b9ce2..f773c19d69ebcb75cf97b07fd015baf3d6e6cae8 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -252,6 +252,10 @@ public abstract class World implements GeneratorAccess, AutoCloseable { diff --git a/Spigot-Server-Patches/0125-Bound-Treasure-Maps-to-World-Border.patch b/Spigot-Server-Patches/0126-Bound-Treasure-Maps-to-World-Border.patch similarity index 100% rename from Spigot-Server-Patches/0125-Bound-Treasure-Maps-to-World-Border.patch rename to Spigot-Server-Patches/0126-Bound-Treasure-Maps-to-World-Border.patch diff --git a/Spigot-Server-Patches/0126-Configurable-Cartographer-Treasure-Maps.patch b/Spigot-Server-Patches/0127-Configurable-Cartographer-Treasure-Maps.patch similarity index 100% rename from Spigot-Server-Patches/0126-Configurable-Cartographer-Treasure-Maps.patch rename to Spigot-Server-Patches/0127-Configurable-Cartographer-Treasure-Maps.patch diff --git a/Spigot-Server-Patches/0127-Optimize-ItemStack.isEmpty.patch b/Spigot-Server-Patches/0128-Optimize-ItemStack.isEmpty.patch similarity index 100% rename from Spigot-Server-Patches/0127-Optimize-ItemStack.isEmpty.patch rename to Spigot-Server-Patches/0128-Optimize-ItemStack.isEmpty.patch diff --git a/Spigot-Server-Patches/0128-Add-API-methods-to-control-if-armour-stands-can-move.patch b/Spigot-Server-Patches/0129-Add-API-methods-to-control-if-armour-stands-can-move.patch similarity index 100% rename from Spigot-Server-Patches/0128-Add-API-methods-to-control-if-armour-stands-can-move.patch rename to Spigot-Server-Patches/0129-Add-API-methods-to-control-if-armour-stands-can-move.patch diff --git a/Spigot-Server-Patches/0129-Properly-fix-item-duplication-bug.patch b/Spigot-Server-Patches/0130-Properly-fix-item-duplication-bug.patch similarity index 80% rename from Spigot-Server-Patches/0129-Properly-fix-item-duplication-bug.patch rename to Spigot-Server-Patches/0130-Properly-fix-item-duplication-bug.patch index 8ae9d3a2ed..c312a8ddec 100644 --- a/Spigot-Server-Patches/0129-Properly-fix-item-duplication-bug.patch +++ b/Spigot-Server-Patches/0130-Properly-fix-item-duplication-bug.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Properly fix item duplication bug Credit to prplz for figuring out the real issue diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index c2f3b2f72e7f025a69b89e8a52e23160c33a6cc8..ba64eb5e8e048a0bb70187efb0cdec17525a3d4a 100644 +index f8c9515f3ee922b6b96d97676ca740bba617721a..fd7513008dde790107647f7f5b9670030696e064 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -1931,7 +1931,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1933,7 +1933,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @Override protected boolean isFrozen() { @@ -19,10 +19,10 @@ index c2f3b2f72e7f025a69b89e8a52e23160c33a6cc8..ba64eb5e8e048a0bb70187efb0cdec17 @Override diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 372b47e539b9d696f5e0dfe8255b503daaa480df..bb99e1ed16deba5b39323c5a65bf68986ff816fe 100644 +index 3bee1397a00cd5879504c77a761a3112cc73b5c3..a6de594acd00697d0ca55d2caea9cdbf505d6752 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -2660,7 +2660,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -2662,7 +2662,7 @@ public class PlayerConnection implements PacketListenerPlayIn { } public final boolean isDisconnected() { diff --git a/Spigot-Server-Patches/0130-String-based-Action-Bar-API.patch b/Spigot-Server-Patches/0131-String-based-Action-Bar-API.patch similarity index 96% rename from Spigot-Server-Patches/0130-String-based-Action-Bar-API.patch rename to Spigot-Server-Patches/0131-String-based-Action-Bar-API.patch index 20a89f937e..5451ecf696 100644 --- a/Spigot-Server-Patches/0130-String-based-Action-Bar-API.patch +++ b/Spigot-Server-Patches/0131-String-based-Action-Bar-API.patch @@ -18,7 +18,7 @@ index bdfd17362518ff2398cf9e1743a7a4f0c7a0e966..cc14e4b4609fa7013df666181c0e02a5 public static Collector, ?, Map> a() { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 0c2637ae7e01535088bf9177f5ccf1b1bade98e9..7823ddab7f0bf9b1096cf4a3d54324e8bbb86a09 100644 +index b5f296b23f5ed30f855fec79775d0026ff2f1d6e..82c99fbab334e16c39ac23ca3765f9543e8d147a 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -243,6 +243,24 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0131-Firework-API-s.patch b/Spigot-Server-Patches/0132-Firework-API-s.patch similarity index 97% rename from Spigot-Server-Patches/0131-Firework-API-s.patch rename to Spigot-Server-Patches/0132-Firework-API-s.patch index 7fa32777c0..1f8932f30c 100644 --- a/Spigot-Server-Patches/0131-Firework-API-s.patch +++ b/Spigot-Server-Patches/0132-Firework-API-s.patch @@ -44,10 +44,10 @@ index 46b315036bbe576b2bf9938db73d9c5931003cc1..a646dc9f030ad1f76ba2b7bb1bc7897c @Override diff --git a/src/main/java/net/minecraft/server/ItemCrossbow.java b/src/main/java/net/minecraft/server/ItemCrossbow.java -index 5e1af55c429117111aa40a9408cecafc82a94512..658b5ca36d951f2f58d91613b89a328109606fd6 100644 +index 9e17a002218ce82c0e1033f3487f878463970d17..14c0e7382292b3d39858d4d957df8016c301c712 100644 --- a/src/main/java/net/minecraft/server/ItemCrossbow.java +++ b/src/main/java/net/minecraft/server/ItemCrossbow.java -@@ -182,6 +182,7 @@ public class ItemCrossbow extends ItemProjectileWeapon implements ItemVanishable +@@ -183,6 +183,7 @@ public class ItemCrossbow extends ItemProjectileWeapon implements ItemVanishable if (flag1) { object = new EntityFireworks(world, itemstack1, entityliving, entityliving.locX(), entityliving.getHeadY() - 0.15000000596046448D, entityliving.locZ(), true); diff --git a/Spigot-Server-Patches/0132-PlayerTeleportEndGatewayEvent.patch b/Spigot-Server-Patches/0133-PlayerTeleportEndGatewayEvent.patch similarity index 100% rename from Spigot-Server-Patches/0132-PlayerTeleportEndGatewayEvent.patch rename to Spigot-Server-Patches/0133-PlayerTeleportEndGatewayEvent.patch diff --git a/Spigot-Server-Patches/0133-Provide-E-TE-Chunk-count-stat-methods.patch b/Spigot-Server-Patches/0134-Provide-E-TE-Chunk-count-stat-methods.patch similarity index 95% rename from Spigot-Server-Patches/0133-Provide-E-TE-Chunk-count-stat-methods.patch rename to Spigot-Server-Patches/0134-Provide-E-TE-Chunk-count-stat-methods.patch index bf3721eed1..4bb25909d0 100644 --- a/Spigot-Server-Patches/0133-Provide-E-TE-Chunk-count-stat-methods.patch +++ b/Spigot-Server-Patches/0134-Provide-E-TE-Chunk-count-stat-methods.patch @@ -7,7 +7,7 @@ Provides counts without the ineffeciency of using .getEntities().size() which creates copy of the collections. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 539bc756b5341e60266d6505d81778748cd5f475..e42f27bb10b6ee279555cfee3c90a88fccad9d65 100644 +index f7c5df44eda98ee965ccd38568403617bbde8fdc..3f35e1290beaab1fa2ca93ec64ab0dd42d68d71c 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -281,6 +281,48 @@ public class CraftWorld implements World { diff --git a/Spigot-Server-Patches/0134-Enforce-Sync-Player-Saves.patch b/Spigot-Server-Patches/0135-Enforce-Sync-Player-Saves.patch similarity index 91% rename from Spigot-Server-Patches/0134-Enforce-Sync-Player-Saves.patch rename to Spigot-Server-Patches/0135-Enforce-Sync-Player-Saves.patch index 7baa66fa78..974ceaa580 100644 --- a/Spigot-Server-Patches/0134-Enforce-Sync-Player-Saves.patch +++ b/Spigot-Server-Patches/0135-Enforce-Sync-Player-Saves.patch @@ -7,7 +7,7 @@ Saving players async is extremely dangerous. This will force it to main the same way we handle async chunk loads. diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 234a6e73122c68358029ce2d578d82ab92ad5b45..b517099929ee2575f5cdb2661520c2f60ba72304 100644 +index a1ec2ae7c3152019b3d01166547e6931d4bf2b57..05ef12c3b90191a3998d1251221658c86af99654 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -975,11 +975,13 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0135-Don-t-allow-entities-to-ride-themselves-572.patch b/Spigot-Server-Patches/0136-Don-t-allow-entities-to-ride-themselves-572.patch similarity index 90% rename from Spigot-Server-Patches/0135-Don-t-allow-entities-to-ride-themselves-572.patch rename to Spigot-Server-Patches/0136-Don-t-allow-entities-to-ride-themselves-572.patch index f4486c1780..c4e5508f79 100644 --- a/Spigot-Server-Patches/0135-Don-t-allow-entities-to-ride-themselves-572.patch +++ b/Spigot-Server-Patches/0136-Don-t-allow-entities-to-ride-themselves-572.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Don't allow entities to ride themselves - #572 diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 6aa29495802b7d52c4c0f283495c7d1762f657fa..8e306dfac0b1a0355b1a7cd84ec8c8514c172268 100644 +index 7abe7bcddd3c60bfb0f290e2475d28396d5319cf..bd7d9949eb9a290833958d170d1ad69990406b16 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -1956,6 +1956,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/0136-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch b/Spigot-Server-Patches/0137-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch similarity index 98% rename from Spigot-Server-Patches/0136-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch rename to Spigot-Server-Patches/0137-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch index f9b0139ba1..1a64186e72 100644 --- a/Spigot-Server-Patches/0136-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch +++ b/Spigot-Server-Patches/0137-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch @@ -226,10 +226,10 @@ index eedec25373cfc8adec7ac8a99b146770dc15c70e..732323ee1de01929c73bc5f98444c0f6 } diff --git a/src/main/java/net/minecraft/server/EntityVillagerTrader.java b/src/main/java/net/minecraft/server/EntityVillagerTrader.java -index 86e9c9ec35153d4d6248512e2e3406ca2f3dac46..fa3e786cd6ef67da378a5d51583ca84a82677d8c 100644 +index c830b3c2145effc16314c6216be8af935416cb58..f1a509063c09e603140c74255a3fb901693d2cc5 100644 --- a/src/main/java/net/minecraft/server/EntityVillagerTrader.java +++ b/src/main/java/net/minecraft/server/EntityVillagerTrader.java -@@ -145,7 +145,7 @@ public class EntityVillagerTrader extends EntityVillagerAbstract { +@@ -144,7 +144,7 @@ public class EntityVillagerTrader extends EntityVillagerAbstract { if (merchantrecipe.isRewardExp()) { int i = 3 + this.random.nextInt(4); @@ -278,10 +278,10 @@ index a3ddf7be4c7ea588098381b8f05b2bad5b388853..99b20fa5feff0f766124d4ec9474852e } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index e42f27bb10b6ee279555cfee3c90a88fccad9d65..5bf5a815653b0556d9d2bcaf5f69026b77bd28a6 100644 +index 3f35e1290beaab1fa2ca93ec64ab0dd42d68d71c..85562d2cafab6f81705b70ac1f965ccfb38abdf5 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1827,7 +1827,7 @@ public class CraftWorld implements World { +@@ -1822,7 +1822,7 @@ public class CraftWorld implements World { } else if (TNTPrimed.class.isAssignableFrom(clazz)) { entity = new EntityTNTPrimed(world, x, y, z, null); } else if (ExperienceOrb.class.isAssignableFrom(clazz)) { diff --git a/Spigot-Server-Patches/0137-Cap-Entity-Collisions.patch b/Spigot-Server-Patches/0138-Cap-Entity-Collisions.patch similarity index 96% rename from Spigot-Server-Patches/0137-Cap-Entity-Collisions.patch rename to Spigot-Server-Patches/0138-Cap-Entity-Collisions.patch index 2a3ef4dda8..2f0a315ce3 100644 --- a/Spigot-Server-Patches/0137-Cap-Entity-Collisions.patch +++ b/Spigot-Server-Patches/0138-Cap-Entity-Collisions.patch @@ -27,7 +27,7 @@ index 2dc58b9f769ea43b737804456aafab47ecc143b8..c611b5a63498f5ad1f50a75ccd5d7299 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 8e306dfac0b1a0355b1a7cd84ec8c8514c172268..c3cdcf7effe86f97ab6a6e7907ab6a3954faa113 100644 +index bd7d9949eb9a290833958d170d1ad69990406b16..bb049690ce61310a90852637397abd449c1dc43a 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -183,6 +183,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/0138-Remove-CraftScheduler-Async-Task-Debugger.patch b/Spigot-Server-Patches/0139-Remove-CraftScheduler-Async-Task-Debugger.patch similarity index 100% rename from Spigot-Server-Patches/0138-Remove-CraftScheduler-Async-Task-Debugger.patch rename to Spigot-Server-Patches/0139-Remove-CraftScheduler-Async-Task-Debugger.patch diff --git a/Spigot-Server-Patches/0139-Make-targetSize-more-aggressive-in-the-chunk-unload-.patch b/Spigot-Server-Patches/0140-Make-targetSize-more-aggressive-in-the-chunk-unload-.patch similarity index 100% rename from Spigot-Server-Patches/0139-Make-targetSize-more-aggressive-in-the-chunk-unload-.patch rename to Spigot-Server-Patches/0140-Make-targetSize-more-aggressive-in-the-chunk-unload-.patch diff --git a/Spigot-Server-Patches/0140-Do-not-let-armorstands-drown.patch b/Spigot-Server-Patches/0141-Do-not-let-armorstands-drown.patch similarity index 100% rename from Spigot-Server-Patches/0140-Do-not-let-armorstands-drown.patch rename to Spigot-Server-Patches/0141-Do-not-let-armorstands-drown.patch diff --git a/Spigot-Server-Patches/0141-Properly-handle-async-calls-to-restart-the-server.patch b/Spigot-Server-Patches/0142-Properly-handle-async-calls-to-restart-the-server.patch similarity index 93% rename from Spigot-Server-Patches/0141-Properly-handle-async-calls-to-restart-the-server.patch rename to Spigot-Server-Patches/0142-Properly-handle-async-calls-to-restart-the-server.patch index a04104b82f..df92cf9e07 100644 --- a/Spigot-Server-Patches/0141-Properly-handle-async-calls-to-restart-the-server.patch +++ b/Spigot-Server-Patches/0142-Properly-handle-async-calls-to-restart-the-server.patch @@ -73,10 +73,10 @@ index 7e4a966b5748417223243344bf7c4483e997a237..c6b520f3f8872a0345f76a75f0b48fe1 // Spigot Start private static double calcTps(double avg, double exp, double tps) diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index b517099929ee2575f5cdb2661520c2f60ba72304..e42a789f24215f192427218fa08ae327f09c2a46 100644 +index 05ef12c3b90191a3998d1251221658c86af99654..7ecd5e3747fd8acbddcdf5b42285d7b6f3ffbac2 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -1086,10 +1086,15 @@ public abstract class PlayerList { +@@ -1086,9 +1086,15 @@ public abstract class PlayerList { entityplayer.playerInteractManager.b(worldserver.worldDataServer.getGameType()); // CraftBukkit } @@ -88,12 +88,11 @@ index b517099929ee2575f5cdb2661520c2f60ba72304..e42a789f24215f192427218fa08ae327 + public void shutdown(boolean isRestarting) { // CraftBukkit start - disconnect safely for (EntityPlayer player : this.players) { -- player.playerConnection.disconnect(this.server.server.getShutdownMessage()); // CraftBukkit - add custom shutdown message -+ player.playerConnection.disconnect(!isRestarting ? this.server.server.getShutdownMessage() : org.spigotmc.SpigotConfig.restartMessage); // CraftBukkit - add custom shutdown message // Paper - add isRestarting flag ++ if (isRestarting) player.playerConnection.disconnect(org.spigotmc.SpigotConfig.restartMessage); else // Paper + player.playerConnection.disconnect(PaperAdventure.asVanilla(this.server.server.shutdownMessage())); // CraftBukkit - add custom shutdown message // Paper - Adventure } // CraftBukkit end - -@@ -1101,6 +1106,7 @@ public abstract class PlayerList { +@@ -1101,6 +1107,7 @@ public abstract class PlayerList { } // Paper end } @@ -102,7 +101,7 @@ index b517099929ee2575f5cdb2661520c2f60ba72304..e42a789f24215f192427218fa08ae327 // CraftBukkit start public void sendMessage(IChatBaseComponent[] iChatBaseComponents) { diff --git a/src/main/java/org/spigotmc/RestartCommand.java b/src/main/java/org/spigotmc/RestartCommand.java -index 26795b22e3ebc9594af79f93506a3c217cb784e2..aefea3a9a8b9b75c62bd20018be7cd166a213001 100644 +index ccea803f58e09067cc998c62ffa134d6604878ff..aefea3a9a8b9b75c62bd20018be7cd166a213001 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 @@ -135,7 +134,7 @@ index 26795b22e3ebc9594af79f93506a3c217cb784e2..aefea3a9a8b9b75c62bd20018be7cd16 + } - // Kick all players -- for ( EntityPlayer p : (List) MinecraftServer.getServer().getPlayerList().players ) +- for ( EntityPlayer p : (List< EntityPlayer>) MinecraftServer.getServer().getPlayerList().players ) - { - p.playerConnection.disconnect(SpigotConfig.restartMessage); - } diff --git a/Spigot-Server-Patches/0142-Add-system-property-to-disable-book-size-limits.patch b/Spigot-Server-Patches/0143-Add-system-property-to-disable-book-size-limits.patch similarity index 86% rename from Spigot-Server-Patches/0142-Add-system-property-to-disable-book-size-limits.patch rename to Spigot-Server-Patches/0143-Add-system-property-to-disable-book-size-limits.patch index 6a83411e21..b6f5e99597 100644 --- a/Spigot-Server-Patches/0142-Add-system-property-to-disable-book-size-limits.patch +++ b/Spigot-Server-Patches/0143-Add-system-property-to-disable-book-size-limits.patch @@ -11,10 +11,10 @@ to make books with as much data as they want. Do not use this without limiting incoming data from packets in some other way. diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java -index a0cc04cb6d1f02df3018320b4147bd0b156dd81c..bcfa7080c0a01f9d0026e1bde89db00598c880c4 100644 +index fb4d39a4cf101749f74da9c48bb3a27b0188fbeb..9be708f56f522b7b01f5011c8b0c80ee91ce4a67 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java -@@ -37,6 +37,7 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta { +@@ -40,6 +40,7 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta { static final int MAX_PAGES = 100; static final int MAX_PAGE_LENGTH = 320; // 256 limit + 64 characters to allow for psuedo colour codes static final int MAX_TITLE_LENGTH = 32; @@ -22,7 +22,7 @@ index a0cc04cb6d1f02df3018320b4147bd0b156dd81c..bcfa7080c0a01f9d0026e1bde89db005 protected String title; protected String author; -@@ -239,7 +240,7 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta { +@@ -242,7 +243,7 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta { if (title == null) { this.title = null; return true; @@ -31,7 +31,7 @@ index a0cc04cb6d1f02df3018320b4147bd0b156dd81c..bcfa7080c0a01f9d0026e1bde89db005 return false; } -@@ -301,7 +302,7 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta { +@@ -433,7 +434,7 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta { String validatePage(String page) { if (page == null) { page = ""; @@ -40,7 +40,7 @@ index a0cc04cb6d1f02df3018320b4147bd0b156dd81c..bcfa7080c0a01f9d0026e1bde89db005 page = page.substring(0, MAX_PAGE_LENGTH); } return page; -@@ -311,7 +312,7 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta { +@@ -443,7 +444,7 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta { // asserted: page != null if (this.pages == null) { this.pages = new ArrayList(); diff --git a/Spigot-Server-Patches/0143-Add-option-to-make-parrots-stay-on-shoulders-despite.patch b/Spigot-Server-Patches/0144-Add-option-to-make-parrots-stay-on-shoulders-despite.patch similarity index 94% rename from Spigot-Server-Patches/0143-Add-option-to-make-parrots-stay-on-shoulders-despite.patch rename to Spigot-Server-Patches/0144-Add-option-to-make-parrots-stay-on-shoulders-despite.patch index f7498de822..253a615a23 100644 --- a/Spigot-Server-Patches/0143-Add-option-to-make-parrots-stay-on-shoulders-despite.patch +++ b/Spigot-Server-Patches/0144-Add-option-to-make-parrots-stay-on-shoulders-despite.patch @@ -39,10 +39,10 @@ index bc930015082ad6b2c5d744f823d9ad28a07fa5d4..63f3743bbf3632badf4e66a5ee4239cc } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index bb99e1ed16deba5b39323c5a65bf68986ff816fe..e83f1bfe2b2c33b3bc6788de6998356430857855 100644 +index a6de594acd00697d0ca55d2caea9cdbf505d6752..331282ed36989c3b29e2a0ad5c3704bd869d1893 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -1903,6 +1903,13 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -1906,6 +1906,13 @@ public class PlayerConnection implements PacketListenerPlayIn { switch (packetplayinentityaction.c()) { case PRESS_SHIFT_KEY: this.player.setSneaking(true); diff --git a/Spigot-Server-Patches/0144-Add-configuration-option-to-prevent-player-names-fro.patch b/Spigot-Server-Patches/0145-Add-configuration-option-to-prevent-player-names-fro.patch similarity index 91% rename from Spigot-Server-Patches/0144-Add-configuration-option-to-prevent-player-names-fro.patch rename to Spigot-Server-Patches/0145-Add-configuration-option-to-prevent-player-names-fro.patch index 3eba2a3a4f..149092c00b 100644 --- a/Spigot-Server-Patches/0144-Add-configuration-option-to-prevent-player-names-fro.patch +++ b/Spigot-Server-Patches/0145-Add-configuration-option-to-prevent-player-names-fro.patch @@ -20,10 +20,10 @@ index 3449ba199bdb426ad36dc4a281925f91eea3fab3..ed519159c37299595b4eaeaab5131a8e + } } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 864909728f8bab2c43e0c449b01d9680e5800355..0eb4a95d03a1d22ade42ea020fc4461a97e4323a 100644 +index 995b00b6ece91319e06022fb89356345fa257b54..2ffbe9d1a18f65c1190b6fc14e20bde3084ed444 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2234,5 +2234,10 @@ public final class CraftServer implements Server { +@@ -2291,5 +2291,10 @@ public final class CraftServer implements Server { commandMap.registerServerAliases(); return true; } diff --git a/Spigot-Server-Patches/0145-Use-TerminalConsoleAppender-for-console-improvements.patch b/Spigot-Server-Patches/0146-Use-TerminalConsoleAppender-for-console-improvements.patch similarity index 98% rename from Spigot-Server-Patches/0145-Use-TerminalConsoleAppender-for-console-improvements.patch rename to Spigot-Server-Patches/0146-Use-TerminalConsoleAppender-for-console-improvements.patch index e95ae2e322..c80bdc3a5e 100644 --- a/Spigot-Server-Patches/0145-Use-TerminalConsoleAppender-for-console-improvements.patch +++ b/Spigot-Server-Patches/0146-Use-TerminalConsoleAppender-for-console-improvements.patch @@ -245,10 +245,10 @@ index c6b520f3f8872a0345f76a75f0b48fe113021716..ee009052eb10125bbaca95b5fda306ad public KeyPair getKeyPair() { diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index e42a789f24215f192427218fa08ae327f09c2a46..6b12c1d96a2b0ea305425a563dd0e908c611db89 100644 +index 7ecd5e3747fd8acbddcdf5b42285d7b6f3ffbac2..07ab0bf135a6903c936606296b6701b970ad48db 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -79,8 +79,7 @@ public abstract class PlayerList { +@@ -81,8 +81,7 @@ public abstract class PlayerList { public PlayerList(MinecraftServer minecraftserver, IRegistryCustom.Dimension iregistrycustom_dimension, WorldNBTStorage worldnbtstorage, int i) { this.cserver = minecraftserver.server = new CraftServer((DedicatedServer) minecraftserver, this); @@ -259,7 +259,7 @@ index e42a789f24215f192427218fa08ae327f09c2a46..6b12c1d96a2b0ea305425a563dd0e908 this.k = new GameProfileBanList(PlayerList.b); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 0eb4a95d03a1d22ade42ea020fc4461a97e4323a..339377b0c09eeab85bcd972e37195b173cde356d 100644 +index 2ffbe9d1a18f65c1190b6fc14e20bde3084ed444..c8b5d0933f26882be18505d9366a5c3d546ba2dc 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -46,7 +46,7 @@ import java.util.function.Consumer; @@ -271,7 +271,7 @@ index 0eb4a95d03a1d22ade42ea020fc4461a97e4323a..339377b0c09eeab85bcd972e37195b17 import net.minecraft.server.Advancement; import net.minecraft.server.ArgumentEntity; import net.minecraft.server.BiomeManager; -@@ -1198,9 +1198,13 @@ public final class CraftServer implements Server { +@@ -1202,9 +1202,13 @@ public final class CraftServer implements Server { return logger; } diff --git a/Spigot-Server-Patches/0146-provide-a-configurable-option-to-disable-creeper-lin.patch b/Spigot-Server-Patches/0147-provide-a-configurable-option-to-disable-creeper-lin.patch similarity index 100% rename from Spigot-Server-Patches/0146-provide-a-configurable-option-to-disable-creeper-lin.patch rename to Spigot-Server-Patches/0147-provide-a-configurable-option-to-disable-creeper-lin.patch diff --git a/Spigot-Server-Patches/0147-Item-canEntityPickup.patch b/Spigot-Server-Patches/0148-Item-canEntityPickup.patch similarity index 100% rename from Spigot-Server-Patches/0147-Item-canEntityPickup.patch rename to Spigot-Server-Patches/0148-Item-canEntityPickup.patch diff --git a/Spigot-Server-Patches/0148-PlayerPickupItemEvent-setFlyAtPlayer.patch b/Spigot-Server-Patches/0149-PlayerPickupItemEvent-setFlyAtPlayer.patch similarity index 100% rename from Spigot-Server-Patches/0148-PlayerPickupItemEvent-setFlyAtPlayer.patch rename to Spigot-Server-Patches/0149-PlayerPickupItemEvent-setFlyAtPlayer.patch diff --git a/Spigot-Server-Patches/0149-PlayerAttemptPickupItemEvent.patch b/Spigot-Server-Patches/0150-PlayerAttemptPickupItemEvent.patch similarity index 100% rename from Spigot-Server-Patches/0149-PlayerAttemptPickupItemEvent.patch rename to Spigot-Server-Patches/0150-PlayerAttemptPickupItemEvent.patch diff --git a/Spigot-Server-Patches/0150-Add-UnknownCommandEvent.patch b/Spigot-Server-Patches/0151-Add-UnknownCommandEvent.patch similarity index 85% rename from Spigot-Server-Patches/0150-Add-UnknownCommandEvent.patch rename to Spigot-Server-Patches/0151-Add-UnknownCommandEvent.patch index 5f3fa30bde..dbd90807a3 100644 --- a/Spigot-Server-Patches/0150-Add-UnknownCommandEvent.patch +++ b/Spigot-Server-Patches/0151-Add-UnknownCommandEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add UnknownCommandEvent diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 339377b0c09eeab85bcd972e37195b173cde356d..9abf73ca40279c0802be90a687dad64992aa84ef 100644 +index c8b5d0933f26882be18505d9366a5c3d546ba2dc..7bc616faba6e98cb04a36ab26afa7cfb7c9eacd6 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -104,6 +104,7 @@ import net.minecraft.server.WorldNBTStorage; +@@ -105,6 +105,7 @@ import net.minecraft.server.WorldNBTStorage; import net.minecraft.server.WorldServer; import net.minecraft.server.WorldSettings; import org.apache.commons.lang.Validate; @@ -16,7 +16,7 @@ index 339377b0c09eeab85bcd972e37195b173cde356d..9abf73ca40279c0802be90a687dad649 import org.bukkit.BanList; import org.bukkit.Bukkit; import org.bukkit.ChatColor; -@@ -177,6 +178,7 @@ import org.bukkit.craftbukkit.util.Versioning; +@@ -178,6 +179,7 @@ import org.bukkit.craftbukkit.util.Versioning; import org.bukkit.craftbukkit.util.permissions.CraftDefaultPermissions; import org.bukkit.entity.Entity; import org.bukkit.entity.Player; @@ -24,7 +24,7 @@ index 339377b0c09eeab85bcd972e37195b173cde356d..9abf73ca40279c0802be90a687dad649 import org.bukkit.event.inventory.InventoryType; import org.bukkit.event.player.PlayerChatTabCompleteEvent; import org.bukkit.event.server.BroadcastMessageEvent; -@@ -790,7 +792,13 @@ public final class CraftServer implements Server { +@@ -794,7 +796,13 @@ public final class CraftServer implements Server { // Spigot start if (!org.spigotmc.SpigotConfig.unknownCommandMessage.isEmpty()) { diff --git a/Spigot-Server-Patches/0151-Basic-PlayerProfile-API.patch b/Spigot-Server-Patches/0152-Basic-PlayerProfile-API.patch similarity index 99% rename from Spigot-Server-Patches/0151-Basic-PlayerProfile-API.patch rename to Spigot-Server-Patches/0152-Basic-PlayerProfile-API.patch index 745da0dbf1..4e0bc7391e 100644 --- a/Spigot-Server-Patches/0151-Basic-PlayerProfile-API.patch +++ b/Spigot-Server-Patches/0152-Basic-PlayerProfile-API.patch @@ -509,10 +509,10 @@ index e89c92aded564fe689cc1aa8d0c83abb72f7b10c..aa1b18ffa1e2b7f865f63b7df81d8f3b private volatile long c; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 9abf73ca40279c0802be90a687dad64992aa84ef..b6d45407eca3f76299812c7cf98d1fd5d5ade1e2 100644 +index 7bc616faba6e98cb04a36ab26afa7cfb7c9eacd6..e89b0502b243a35ddc6c765b45cf2d69e491daff 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -227,6 +227,9 @@ import org.yaml.snakeyaml.error.MarkedYAMLException; +@@ -228,6 +228,9 @@ import org.yaml.snakeyaml.error.MarkedYAMLException; import net.md_5.bungee.api.chat.BaseComponent; // Spigot @@ -522,7 +522,7 @@ index 9abf73ca40279c0802be90a687dad64992aa84ef..b6d45407eca3f76299812c7cf98d1fd5 public final class CraftServer implements Server { private final String serverName = "Paper"; // Paper private final String serverVersion; -@@ -2251,5 +2254,24 @@ public final class CraftServer implements Server { +@@ -2308,5 +2311,24 @@ public final class CraftServer implements Server { public boolean suggestPlayerNamesWhenNullTabCompletions() { return com.destroystokyo.paper.PaperConfig.suggestPlayersWhenNullTabCompletions; } diff --git a/Spigot-Server-Patches/0152-Shoulder-Entities-Release-API.patch b/Spigot-Server-Patches/0153-Shoulder-Entities-Release-API.patch similarity index 96% rename from Spigot-Server-Patches/0152-Shoulder-Entities-Release-API.patch rename to Spigot-Server-Patches/0153-Shoulder-Entities-Release-API.patch index b167cccc8b..b3651b6787 100644 --- a/Spigot-Server-Patches/0152-Shoulder-Entities-Release-API.patch +++ b/Spigot-Server-Patches/0153-Shoulder-Entities-Release-API.patch @@ -58,10 +58,10 @@ index 63f3743bbf3632badf4e66a5ee4239ccbc5df700..502154234632fbf65fada993f9a1e457 @Override public abstract boolean isSpectator(); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -index 96b55867d8bfbc85cb290da9b320ec74b9dbb179..1f5f04aecfaccc80b2db8e14ba2c39f53528191b 100644 +index fb3378e22864335fe6b60d77a401e01a68b3553c..b1f837fcbaa2ab9d83bb8f17b24dd45fdc3b14e4 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -@@ -486,6 +486,32 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -494,6 +494,32 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { getHandle().getCooldownTracker().setCooldown(CraftMagicNumbers.getItem(material), ticks); } diff --git a/Spigot-Server-Patches/0153-Profile-Lookup-Events.patch b/Spigot-Server-Patches/0154-Profile-Lookup-Events.patch similarity index 100% rename from Spigot-Server-Patches/0153-Profile-Lookup-Events.patch rename to Spigot-Server-Patches/0154-Profile-Lookup-Events.patch diff --git a/Spigot-Server-Patches/0154-Block-player-logins-during-server-shutdown.patch b/Spigot-Server-Patches/0155-Block-player-logins-during-server-shutdown.patch similarity index 86% rename from Spigot-Server-Patches/0154-Block-player-logins-during-server-shutdown.patch rename to Spigot-Server-Patches/0155-Block-player-logins-during-server-shutdown.patch index 5b487b11b1..f7f71fe226 100644 --- a/Spigot-Server-Patches/0154-Block-player-logins-during-server-shutdown.patch +++ b/Spigot-Server-Patches/0155-Block-player-logins-during-server-shutdown.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Block player logins during server shutdown diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java -index d7c48b3fd1a70fe500df80bb57ce9e2a91feb8ef..3772268f91bbd726995f6006e2b2ee7048eb376c 100644 +index 643c66a8a81ce7131cfd6d9f956d1a9cc85fc56b..a7b57185d337846d8f7b296b31665315d375ecd5 100644 --- a/src/main/java/net/minecraft/server/LoginListener.java +++ b/src/main/java/net/minecraft/server/LoginListener.java -@@ -49,6 +49,12 @@ public class LoginListener implements PacketLoginInListener { +@@ -50,6 +50,12 @@ public class LoginListener implements PacketLoginInListener { } public void tick() { diff --git a/Spigot-Server-Patches/0155-Entity-fromMobSpawner.patch b/Spigot-Server-Patches/0156-Entity-fromMobSpawner.patch similarity index 93% rename from Spigot-Server-Patches/0155-Entity-fromMobSpawner.patch rename to Spigot-Server-Patches/0156-Entity-fromMobSpawner.patch index 1836e345a7..e12de1abdf 100644 --- a/Spigot-Server-Patches/0155-Entity-fromMobSpawner.patch +++ b/Spigot-Server-Patches/0156-Entity-fromMobSpawner.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Entity#fromMobSpawner() diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index c3cdcf7effe86f97ab6a6e7907ab6a3954faa113..f647b4975e714164313142acef04f8e320ca79cf 100644 +index bb049690ce61310a90852637397abd449c1dc43a..3b134ea0a6b30dce70ed9d00414c305354e07476 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -183,6 +183,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -49,10 +49,10 @@ index 259713339217660e8b81a9500f57c6995ea59dde..8eb20c6b9a88d5d4056f91df1f496d3d if (org.bukkit.craftbukkit.event.CraftEventFactory.callSpawnerSpawnEvent(entity, blockposition).isCancelled()) { Entity vehicle = entity.getVehicle(); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index baa54065500b98e3fabce053ad659b44d0a200ff..e3c66d45720e90dbd552c2aedfb4d96fb1639799 100644 +index 14c06298157c4a6c6061df01b213e69b6c3481d5..976dbe680ef56095071b0416d5e1f0d68cf546e6 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -@@ -1087,5 +1087,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { +@@ -1101,5 +1101,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { Location origin = getHandle().origin; return origin == null ? null : origin.clone(); } diff --git a/Spigot-Server-Patches/0156-Improve-the-Saddle-API-for-Horses.patch b/Spigot-Server-Patches/0157-Improve-the-Saddle-API-for-Horses.patch similarity index 100% rename from Spigot-Server-Patches/0156-Improve-the-Saddle-API-for-Horses.patch rename to Spigot-Server-Patches/0157-Improve-the-Saddle-API-for-Horses.patch diff --git a/Spigot-Server-Patches/0157-Implement-ensureServerConversions-API.patch b/Spigot-Server-Patches/0158-Implement-ensureServerConversions-API.patch similarity index 62% rename from Spigot-Server-Patches/0157-Implement-ensureServerConversions-API.patch rename to Spigot-Server-Patches/0158-Implement-ensureServerConversions-API.patch index 93a0d5cd39..dcd7d904c6 100644 --- a/Spigot-Server-Patches/0157-Implement-ensureServerConversions-API.patch +++ b/Spigot-Server-Patches/0158-Implement-ensureServerConversions-API.patch @@ -7,17 +7,18 @@ This will take a Bukkit ItemStack and run it through any conversions a server pr to ensure it meets latest minecraft expectations. diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -index 89a3617068421bb86baf4e8bfd9df2d0626adff7..bee1de72de76738d5eed2e0ca5ae8c0a65be7595 100644 +index a50eb746b8774a089c39652d534920acf708b137..83fb73ccde7809c6f712af35400d607fcd791882 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -@@ -334,4 +334,10 @@ public final class CraftItemFactory implements ItemFactory { - public Material updateMaterial(ItemMeta meta, Material material) throws IllegalArgumentException { - return ((CraftMetaItem) meta).updateMaterial(material); +@@ -341,5 +341,11 @@ public final class CraftItemFactory implements ItemFactory { + final net.minecraft.server.NBTTagCompound tag = CraftItemStack.asNMSCopy(item).getTag(); + return net.kyori.adventure.text.event.HoverEvent.showItem(op.apply(net.kyori.adventure.text.event.HoverEvent.ShowItem.of(item.getType().getKey(), item.getAmount(), io.papermc.paper.adventure.PaperAdventure.asBinaryTagHolder(tag)))); } ++ + // Paper start + @Override + public ItemStack ensureServerConversions(ItemStack item) { + return CraftItemStack.asCraftMirror(CraftItemStack.asNMSCopy(item)); + } -+ // Paper end + // Paper end } diff --git a/Spigot-Server-Patches/0158-Implement-getI18NDisplayName.patch b/Spigot-Server-Patches/0159-Implement-getI18NDisplayName.patch similarity index 93% rename from Spigot-Server-Patches/0158-Implement-getI18NDisplayName.patch rename to Spigot-Server-Patches/0159-Implement-getI18NDisplayName.patch index 2349a19f78..3e92b7e3a0 100644 --- a/Spigot-Server-Patches/0158-Implement-getI18NDisplayName.patch +++ b/Spigot-Server-Patches/0159-Implement-getI18NDisplayName.patch @@ -34,10 +34,10 @@ index cc5b6512fa115f73800b6894a2d58107b6495e07..29d55483510d3644a1edd3a01d731423 public abstract boolean b(String s); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -index bee1de72de76738d5eed2e0ca5ae8c0a65be7595..1c3e6e0c9abe681bf9e7305a74a68c1506ad8d0c 100644 +index 83fb73ccde7809c6f712af35400d607fcd791882..bf8a8cad248583c900eacfaf54e30f0a60e1dc54 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -@@ -339,5 +339,18 @@ public final class CraftItemFactory implements ItemFactory { +@@ -347,5 +347,18 @@ public final class CraftItemFactory implements ItemFactory { public ItemStack ensureServerConversions(ItemStack item) { return CraftItemStack.asCraftMirror(CraftItemStack.asNMSCopy(item)); } diff --git a/Spigot-Server-Patches/0159-ProfileWhitelistVerifyEvent.patch b/Spigot-Server-Patches/0160-ProfileWhitelistVerifyEvent.patch similarity index 76% rename from Spigot-Server-Patches/0159-ProfileWhitelistVerifyEvent.patch rename to Spigot-Server-Patches/0160-ProfileWhitelistVerifyEvent.patch index ace5cb1e2d..e30e6998e2 100644 --- a/Spigot-Server-Patches/0159-ProfileWhitelistVerifyEvent.patch +++ b/Spigot-Server-Patches/0160-ProfileWhitelistVerifyEvent.patch @@ -5,17 +5,18 @@ Subject: [PATCH] ProfileWhitelistVerifyEvent diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 6b12c1d96a2b0ea305425a563dd0e908c611db89..02479d398189f0956a6e2a8882f398e33853873e 100644 +index 07ab0bf135a6903c936606296b6701b970ad48db..d574bc5755b3075aa8d4a566262ee391b463be19 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -543,9 +543,9 @@ public abstract class PlayerList { // return chatmessage; - if (!gameprofilebanentry.hasExpired()) event.disallow(PlayerLoginEvent.Result.KICK_BANNED, CraftChatMessage.fromComponent(chatmessage)); // Spigot + if (!gameprofilebanentry.hasExpired()) event.disallow(PlayerLoginEvent.Result.KICK_BANNED, PaperAdventure.asAdventure(chatmessage)); // Spigot // Paper - Adventure - } else if (!this.isWhitelisted(gameprofile)) { +- chatmessage = new ChatMessage("multiplayer.disconnect.not_whitelisted"); +- event.disallow(PlayerLoginEvent.Result.KICK_WHITELIST, net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(org.spigotmc.SpigotConfig.whitelistMessage)); // Spigot // Paper - Adventure + } else if (!this.isWhitelisted(gameprofile, event)) { // Paper - chatmessage = new ChatMessage("multiplayer.disconnect.not_whitelisted"); -- event.disallow(PlayerLoginEvent.Result.KICK_WHITELIST, org.spigotmc.SpigotConfig.whitelistMessage); // Spigot ++ //chatmessage = new ChatMessage("multiplayer.disconnect.not_whitelisted"); // Paper + //event.disallow(PlayerLoginEvent.Result.KICK_WHITELIST, org.spigotmc.SpigotConfig.whitelistMessage); // Spigot // Paper - moved to isWhitelisted } else if (getIPBans().isBanned(socketaddress) && !getIPBans().get(socketaddress).hasExpired()) { IpBanEntry ipbanentry = this.l.get(socketaddress); @@ -37,7 +38,7 @@ index 6b12c1d96a2b0ea305425a563dd0e908c611db89..02479d398189f0956a6e2a8882f398e3 + event.callEvent(); + if (!event.isWhitelisted()) { + if (loginEvent != null) { -+ loginEvent.disallow(PlayerLoginEvent.Result.KICK_WHITELIST, event.getKickMessage() == null ? org.spigotmc.SpigotConfig.whitelistMessage : event.getKickMessage()); ++ loginEvent.disallow(PlayerLoginEvent.Result.KICK_WHITELIST, net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(event.getKickMessage() == null ? org.spigotmc.SpigotConfig.whitelistMessage : event.getKickMessage())); + } + return false; + } diff --git a/Spigot-Server-Patches/0160-Fix-this-stupid-bullshit.patch b/Spigot-Server-Patches/0161-Fix-this-stupid-bullshit.patch similarity index 100% rename from Spigot-Server-Patches/0160-Fix-this-stupid-bullshit.patch rename to Spigot-Server-Patches/0161-Fix-this-stupid-bullshit.patch diff --git a/Spigot-Server-Patches/0161-Ocelot-despawns-should-honor-nametags-and-leash.patch b/Spigot-Server-Patches/0162-Ocelot-despawns-should-honor-nametags-and-leash.patch similarity index 100% rename from Spigot-Server-Patches/0161-Ocelot-despawns-should-honor-nametags-and-leash.patch rename to Spigot-Server-Patches/0162-Ocelot-despawns-should-honor-nametags-and-leash.patch diff --git a/Spigot-Server-Patches/0162-Reset-spawner-timer-when-spawner-event-is-cancelled.patch b/Spigot-Server-Patches/0163-Reset-spawner-timer-when-spawner-event-is-cancelled.patch similarity index 100% rename from Spigot-Server-Patches/0162-Reset-spawner-timer-when-spawner-event-is-cancelled.patch rename to Spigot-Server-Patches/0163-Reset-spawner-timer-when-spawner-event-is-cancelled.patch diff --git a/Spigot-Server-Patches/0163-Fix-MC-117075-TE-Unload-Lag-Spike.patch b/Spigot-Server-Patches/0164-Fix-MC-117075-TE-Unload-Lag-Spike.patch similarity index 92% rename from Spigot-Server-Patches/0163-Fix-MC-117075-TE-Unload-Lag-Spike.patch rename to Spigot-Server-Patches/0164-Fix-MC-117075-TE-Unload-Lag-Spike.patch index 6bf1dfc083..afd09e16ae 100644 --- a/Spigot-Server-Patches/0163-Fix-MC-117075-TE-Unload-Lag-Spike.patch +++ b/Spigot-Server-Patches/0164-Fix-MC-117075-TE-Unload-Lag-Spike.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix MC-117075: TE Unload Lag Spike diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 7deac857ab2218d7caa71a8b7b42fea0ab200b96..aba716e98f21e1635f24323bf1f03bad84b318aa 100644 +index f773c19d69ebcb75cf97b07fd015baf3d6e6cae8..f3ac45a5936c2fbf3b013bfbb904effed5241e15 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -673,7 +673,11 @@ public abstract class World implements GeneratorAccess, AutoCloseable { diff --git a/Spigot-Server-Patches/0164-Allow-specifying-a-custom-authentication-servers-dow.patch b/Spigot-Server-Patches/0165-Allow-specifying-a-custom-authentication-servers-dow.patch similarity index 93% rename from Spigot-Server-Patches/0164-Allow-specifying-a-custom-authentication-servers-dow.patch rename to Spigot-Server-Patches/0165-Allow-specifying-a-custom-authentication-servers-dow.patch index 2a41c8a921..8c73ba39a3 100644 --- a/Spigot-Server-Patches/0164-Allow-specifying-a-custom-authentication-servers-dow.patch +++ b/Spigot-Server-Patches/0165-Allow-specifying-a-custom-authentication-servers-dow.patch @@ -27,10 +27,10 @@ index ed519159c37299595b4eaeaab5131a8ec3d9d27e..cedc8c45224fe991a2ec8dd2ed435eda + } } diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java -index 3772268f91bbd726995f6006e2b2ee7048eb376c..c38255b43a9870bf8e20a3ca037f691934e5f146 100644 +index a7b57185d337846d8f7b296b31665315d375ecd5..a8f155b7149d5702896375c7cae1c8c573543060 100644 --- a/src/main/java/net/minecraft/server/LoginListener.java +++ b/src/main/java/net/minecraft/server/LoginListener.java -@@ -257,6 +257,10 @@ public class LoginListener implements PacketLoginInListener { +@@ -258,6 +258,10 @@ public class LoginListener implements PacketLoginInListener { LoginListener.this.i = LoginListener.this.a(gameprofile); LoginListener.this.g = LoginListener.EnumProtocolState.READY_TO_ACCEPT; } else { diff --git a/Spigot-Server-Patches/0165-LivingEntity-setKiller.patch b/Spigot-Server-Patches/0166-LivingEntity-setKiller.patch similarity index 100% rename from Spigot-Server-Patches/0165-LivingEntity-setKiller.patch rename to Spigot-Server-Patches/0166-LivingEntity-setKiller.patch diff --git a/Spigot-Server-Patches/0166-Handle-plugin-prefixes-using-Log4J-configuration.patch b/Spigot-Server-Patches/0167-Handle-plugin-prefixes-using-Log4J-configuration.patch similarity index 100% rename from Spigot-Server-Patches/0166-Handle-plugin-prefixes-using-Log4J-configuration.patch rename to Spigot-Server-Patches/0167-Handle-plugin-prefixes-using-Log4J-configuration.patch diff --git a/Spigot-Server-Patches/0167-Include-Log4J2-SLF4J-implementation.patch b/Spigot-Server-Patches/0168-Include-Log4J2-SLF4J-implementation.patch similarity index 100% rename from Spigot-Server-Patches/0167-Include-Log4J2-SLF4J-implementation.patch rename to Spigot-Server-Patches/0168-Include-Log4J2-SLF4J-implementation.patch diff --git a/Spigot-Server-Patches/0168-Improve-Log4J-Configuration-Plugin-Loggers.patch b/Spigot-Server-Patches/0169-Improve-Log4J-Configuration-Plugin-Loggers.patch similarity index 100% rename from Spigot-Server-Patches/0168-Improve-Log4J-Configuration-Plugin-Loggers.patch rename to Spigot-Server-Patches/0169-Improve-Log4J-Configuration-Plugin-Loggers.patch diff --git a/Spigot-Server-Patches/0169-Add-PlayerJumpEvent.patch b/Spigot-Server-Patches/0170-Add-PlayerJumpEvent.patch similarity index 96% rename from Spigot-Server-Patches/0169-Add-PlayerJumpEvent.patch rename to Spigot-Server-Patches/0170-Add-PlayerJumpEvent.patch index 45da65cd0a..70bbcf292e 100644 --- a/Spigot-Server-Patches/0169-Add-PlayerJumpEvent.patch +++ b/Spigot-Server-Patches/0170-Add-PlayerJumpEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerJumpEvent diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index e83f1bfe2b2c33b3bc6788de6998356430857855..5429e91dec8aa29d8c641db09a1b4de0acd0f5bb 100644 +index 331282ed36989c3b29e2a0ad5c3704bd869d1893..2bde97c695cc6cdc097b43db1267ed73ac4e5117 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -1017,7 +1017,34 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0170-handle-PacketPlayInKeepAlive-async.patch b/Spigot-Server-Patches/0171-handle-PacketPlayInKeepAlive-async.patch similarity index 92% rename from Spigot-Server-Patches/0170-handle-PacketPlayInKeepAlive-async.patch rename to Spigot-Server-Patches/0171-handle-PacketPlayInKeepAlive-async.patch index 49cd3253f3..9575ef322c 100644 --- a/Spigot-Server-Patches/0170-handle-PacketPlayInKeepAlive-async.patch +++ b/Spigot-Server-Patches/0171-handle-PacketPlayInKeepAlive-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/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 5429e91dec8aa29d8c641db09a1b4de0acd0f5bb..5b74b394bb832699d2d54030ee691fbe9648f170 100644 +index 2bde97c695cc6cdc097b43db1267ed73ac4e5117..f61471e726928c18b9e181c98d69717384b130f4 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -2619,14 +2619,18 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -2621,14 +2621,18 @@ public class PlayerConnection implements PacketListenerPlayIn { @Override public void a(PacketPlayInKeepAlive packetplayinkeepalive) { diff --git a/Spigot-Server-Patches/0171-Expose-client-protocol-version-and-virtual-host.patch b/Spigot-Server-Patches/0172-Expose-client-protocol-version-and-virtual-host.patch similarity index 98% rename from Spigot-Server-Patches/0171-Expose-client-protocol-version-and-virtual-host.patch rename to Spigot-Server-Patches/0172-Expose-client-protocol-version-and-virtual-host.patch index b15009e387..b2d2c3535c 100644 --- a/Spigot-Server-Patches/0171-Expose-client-protocol-version-and-virtual-host.patch +++ b/Spigot-Server-Patches/0172-Expose-client-protocol-version-and-virtual-host.patch @@ -103,7 +103,7 @@ index 4f008e4723d2cb0bcabb2d5621203d63c40c4923..8545146fb1f093f821e3b966d9337049 return this.a; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 7823ddab7f0bf9b1096cf4a3d54324e8bbb86a09..8f3d5ab144576abc503c7d5e71841e4066570b15 100644 +index 82c99fbab334e16c39ac23ca3765f9543e8d147a..80fd6bf4c36738cfa3c5f202760908bb35499efe 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -187,6 +187,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0172-revert-serverside-behavior-of-keepalives.patch b/Spigot-Server-Patches/0173-revert-serverside-behavior-of-keepalives.patch similarity index 93% rename from Spigot-Server-Patches/0172-revert-serverside-behavior-of-keepalives.patch rename to Spigot-Server-Patches/0173-revert-serverside-behavior-of-keepalives.patch index 4e8c4e8337..c4dc69c76e 100644 --- a/Spigot-Server-Patches/0172-revert-serverside-behavior-of-keepalives.patch +++ b/Spigot-Server-Patches/0173-revert-serverside-behavior-of-keepalives.patch @@ -17,10 +17,10 @@ from networking or during connections flood of chunk packets on slower clients, at the cost of dead connections being kept open for longer. diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 5b74b394bb832699d2d54030ee691fbe9648f170..479d3f9d5fd8d619655811b32e8182cc23a538f9 100644 +index f61471e726928c18b9e181c98d69717384b130f4..bbf89a81489bc6ec5741448b246ce9926b87b4e1 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -74,7 +74,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -76,7 +76,7 @@ public class PlayerConnection implements PacketListenerPlayIn { private final MinecraftServer minecraftServer; public EntityPlayer player; private int e; @@ -29,7 +29,7 @@ index 5b74b394bb832699d2d54030ee691fbe9648f170..479d3f9d5fd8d619655811b32e8182cc private boolean awaitingKeepAlive; private void setPendingPing(boolean isPending) { this.awaitingKeepAlive = isPending;}; private boolean isPendingPing() { return this.awaitingKeepAlive;}; // Paper - OBFHELPER private long h; private void setKeepAliveID(long keepAliveID) { this.h = keepAliveID;}; private long getKeepAliveID() {return this.h; }; // Paper - OBFHELPER // CraftBukkit start - multithreaded fields -@@ -105,6 +105,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -107,6 +107,7 @@ public class PlayerConnection implements PacketListenerPlayIn { private int E; private int receivedMovePackets; private int processedMovePackets; @@ -37,7 +37,7 @@ index 5b74b394bb832699d2d54030ee691fbe9648f170..479d3f9d5fd8d619655811b32e8182cc public PlayerConnection(MinecraftServer minecraftserver, NetworkManager networkmanager, EntityPlayer entityplayer) { this.minecraftServer = minecraftserver; -@@ -191,18 +192,25 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -193,18 +194,25 @@ public class PlayerConnection implements PacketListenerPlayIn { } this.minecraftServer.getMethodProfiler().enter("keepAlive"); diff --git a/Spigot-Server-Patches/0173-Send-attack-SoundEffects-only-to-players-who-can-see.patch b/Spigot-Server-Patches/0174-Send-attack-SoundEffects-only-to-players-who-can-see.patch similarity index 100% rename from Spigot-Server-Patches/0173-Send-attack-SoundEffects-only-to-players-who-can-see.patch rename to Spigot-Server-Patches/0174-Send-attack-SoundEffects-only-to-players-who-can-see.patch diff --git a/Spigot-Server-Patches/0174-Option-for-maximum-exp-value-when-merging-orbs.patch b/Spigot-Server-Patches/0175-Option-for-maximum-exp-value-when-merging-orbs.patch similarity index 95% rename from Spigot-Server-Patches/0174-Option-for-maximum-exp-value-when-merging-orbs.patch rename to Spigot-Server-Patches/0175-Option-for-maximum-exp-value-when-merging-orbs.patch index ee2e1c9c5e..e4879a422e 100644 --- a/Spigot-Server-Patches/0174-Option-for-maximum-exp-value-when-merging-orbs.patch +++ b/Spigot-Server-Patches/0175-Option-for-maximum-exp-value-when-merging-orbs.patch @@ -20,10 +20,10 @@ index 90ca51dfdbb3045dd528450225cba96f5834166e..6c692e58cde22003ecbf6dc569579914 + } } diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 3dc4d0a3abe4eb0c2024dfc77f3be57f3d2a018c..dfab818d71ea6a063dd94f40a363111319817d6c 100644 +index 1db30da4294f1187eeacecfc056a44963378a1cc..56730babb7eb42625155361d47070d4e46bab9d0 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -577,16 +577,32 @@ public class CraftEventFactory { +@@ -583,16 +583,32 @@ public class CraftEventFactory { EntityExperienceOrb xp = (EntityExperienceOrb) entity; double radius = world.spigotConfig.expMerge; if (radius > 0) { diff --git a/Spigot-Server-Patches/0175-Add-PlayerArmorChangeEvent.patch b/Spigot-Server-Patches/0176-Add-PlayerArmorChangeEvent.patch similarity index 100% rename from Spigot-Server-Patches/0175-Add-PlayerArmorChangeEvent.patch rename to Spigot-Server-Patches/0176-Add-PlayerArmorChangeEvent.patch diff --git a/Spigot-Server-Patches/0176-Prevent-logins-from-being-processed-when-the-player-.patch b/Spigot-Server-Patches/0177-Prevent-logins-from-being-processed-when-the-player-.patch similarity index 86% rename from Spigot-Server-Patches/0176-Prevent-logins-from-being-processed-when-the-player-.patch rename to Spigot-Server-Patches/0177-Prevent-logins-from-being-processed-when-the-player-.patch index afbd0f1d17..65dd6ff822 100644 --- a/Spigot-Server-Patches/0176-Prevent-logins-from-being-processed-when-the-player-.patch +++ b/Spigot-Server-Patches/0177-Prevent-logins-from-being-processed-when-the-player-.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Prevent logins from being processed when the player has diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java -index c38255b43a9870bf8e20a3ca037f691934e5f146..63769f6d6e82f4c3758db0f82314c3cc28d44011 100644 +index a8f155b7149d5702896375c7cae1c8c573543060..144df45865105a65ed87053935878b3f12146f4a 100644 --- a/src/main/java/net/minecraft/server/LoginListener.java +++ b/src/main/java/net/minecraft/server/LoginListener.java -@@ -56,7 +56,11 @@ public class LoginListener implements PacketLoginInListener { +@@ -57,7 +57,11 @@ public class LoginListener implements PacketLoginInListener { } // Paper end if (this.g == LoginListener.EnumProtocolState.READY_TO_ACCEPT) { diff --git a/Spigot-Server-Patches/0177-use-CB-BlockState-implementations-for-captured-block.patch b/Spigot-Server-Patches/0178-use-CB-BlockState-implementations-for-captured-block.patch similarity index 97% rename from Spigot-Server-Patches/0177-use-CB-BlockState-implementations-for-captured-block.patch rename to Spigot-Server-Patches/0178-use-CB-BlockState-implementations-for-captured-block.patch index ac4f31810f..64b878b6dc 100644 --- a/Spigot-Server-Patches/0177-use-CB-BlockState-implementations-for-captured-block.patch +++ b/Spigot-Server-Patches/0178-use-CB-BlockState-implementations-for-captured-block.patch @@ -18,7 +18,7 @@ the blockstate that will be valid for restoration, as opposed to dropping information on restoration when the event is cancelled. diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index aba716e98f21e1635f24323bf1f03bad84b318aa..d3c282eb5253351ec4288bffaeca715547089cec 100644 +index f3ac45a5936c2fbf3b013bfbb904effed5241e15..33444cd8aec8ce39fb4fef232909cd42ef036d54 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -71,7 +71,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { diff --git a/Spigot-Server-Patches/0178-API-to-get-a-BlockState-without-a-snapshot.patch b/Spigot-Server-Patches/0179-API-to-get-a-BlockState-without-a-snapshot.patch similarity index 97% rename from Spigot-Server-Patches/0178-API-to-get-a-BlockState-without-a-snapshot.patch rename to Spigot-Server-Patches/0179-API-to-get-a-BlockState-without-a-snapshot.patch index 5b0bd5b5b1..03f58557fc 100644 --- a/Spigot-Server-Patches/0178-API-to-get-a-BlockState-without-a-snapshot.patch +++ b/Spigot-Server-Patches/0179-API-to-get-a-BlockState-without-a-snapshot.patch @@ -81,12 +81,12 @@ index 5de8463c94612edd11e02ac5d9757382c9598e7d..661bb54c27966c8050644b293d99dfe8 switch (material) { diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java -index 8a7e9302b4b6be086144add8df610b76b58e00d6..cca1c2ca5c1fe91fda30ace6f06a343b7850842e 100644 +index 26cc40e57f5b73b9c32859bff37c4a3d94904c56..feeae1a9eb309ae4101783b191bb2bffe9aeb7d3 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java @@ -26,20 +26,40 @@ public class CraftBlockEntityState extends CraftBlockState this.tileEntity = tileEntityClass.cast(world.getHandle().getTileEntity(this.getPosition())); - Preconditions.checkState(this.tileEntity != null, "Tile is null, asynchronous access? %s", block); + Preconditions.checkState(this.tileEntity != null, "Tile is null, asynchronous access? " + block); + // Paper start + this.snapshotDisabled = DISABLE_SNAPSHOT; diff --git a/Spigot-Server-Patches/0179-AsyncTabCompleteEvent.patch b/Spigot-Server-Patches/0180-AsyncTabCompleteEvent.patch similarity index 96% rename from Spigot-Server-Patches/0179-AsyncTabCompleteEvent.patch rename to Spigot-Server-Patches/0180-AsyncTabCompleteEvent.patch index abd2731d84..3a05ae3f83 100644 --- a/Spigot-Server-Patches/0179-AsyncTabCompleteEvent.patch +++ b/Spigot-Server-Patches/0180-AsyncTabCompleteEvent.patch @@ -14,7 +14,7 @@ completion, such as offline players. Also adds isCommand and getLocation to the sync TabCompleteEvent diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 479d3f9d5fd8d619655811b32e8182cc23a538f9..c3651ff73c0831f0dd727f6358aa45fbaeebfb1d 100644 +index bbf89a81489bc6ec5741448b246ce9926b87b4e1..fa4ae84f7ed03da24d89268c4c5664430d9e332b 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -562,10 +562,10 @@ public class PlayerConnection implements PacketListenerPlayIn { @@ -72,10 +72,10 @@ index 479d3f9d5fd8d619655811b32e8182cc23a538f9..c3651ff73c0831f0dd727f6358aa45fb @Override diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index b6d45407eca3f76299812c7cf98d1fd5d5ade1e2..56b8ff90e56bc553d14b8e2e2695754f08363951 100644 +index e89b0502b243a35ddc6c765b45cf2d69e491daff..441547cdae0c2b2d61f79e537896f7521279b478 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1796,7 +1796,7 @@ public final class CraftServer implements Server { +@@ -1845,7 +1845,7 @@ public final class CraftServer implements Server { offers = tabCompleteChat(player, message); } diff --git a/Spigot-Server-Patches/0180-Avoid-NPE-in-PathfinderGoalTempt.patch b/Spigot-Server-Patches/0181-Avoid-NPE-in-PathfinderGoalTempt.patch similarity index 100% rename from Spigot-Server-Patches/0180-Avoid-NPE-in-PathfinderGoalTempt.patch rename to Spigot-Server-Patches/0181-Avoid-NPE-in-PathfinderGoalTempt.patch diff --git a/Spigot-Server-Patches/0181-PlayerPickupExperienceEvent.patch b/Spigot-Server-Patches/0182-PlayerPickupExperienceEvent.patch similarity index 100% rename from Spigot-Server-Patches/0181-PlayerPickupExperienceEvent.patch rename to Spigot-Server-Patches/0182-PlayerPickupExperienceEvent.patch diff --git a/Spigot-Server-Patches/0182-ExperienceOrbMergeEvent.patch b/Spigot-Server-Patches/0183-ExperienceOrbMergeEvent.patch similarity index 91% rename from Spigot-Server-Patches/0182-ExperienceOrbMergeEvent.patch rename to Spigot-Server-Patches/0183-ExperienceOrbMergeEvent.patch index 4099d39b9c..4f3e6f845f 100644 --- a/Spigot-Server-Patches/0182-ExperienceOrbMergeEvent.patch +++ b/Spigot-Server-Patches/0183-ExperienceOrbMergeEvent.patch @@ -8,10 +8,10 @@ Plugins can cancel this if they want to ensure experience orbs do not lose impor metadata such as spawn reason, or conditionally move data from source to target. diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index dfab818d71ea6a063dd94f40a363111319817d6c..70a678dc8637897378f9924bae159233b181f817 100644 +index 56730babb7eb42625155361d47070d4e46bab9d0..7805ba48a33b12fb7094cd88972f422b14549c8f 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -587,7 +587,7 @@ public class CraftEventFactory { +@@ -593,7 +593,7 @@ public class CraftEventFactory { if (e instanceof EntityExperienceOrb) { EntityExperienceOrb loopItem = (EntityExperienceOrb) e; // Paper start diff --git a/Spigot-Server-Patches/0183-Ability-to-apply-mending-to-XP-API.patch b/Spigot-Server-Patches/0184-Ability-to-apply-mending-to-XP-API.patch similarity index 96% rename from Spigot-Server-Patches/0183-Ability-to-apply-mending-to-XP-API.patch rename to Spigot-Server-Patches/0184-Ability-to-apply-mending-to-XP-API.patch index 0cec312cd6..24bdc238b5 100644 --- a/Spigot-Server-Patches/0183-Ability-to-apply-mending-to-XP-API.patch +++ b/Spigot-Server-Patches/0184-Ability-to-apply-mending-to-XP-API.patch @@ -42,10 +42,10 @@ index 8354d18aa03d29202c82227a1891903a64c7921b..4df7df781d12e38885ecfbc89dd1d42d return i * 2; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 8f3d5ab144576abc503c7d5e71841e4066570b15..168c7995d3d3efb20768706f4fdf9f1f15e92eb6 100644 +index 80fd6bf4c36738cfa3c5f202760908bb35499efe..8c72a53f1bf8846983122d3398ca22e70f1c429a 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1097,8 +1097,37 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1167,8 +1167,37 @@ public class CraftPlayer extends CraftHumanEntity implements Player { return GameMode.getByValue(getHandle().playerInteractManager.getGameMode().getId()); } diff --git a/Spigot-Server-Patches/0184-Make-max-squid-spawn-height-configurable.patch b/Spigot-Server-Patches/0185-Make-max-squid-spawn-height-configurable.patch similarity index 100% rename from Spigot-Server-Patches/0184-Make-max-squid-spawn-height-configurable.patch rename to Spigot-Server-Patches/0185-Make-max-squid-spawn-height-configurable.patch diff --git a/Spigot-Server-Patches/0185-PreCreatureSpawnEvent.patch b/Spigot-Server-Patches/0186-PreCreatureSpawnEvent.patch similarity index 100% rename from Spigot-Server-Patches/0185-PreCreatureSpawnEvent.patch rename to Spigot-Server-Patches/0186-PreCreatureSpawnEvent.patch diff --git a/Spigot-Server-Patches/0186-PlayerNaturallySpawnCreaturesEvent.patch b/Spigot-Server-Patches/0187-PlayerNaturallySpawnCreaturesEvent.patch similarity index 92% rename from Spigot-Server-Patches/0186-PlayerNaturallySpawnCreaturesEvent.patch rename to Spigot-Server-Patches/0187-PlayerNaturallySpawnCreaturesEvent.patch index 65beb12f34..36d896ba9f 100644 --- a/Spigot-Server-Patches/0186-PlayerNaturallySpawnCreaturesEvent.patch +++ b/Spigot-Server-Patches/0187-PlayerNaturallySpawnCreaturesEvent.patch @@ -9,10 +9,10 @@ from triggering monster spawns on a server. Also a highly more effecient way to blanket block spawns in a world diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index a066026bce318683dcc022920dad39d7ec25e485..8017953af1df6c046a47ebe655e5d1afa68d50f8 100644 +index dd78f093f6ee9822c4a31d87f3c83d2f8fa4fcf8..b6ec5d0f281bac483f210fd8c45a8965cd97cc02 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -589,6 +589,15 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -581,6 +581,15 @@ public class ChunkProviderServer extends IChunkProvider { this.world.getMethodProfiler().exit(); //List list = Lists.newArrayList(this.playerChunkMap.f()); // Paper //Collections.shuffle(list); // Paper @@ -29,7 +29,7 @@ index a066026bce318683dcc022920dad39d7ec25e485..8017953af1df6c046a47ebe655e5d1af Optional optional = ((Either) playerchunk.a().getNow(PlayerChunk.UNLOADED_CHUNK)).left(); diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index ba64eb5e8e048a0bb70187efb0cdec17525a3d4a..2fafae87a59b4d5dfab251078d467f8a19b0f620 100644 +index fd7513008dde790107647f7f5b9670030696e064..3f559918e85b6d5c2ab8ff593b69d40c1db8bb16 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -1,5 +1,6 @@ @@ -39,7 +39,7 @@ index ba64eb5e8e048a0bb70187efb0cdec17525a3d4a..2fafae87a59b4d5dfab251078d467f8a import com.google.common.collect.Lists; import com.mojang.authlib.GameProfile; import com.mojang.datafixers.util.Either; -@@ -98,6 +99,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -100,6 +101,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { public boolean sentListPacket = false; public Integer clientViewDistance; // CraftBukkit end diff --git a/Spigot-Server-Patches/0187-Add-setPlayerProfile-API-for-Skulls.patch b/Spigot-Server-Patches/0188-Add-setPlayerProfile-API-for-Skulls.patch similarity index 100% rename from Spigot-Server-Patches/0187-Add-setPlayerProfile-API-for-Skulls.patch rename to Spigot-Server-Patches/0188-Add-setPlayerProfile-API-for-Skulls.patch diff --git a/Spigot-Server-Patches/0188-Fill-Profile-Property-Events.patch b/Spigot-Server-Patches/0189-Fill-Profile-Property-Events.patch similarity index 100% rename from Spigot-Server-Patches/0188-Fill-Profile-Property-Events.patch rename to Spigot-Server-Patches/0189-Fill-Profile-Property-Events.patch diff --git a/Spigot-Server-Patches/0189-PlayerAdvancementCriterionGrantEvent.patch b/Spigot-Server-Patches/0190-PlayerAdvancementCriterionGrantEvent.patch similarity index 100% rename from Spigot-Server-Patches/0189-PlayerAdvancementCriterionGrantEvent.patch rename to Spigot-Server-Patches/0190-PlayerAdvancementCriterionGrantEvent.patch diff --git a/Spigot-Server-Patches/0190-Add-ArmorStand-Item-Meta.patch b/Spigot-Server-Patches/0191-Add-ArmorStand-Item-Meta.patch similarity index 98% rename from Spigot-Server-Patches/0190-Add-ArmorStand-Item-Meta.patch rename to Spigot-Server-Patches/0191-Add-ArmorStand-Item-Meta.patch index 86a170d6ad..d36ab942da 100644 --- a/Spigot-Server-Patches/0190-Add-ArmorStand-Item-Meta.patch +++ b/Spigot-Server-Patches/0191-Add-ArmorStand-Item-Meta.patch @@ -264,10 +264,10 @@ index 1a3549480be056368bd6c9d1a98335b3bb07d1d5..25b310ad3f1bcefd04406b7efd1ffa82 + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index 9a41ad703ce382670f11cf84c4644d53f0e3cd1d..41627c49decca02635036c970674f958e4de1b4d 100644 +index da1af372453b0e32177454d87437bda5c5b530d0..6408cfdd52754167deed3a31d0913eb2e7bc4500 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -@@ -1418,6 +1418,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1442,6 +1442,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { CraftMetaCrossbow.CHARGED.NBT, CraftMetaCrossbow.CHARGED_PROJECTILES.NBT, CraftMetaSuspiciousStew.EFFECTS.NBT, diff --git a/Spigot-Server-Patches/0191-Extend-Player-Interact-cancellation.patch b/Spigot-Server-Patches/0192-Extend-Player-Interact-cancellation.patch similarity index 100% rename from Spigot-Server-Patches/0191-Extend-Player-Interact-cancellation.patch rename to Spigot-Server-Patches/0192-Extend-Player-Interact-cancellation.patch diff --git a/Spigot-Server-Patches/0192-Tameable-getOwnerUniqueId-API.patch b/Spigot-Server-Patches/0193-Tameable-getOwnerUniqueId-API.patch similarity index 100% rename from Spigot-Server-Patches/0192-Tameable-getOwnerUniqueId-API.patch rename to Spigot-Server-Patches/0193-Tameable-getOwnerUniqueId-API.patch diff --git a/Spigot-Server-Patches/0193-Toggleable-player-crits-helps-mitigate-hacked-client.patch b/Spigot-Server-Patches/0194-Toggleable-player-crits-helps-mitigate-hacked-client.patch similarity index 100% rename from Spigot-Server-Patches/0193-Toggleable-player-crits-helps-mitigate-hacked-client.patch rename to Spigot-Server-Patches/0194-Toggleable-player-crits-helps-mitigate-hacked-client.patch diff --git a/Spigot-Server-Patches/0194-Prevent-Frosted-Ice-from-loading-holding-chunks.patch b/Spigot-Server-Patches/0195-Prevent-Frosted-Ice-from-loading-holding-chunks.patch similarity index 100% rename from Spigot-Server-Patches/0194-Prevent-Frosted-Ice-from-loading-holding-chunks.patch rename to Spigot-Server-Patches/0195-Prevent-Frosted-Ice-from-loading-holding-chunks.patch diff --git a/Spigot-Server-Patches/0195-Disable-Explicit-Network-Manager-Flushing.patch b/Spigot-Server-Patches/0196-Disable-Explicit-Network-Manager-Flushing.patch similarity index 100% rename from Spigot-Server-Patches/0195-Disable-Explicit-Network-Manager-Flushing.patch rename to Spigot-Server-Patches/0196-Disable-Explicit-Network-Manager-Flushing.patch diff --git a/Spigot-Server-Patches/0196-Implement-extended-PaperServerListPingEvent.patch b/Spigot-Server-Patches/0197-Implement-extended-PaperServerListPingEvent.patch similarity index 99% rename from Spigot-Server-Patches/0196-Implement-extended-PaperServerListPingEvent.patch rename to Spigot-Server-Patches/0197-Implement-extended-PaperServerListPingEvent.patch index 55c415a01e..456e8bb738 100644 --- a/Spigot-Server-Patches/0196-Implement-extended-PaperServerListPingEvent.patch +++ b/Spigot-Server-Patches/0197-Implement-extended-PaperServerListPingEvent.patch @@ -200,7 +200,7 @@ index ee009052eb10125bbaca95b5fda306adbd8a9995..88b45c8b4f58ee83d625408eae08aa32 for (int k = 0; k < agameprofile.length; ++k) { diff --git a/src/main/java/net/minecraft/server/PacketStatusListener.java b/src/main/java/net/minecraft/server/PacketStatusListener.java -index 055555cb5ce63d41cb9a7f4114341b0685879b9e..9beb6fad228ccb3081b661c845836f4f29404d86 100644 +index 7875d4c08969b3adc6f95504686cc9fe99e3f29a..d0fad346dd4511722f958a8c0bda67492184fb62 100644 --- a/src/main/java/net/minecraft/server/PacketStatusListener.java +++ b/src/main/java/net/minecraft/server/PacketStatusListener.java @@ -35,6 +35,8 @@ public class PacketStatusListener implements PacketStatusInListener { diff --git a/Spigot-Server-Patches/0197-Improved-Async-Task-Scheduler.patch b/Spigot-Server-Patches/0198-Improved-Async-Task-Scheduler.patch similarity index 100% rename from Spigot-Server-Patches/0197-Improved-Async-Task-Scheduler.patch rename to Spigot-Server-Patches/0198-Improved-Async-Task-Scheduler.patch diff --git a/Spigot-Server-Patches/0198-Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch b/Spigot-Server-Patches/0199-Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch similarity index 89% rename from Spigot-Server-Patches/0198-Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch rename to Spigot-Server-Patches/0199-Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch index 86a9bb5e1c..57d67b3c62 100644 --- a/Spigot-Server-Patches/0198-Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch +++ b/Spigot-Server-Patches/0199-Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Ability to change PlayerProfile in AsyncPreLoginEvent This will allow you to change the players name or skin on login. diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java -index 63769f6d6e82f4c3758db0f82314c3cc28d44011..b8642986f4304b48bf88c4a1d4ddfab1fbae175a 100644 +index 144df45865105a65ed87053935878b3f12146f4a..92f42f17d7f554fca819d63c1f9401239894e0e1 100644 --- a/src/main/java/net/minecraft/server/LoginListener.java +++ b/src/main/java/net/minecraft/server/LoginListener.java @@ -1,5 +1,7 @@ @@ -17,15 +17,15 @@ index 63769f6d6e82f4c3758db0f82314c3cc28d44011..b8642986f4304b48bf88c4a1d4ddfab1 import com.mojang.authlib.GameProfile; import com.mojang.authlib.exceptions.AuthenticationUnavailableException; import java.math.BigInteger; -@@ -19,6 +21,7 @@ import org.apache.logging.log4j.LogManager; - import org.apache.logging.log4j.Logger; +@@ -20,6 +22,7 @@ import org.apache.logging.log4j.Logger; // CraftBukkit start + import io.papermc.paper.adventure.PaperAdventure; // Paper +import org.bukkit.Bukkit; import org.bukkit.craftbukkit.util.Waitable; import org.bukkit.event.player.AsyncPlayerPreLoginEvent; import org.bukkit.event.player.PlayerPreLoginEvent; -@@ -296,8 +299,16 @@ public class LoginListener implements PacketLoginInListener { +@@ -297,8 +300,16 @@ public class LoginListener implements PacketLoginInListener { java.util.UUID uniqueId = i.getId(); final org.bukkit.craftbukkit.CraftServer server = LoginListener.this.server.server; diff --git a/Spigot-Server-Patches/0199-Player.setPlayerProfile-API.patch b/Spigot-Server-Patches/0200-Player.setPlayerProfile-API.patch similarity index 92% rename from Spigot-Server-Patches/0199-Player.setPlayerProfile-API.patch rename to Spigot-Server-Patches/0200-Player.setPlayerProfile-API.patch index 6dddd1b839..e90cc68022 100644 --- a/Spigot-Server-Patches/0199-Player.setPlayerProfile-API.patch +++ b/Spigot-Server-Patches/0200-Player.setPlayerProfile-API.patch @@ -19,10 +19,10 @@ index a4bdedde80eee8bac475854735284826f06fcaef..3df97e5a4a85efa8a77808e58039afc0 private final ItemCooldown bM; @Nullable diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java -index b8642986f4304b48bf88c4a1d4ddfab1fbae175a..87dcb1688d1bf1221609a410c33a8d61b0761a1f 100644 +index 92f42f17d7f554fca819d63c1f9401239894e0e1..066b0dbdbc101a8235fb872c2d1e9d427dfd6bb8 100644 --- a/src/main/java/net/minecraft/server/LoginListener.java +++ b/src/main/java/net/minecraft/server/LoginListener.java -@@ -37,7 +37,7 @@ public class LoginListener implements PacketLoginInListener { +@@ -38,7 +38,7 @@ public class LoginListener implements PacketLoginInListener { public final NetworkManager networkManager; private LoginListener.EnumProtocolState g; private int h; @@ -31,7 +31,7 @@ index b8642986f4304b48bf88c4a1d4ddfab1fbae175a..87dcb1688d1bf1221609a410c33a8d61 private final String j; private SecretKey loginKey; private EntityPlayer l; -@@ -300,12 +300,12 @@ public class LoginListener implements PacketLoginInListener { +@@ -301,12 +301,12 @@ public class LoginListener implements PacketLoginInListener { final org.bukkit.craftbukkit.CraftServer server = LoginListener.this.server.server; // Paper start @@ -48,10 +48,10 @@ index b8642986f4304b48bf88c4a1d4ddfab1fbae175a..87dcb1688d1bf1221609a410c33a8d61 uniqueId = i.getId(); // Paper end diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 168c7995d3d3efb20768706f4fdf9f1f15e92eb6..a630265a84738b2d50fb1b571364df468cfb169c 100644 +index 8c72a53f1bf8846983122d3398ca22e70f1c429a..9398ec912372ffd4cd7042b9834290fa574b71b7 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1255,8 +1255,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1325,8 +1325,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { hiddenPlayers.put(player.getUniqueId(), hidingPlugins); // Remove this player from the hidden player's EntityTrackerEntry @@ -66,7 +66,7 @@ index 168c7995d3d3efb20768706f4fdf9f1f15e92eb6..a630265a84738b2d50fb1b571364df46 PlayerChunkMap.EntityTracker entry = tracker.trackedEntities.get(other.getId()); if (entry != null) { entry.clear(getHandle()); -@@ -1297,8 +1302,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1367,8 +1372,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } hiddenPlayers.remove(player.getUniqueId()); @@ -81,7 +81,7 @@ index 168c7995d3d3efb20768706f4fdf9f1f15e92eb6..a630265a84738b2d50fb1b571364df46 getHandle().playerConnection.sendPacket(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER, other)); -@@ -1307,6 +1317,50 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1377,6 +1387,50 @@ public class CraftPlayer extends CraftHumanEntity implements Player { entry.updatePlayer(getHandle()); } } diff --git a/Spigot-Server-Patches/0200-Fix-Dragon-Server-Crashes.patch b/Spigot-Server-Patches/0201-Fix-Dragon-Server-Crashes.patch similarity index 100% rename from Spigot-Server-Patches/0200-Fix-Dragon-Server-Crashes.patch rename to Spigot-Server-Patches/0201-Fix-Dragon-Server-Crashes.patch diff --git a/Spigot-Server-Patches/0201-getPlayerUniqueId-API.patch b/Spigot-Server-Patches/0202-getPlayerUniqueId-API.patch similarity index 91% rename from Spigot-Server-Patches/0201-getPlayerUniqueId-API.patch rename to Spigot-Server-Patches/0202-getPlayerUniqueId-API.patch index f4437c5dae..afdf5b1191 100644 --- a/Spigot-Server-Patches/0201-getPlayerUniqueId-API.patch +++ b/Spigot-Server-Patches/0202-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 56b8ff90e56bc553d14b8e2e2695754f08363951..bcb0191c2acb830e441fbf87838468954dc4c585 100644 +index 441547cdae0c2b2d61f79e537896f7521279b478..272c27a7a63b7c01ad9c5ecfdba0a36ca18ad5d6 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1492,6 +1492,26 @@ public final class CraftServer implements Server { +@@ -1512,6 +1512,26 @@ public final class CraftServer implements Server { return recipients.size(); } diff --git a/Spigot-Server-Patches/0202-Make-player-data-saving-configurable.patch b/Spigot-Server-Patches/0203-Make-player-data-saving-configurable.patch similarity index 100% rename from Spigot-Server-Patches/0202-Make-player-data-saving-configurable.patch rename to Spigot-Server-Patches/0203-Make-player-data-saving-configurable.patch diff --git a/Spigot-Server-Patches/0203-Make-legacy-ping-handler-more-reliable.patch b/Spigot-Server-Patches/0204-Make-legacy-ping-handler-more-reliable.patch similarity index 100% rename from Spigot-Server-Patches/0203-Make-legacy-ping-handler-more-reliable.patch rename to Spigot-Server-Patches/0204-Make-legacy-ping-handler-more-reliable.patch diff --git a/Spigot-Server-Patches/0204-Call-PaperServerListPingEvent-for-legacy-pings.patch b/Spigot-Server-Patches/0205-Call-PaperServerListPingEvent-for-legacy-pings.patch similarity index 100% rename from Spigot-Server-Patches/0204-Call-PaperServerListPingEvent-for-legacy-pings.patch rename to Spigot-Server-Patches/0205-Call-PaperServerListPingEvent-for-legacy-pings.patch diff --git a/Spigot-Server-Patches/0205-Flag-to-disable-the-channel-limit.patch b/Spigot-Server-Patches/0206-Flag-to-disable-the-channel-limit.patch similarity index 91% rename from Spigot-Server-Patches/0205-Flag-to-disable-the-channel-limit.patch rename to Spigot-Server-Patches/0206-Flag-to-disable-the-channel-limit.patch index eb85f19f27..e2997e4463 100644 --- a/Spigot-Server-Patches/0205-Flag-to-disable-the-channel-limit.patch +++ b/Spigot-Server-Patches/0206-Flag-to-disable-the-channel-limit.patch @@ -9,7 +9,7 @@ e.g. servers which allow and support the usage of mod packs. provide an optional flag to disable this check, at your own risk. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index a630265a84738b2d50fb1b571364df468cfb169c..0fc25497e7605a04088f888aab99482bd7187ae5 100644 +index 9398ec912372ffd4cd7042b9834290fa574b71b7..03b4d9f0a396ef8016e8f5a8be7198843bf0b8dd 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -140,6 +140,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -20,7 +20,7 @@ index a630265a84738b2d50fb1b571364df468cfb169c..0fc25497e7605a04088f888aab99482b // Paper end public CraftPlayer(CraftServer server, EntityPlayer entity) { -@@ -1523,7 +1524,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1593,7 +1594,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } public void addChannel(String channel) { diff --git a/Spigot-Server-Patches/0206-Add-method-to-open-already-placed-sign.patch b/Spigot-Server-Patches/0207-Add-method-to-open-already-placed-sign.patch similarity index 89% rename from Spigot-Server-Patches/0206-Add-method-to-open-already-placed-sign.patch rename to Spigot-Server-Patches/0207-Add-method-to-open-already-placed-sign.patch index 391ee86f19..0e191f19e0 100644 --- a/Spigot-Server-Patches/0206-Add-method-to-open-already-placed-sign.patch +++ b/Spigot-Server-Patches/0207-Add-method-to-open-already-placed-sign.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add method to open already placed sign diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -index 1f5f04aecfaccc80b2db8e14ba2c39f53528191b..99bd0b3f17dea43e85806fcad317ef8227d95715 100644 +index b1f837fcbaa2ab9d83bb8f17b24dd45fdc3b14e4..fb26a4f2953007b7fa503b654a99ca203ccc8caf 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -@@ -596,6 +596,17 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -604,6 +604,17 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { } } diff --git a/Spigot-Server-Patches/0207-Configurable-sprint-interruption-on-attack.patch b/Spigot-Server-Patches/0208-Configurable-sprint-interruption-on-attack.patch similarity index 100% rename from Spigot-Server-Patches/0207-Configurable-sprint-interruption-on-attack.patch rename to Spigot-Server-Patches/0208-Configurable-sprint-interruption-on-attack.patch diff --git a/Spigot-Server-Patches/0208-Fix-exploit-that-allowed-colored-signs-to-be-created.patch b/Spigot-Server-Patches/0209-Fix-exploit-that-allowed-colored-signs-to-be-created.patch similarity index 64% rename from Spigot-Server-Patches/0208-Fix-exploit-that-allowed-colored-signs-to-be-created.patch rename to Spigot-Server-Patches/0209-Fix-exploit-that-allowed-colored-signs-to-be-created.patch index e55f22cb25..695523bd68 100644 --- a/Spigot-Server-Patches/0208-Fix-exploit-that-allowed-colored-signs-to-be-created.patch +++ b/Spigot-Server-Patches/0209-Fix-exploit-that-allowed-colored-signs-to-be-created.patch @@ -5,17 +5,17 @@ Subject: [PATCH] Fix exploit that allowed colored signs to be created diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index c3651ff73c0831f0dd727f6358aa45fbaeebfb1d..f92a1d69119af0c6baee83cd96c344695f23dc3c 100644 +index fa4ae84f7ed03da24d89268c4c5664430d9e332b..a6a9ee8f34a61fbabfb1643b41cfb5e3a72cdf78 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -2631,7 +2631,7 @@ public class PlayerConnection implements PacketListenerPlayIn { - String[] lines = new String[4]; +@@ -2630,7 +2630,7 @@ public class PlayerConnection implements PacketListenerPlayIn { + List lines = new java.util.ArrayList<>(); for (int i = 0; i < list.size(); ++i) { -- lines[i] = EnumChatFormat.a(new ChatComponentText(EnumChatFormat.a((String) list.get(i))).getString()); -+ lines[i] = SharedConstants.filterAllowedChatCharacters(list.get(i)); // Paper - Replaced with anvil color stripping method to stop exploits that allow colored signs to be created. +- lines.add(net.kyori.adventure.text.Component.text(list.get(i))); ++ lines.add(net.kyori.adventure.text.Component.text(SharedConstants.filterAllowedChatCharacters(list.get(i)))); // Paper - Replaced with anvil color stripping method to stop exploits that allow colored signs to be created. } - SignChangeEvent event = new SignChangeEvent((org.bukkit.craftbukkit.block.CraftBlock) player.getWorld().getBlockAt(x, y, z), this.server.getPlayer(this.player), lines); + SignChangeEvent event = new SignChangeEvent(org.bukkit.craftbukkit.block.CraftBlock.at(worldserver, blockposition), this.getPlayer(), lines); this.server.getPluginManager().callEvent(event); diff --git a/src/main/java/net/minecraft/server/SharedConstants.java b/src/main/java/net/minecraft/server/SharedConstants.java index 9663e8c10662c9660964afda62d8a65812fae69d..470690dbe19db1622eca44f6801ece37d7ad7426 100644 diff --git a/Spigot-Server-Patches/0209-EndermanEscapeEvent.patch b/Spigot-Server-Patches/0210-EndermanEscapeEvent.patch similarity index 100% rename from Spigot-Server-Patches/0209-EndermanEscapeEvent.patch rename to Spigot-Server-Patches/0210-EndermanEscapeEvent.patch diff --git a/Spigot-Server-Patches/0210-Enderman.teleportRandomly.patch b/Spigot-Server-Patches/0211-Enderman.teleportRandomly.patch similarity index 100% rename from Spigot-Server-Patches/0210-Enderman.teleportRandomly.patch rename to Spigot-Server-Patches/0211-Enderman.teleportRandomly.patch diff --git a/Spigot-Server-Patches/0211-Block-Enderpearl-Travel-Exploit.patch b/Spigot-Server-Patches/0212-Block-Enderpearl-Travel-Exploit.patch similarity index 100% rename from Spigot-Server-Patches/0211-Block-Enderpearl-Travel-Exploit.patch rename to Spigot-Server-Patches/0212-Block-Enderpearl-Travel-Exploit.patch diff --git a/Spigot-Server-Patches/0212-Expand-World.spawnParticle-API-and-add-Builder.patch b/Spigot-Server-Patches/0213-Expand-World.spawnParticle-API-and-add-Builder.patch similarity index 93% rename from Spigot-Server-Patches/0212-Expand-World.spawnParticle-API-and-add-Builder.patch rename to Spigot-Server-Patches/0213-Expand-World.spawnParticle-API-and-add-Builder.patch index ed2e922b3a..d1beec32ad 100644 --- a/Spigot-Server-Patches/0212-Expand-World.spawnParticle-API-and-add-Builder.patch +++ b/Spigot-Server-Patches/0213-Expand-World.spawnParticle-API-and-add-Builder.patch @@ -10,7 +10,7 @@ Adds an option to control the force mode of the particle. This adds a new Builder API which is much friendlier to use. diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 885bf43a591492f19bd5a421ea4271854ae8f192..d192e341f0f6a3d03329dab16de3b19962091d2a 100644 +index e23a5f446a1e357493f5232c39baa45f7386a637..a1491094b58cf814d7b05d6c0ce4067bf34dae1a 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -61,7 +61,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -22,7 +22,7 @@ index 885bf43a591492f19bd5a421ea4271854ae8f192..d192e341f0f6a3d03329dab16de3b199 public final ChunkProviderServer chunkProvider; // Paper - public boolean tickingEntities; private final MinecraftServer server; -@@ -1368,12 +1368,17 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1357,12 +1357,17 @@ public class WorldServer extends World implements GeneratorAccessSeed { } public int sendParticles(EntityPlayer sender, T t0, double d0, double d1, double d2, int i, double d3, double d4, double d5, double d6, boolean force) { @@ -43,10 +43,10 @@ index 885bf43a591492f19bd5a421ea4271854ae8f192..d192e341f0f6a3d03329dab16de3b199 if (this.a(entityplayer, force, d0, d1, d2, packetplayoutworldparticles)) { // CraftBukkit diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 5bf5a815653b0556d9d2bcaf5f69026b77bd28a6..94fd77595a6bf2ee8deace75e243e5ce4286d82d 100644 +index 85562d2cafab6f81705b70ac1f965ccfb38abdf5..a13b2b549dc272ca37ef710c259407679fa2c00d 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -2339,11 +2339,17 @@ public class CraftWorld implements World { +@@ -2334,11 +2334,17 @@ public class CraftWorld implements World { @Override public void spawnParticle(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, T data, boolean force) { diff --git a/Spigot-Server-Patches/0213-EndermanAttackPlayerEvent.patch b/Spigot-Server-Patches/0214-EndermanAttackPlayerEvent.patch similarity index 100% rename from Spigot-Server-Patches/0213-EndermanAttackPlayerEvent.patch rename to Spigot-Server-Patches/0214-EndermanAttackPlayerEvent.patch diff --git a/Spigot-Server-Patches/0214-WitchConsumePotionEvent.patch b/Spigot-Server-Patches/0215-WitchConsumePotionEvent.patch similarity index 100% rename from Spigot-Server-Patches/0214-WitchConsumePotionEvent.patch rename to Spigot-Server-Patches/0215-WitchConsumePotionEvent.patch diff --git a/Spigot-Server-Patches/0215-WitchThrowPotionEvent.patch b/Spigot-Server-Patches/0216-WitchThrowPotionEvent.patch similarity index 100% rename from Spigot-Server-Patches/0215-WitchThrowPotionEvent.patch rename to Spigot-Server-Patches/0216-WitchThrowPotionEvent.patch diff --git a/Spigot-Server-Patches/0216-Allow-spawning-Item-entities-with-World.spawnEntity.patch b/Spigot-Server-Patches/0217-Allow-spawning-Item-entities-with-World.spawnEntity.patch similarity index 88% rename from Spigot-Server-Patches/0216-Allow-spawning-Item-entities-with-World.spawnEntity.patch rename to Spigot-Server-Patches/0217-Allow-spawning-Item-entities-with-World.spawnEntity.patch index de477b3923..dd3827f9f9 100644 --- a/Spigot-Server-Patches/0216-Allow-spawning-Item-entities-with-World.spawnEntity.patch +++ b/Spigot-Server-Patches/0217-Allow-spawning-Item-entities-with-World.spawnEntity.patch @@ -8,10 +8,10 @@ This API has more capabilities than .dropItem with the Consumer function Item can be set inside of the Consumer pre spawn function. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 94fd77595a6bf2ee8deace75e243e5ce4286d82d..3518505236e1b5c7267bc65756acd60f34873cfc 100644 +index a13b2b549dc272ca37ef710c259407679fa2c00d..77845ad43ea5950f0c9acb19ca844c0d90d44703 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1507,6 +1507,10 @@ public class CraftWorld implements World { +@@ -1502,6 +1502,10 @@ public class CraftWorld implements World { if (Boat.class.isAssignableFrom(clazz)) { entity = new EntityBoat(world, x, y, z); entity.setPositionRotation(x, y, z, yaw, pitch); diff --git a/Spigot-Server-Patches/0217-WitchReadyPotionEvent.patch b/Spigot-Server-Patches/0218-WitchReadyPotionEvent.patch similarity index 100% rename from Spigot-Server-Patches/0217-WitchReadyPotionEvent.patch rename to Spigot-Server-Patches/0218-WitchReadyPotionEvent.patch diff --git a/Spigot-Server-Patches/0218-ItemStack-getMaxItemUseDuration.patch b/Spigot-Server-Patches/0219-ItemStack-getMaxItemUseDuration.patch similarity index 100% rename from Spigot-Server-Patches/0218-ItemStack-getMaxItemUseDuration.patch rename to Spigot-Server-Patches/0219-ItemStack-getMaxItemUseDuration.patch diff --git a/Spigot-Server-Patches/0219-Implement-EntityTeleportEndGatewayEvent.patch b/Spigot-Server-Patches/0220-Implement-EntityTeleportEndGatewayEvent.patch similarity index 100% rename from Spigot-Server-Patches/0219-Implement-EntityTeleportEndGatewayEvent.patch rename to Spigot-Server-Patches/0220-Implement-EntityTeleportEndGatewayEvent.patch diff --git a/Spigot-Server-Patches/0220-Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch b/Spigot-Server-Patches/0221-Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch similarity index 100% rename from Spigot-Server-Patches/0220-Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch rename to Spigot-Server-Patches/0221-Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch diff --git a/Spigot-Server-Patches/0221-Fix-CraftEntity-hashCode.patch b/Spigot-Server-Patches/0222-Fix-CraftEntity-hashCode.patch similarity index 91% rename from Spigot-Server-Patches/0221-Fix-CraftEntity-hashCode.patch rename to Spigot-Server-Patches/0222-Fix-CraftEntity-hashCode.patch index e218a0858b..5f2f43d37a 100644 --- a/Spigot-Server-Patches/0221-Fix-CraftEntity-hashCode.patch +++ b/Spigot-Server-Patches/0222-Fix-CraftEntity-hashCode.patch @@ -21,10 +21,10 @@ check is essentially the same as this.getHandle() == other.getHandle() However, replaced it too to make it clearer of intent. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index e3c66d45720e90dbd552c2aedfb4d96fb1639799..018eea17881feeb6583a5b1ae2ab0795e962095b 100644 +index 976dbe680ef56095071b0416d5e1f0d68cf546e6..8eff62bcdc424cd8c040fd95124d11009f27a0d6 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -@@ -745,14 +745,15 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { +@@ -746,14 +746,15 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { return false; } final CraftEntity other = (CraftEntity) obj; diff --git a/Spigot-Server-Patches/0222-Configurable-Alternative-LootPool-Luck-Formula.patch b/Spigot-Server-Patches/0223-Configurable-Alternative-LootPool-Luck-Formula.patch similarity index 100% rename from Spigot-Server-Patches/0222-Configurable-Alternative-LootPool-Luck-Formula.patch rename to Spigot-Server-Patches/0223-Configurable-Alternative-LootPool-Luck-Formula.patch diff --git a/Spigot-Server-Patches/0223-Print-Error-details-when-failing-to-save-player-data.patch b/Spigot-Server-Patches/0224-Print-Error-details-when-failing-to-save-player-data.patch similarity index 100% rename from Spigot-Server-Patches/0223-Print-Error-details-when-failing-to-save-player-data.patch rename to Spigot-Server-Patches/0224-Print-Error-details-when-failing-to-save-player-data.patch diff --git a/Spigot-Server-Patches/0224-Make-shield-blocking-delay-configurable.patch b/Spigot-Server-Patches/0225-Make-shield-blocking-delay-configurable.patch similarity index 100% rename from Spigot-Server-Patches/0224-Make-shield-blocking-delay-configurable.patch rename to Spigot-Server-Patches/0225-Make-shield-blocking-delay-configurable.patch diff --git a/Spigot-Server-Patches/0225-Improve-EntityShootBowEvent.patch b/Spigot-Server-Patches/0226-Improve-EntityShootBowEvent.patch similarity index 100% rename from Spigot-Server-Patches/0225-Improve-EntityShootBowEvent.patch rename to Spigot-Server-Patches/0226-Improve-EntityShootBowEvent.patch diff --git a/Spigot-Server-Patches/0226-PlayerReadyArrowEvent.patch b/Spigot-Server-Patches/0227-PlayerReadyArrowEvent.patch similarity index 100% rename from Spigot-Server-Patches/0226-PlayerReadyArrowEvent.patch rename to Spigot-Server-Patches/0227-PlayerReadyArrowEvent.patch diff --git a/Spigot-Server-Patches/0227-Implement-EntityKnockbackByEntityEvent.patch b/Spigot-Server-Patches/0228-Implement-EntityKnockbackByEntityEvent.patch similarity index 100% rename from Spigot-Server-Patches/0227-Implement-EntityKnockbackByEntityEvent.patch rename to Spigot-Server-Patches/0228-Implement-EntityKnockbackByEntityEvent.patch diff --git a/Spigot-Server-Patches/0228-Expand-Explosions-API.patch b/Spigot-Server-Patches/0229-Expand-Explosions-API.patch similarity index 89% rename from Spigot-Server-Patches/0228-Expand-Explosions-API.patch rename to Spigot-Server-Patches/0229-Expand-Explosions-API.patch index 33d335e1b0..f8cb823f2a 100644 --- a/Spigot-Server-Patches/0228-Expand-Explosions-API.patch +++ b/Spigot-Server-Patches/0229-Expand-Explosions-API.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Expand Explosions API Add Entity as a Source capability, and add more API choices, and on Location. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 3518505236e1b5c7267bc65756acd60f34873cfc..5059ae88375ca9077f02fa521b9ff35018584417 100644 +index 77845ad43ea5950f0c9acb19ca844c0d90d44703..0471ac6cf1043f4a344b871aa85dcda4f04a5b5c 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -882,6 +882,11 @@ public class CraftWorld implements World { +@@ -877,6 +877,11 @@ public class CraftWorld implements World { public boolean createExplosion(double x, double y, double z, float power, boolean setFire, boolean breakBlocks, Entity source) { return !world.createExplosion(source == null ? null : ((CraftEntity) source).getHandle(), x, y, z, power, setFire, breakBlocks ? Explosion.Effect.BREAK : Explosion.Effect.NONE).wasCanceled; } diff --git a/Spigot-Server-Patches/0229-LivingEntity-Hand-Raised-Item-Use-API.patch b/Spigot-Server-Patches/0230-LivingEntity-Hand-Raised-Item-Use-API.patch similarity index 100% rename from Spigot-Server-Patches/0229-LivingEntity-Hand-Raised-Item-Use-API.patch rename to Spigot-Server-Patches/0230-LivingEntity-Hand-Raised-Item-Use-API.patch diff --git a/Spigot-Server-Patches/0230-RangedEntity-API.patch b/Spigot-Server-Patches/0231-RangedEntity-API.patch similarity index 100% rename from Spigot-Server-Patches/0230-RangedEntity-API.patch rename to Spigot-Server-Patches/0231-RangedEntity-API.patch diff --git a/Spigot-Server-Patches/0231-Add-config-to-disable-ender-dragon-legacy-check.patch b/Spigot-Server-Patches/0232-Add-config-to-disable-ender-dragon-legacy-check.patch similarity index 100% rename from Spigot-Server-Patches/0231-Add-config-to-disable-ender-dragon-legacy-check.patch rename to Spigot-Server-Patches/0232-Add-config-to-disable-ender-dragon-legacy-check.patch diff --git a/Spigot-Server-Patches/0232-Implement-World.getEntity-UUID-API.patch b/Spigot-Server-Patches/0233-Implement-World.getEntity-UUID-API.patch similarity index 84% rename from Spigot-Server-Patches/0232-Implement-World.getEntity-UUID-API.patch rename to Spigot-Server-Patches/0233-Implement-World.getEntity-UUID-API.patch index 6931f8ac7c..c76601405d 100644 --- a/Spigot-Server-Patches/0232-Implement-World.getEntity-UUID-API.patch +++ b/Spigot-Server-Patches/0233-Implement-World.getEntity-UUID-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Implement World.getEntity(UUID) API diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 5059ae88375ca9077f02fa521b9ff35018584417..6c58b404807c109bacdf6f3d35fbb05329ea8465 100644 +index 0471ac6cf1043f4a344b871aa85dcda4f04a5b5c..cd0a59c3c88a0d7aa4d79acb473ad5da1c465072 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1296,6 +1296,15 @@ public class CraftWorld implements World { +@@ -1291,6 +1291,15 @@ public class CraftWorld implements World { return list; } diff --git a/Spigot-Server-Patches/0233-InventoryCloseEvent-Reason-API.patch b/Spigot-Server-Patches/0234-InventoryCloseEvent-Reason-API.patch similarity index 87% rename from Spigot-Server-Patches/0233-InventoryCloseEvent-Reason-API.patch rename to Spigot-Server-Patches/0234-InventoryCloseEvent-Reason-API.patch index 4085b290ec..a9b36655ea 100644 --- a/Spigot-Server-Patches/0233-InventoryCloseEvent-Reason-API.patch +++ b/Spigot-Server-Patches/0234-InventoryCloseEvent-Reason-API.patch @@ -34,10 +34,10 @@ index 111ec5443116cbeecc7c9ecee3a585895d8376ec..4eea9bf6efb875cd7ba77958c9d38142 this.activeContainer = this.defaultContainer; } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 2fafae87a59b4d5dfab251078d467f8a19b0f620..cadcf029f1b675f9e847d07f2d3eacce8b19ec96 100644 +index 3f559918e85b6d5c2ab8ff593b69d40c1db8bb16..d606e3faaf7c58d89539b6bd997978c066218b9a 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -416,7 +416,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -419,7 +419,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } // Paper end if (!this.world.isClientSide && !this.activeContainer.canUse(this)) { @@ -46,7 +46,7 @@ index 2fafae87a59b4d5dfab251078d467f8a19b0f620..cadcf029f1b675f9e847d07f2d3eacce this.activeContainer = this.defaultContainer; } -@@ -590,7 +590,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -592,7 +592,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { // SPIGOT-943 - only call if they have an inventory open if (this.activeContainer != this.defaultContainer) { @@ -54,8 +54,8 @@ index 2fafae87a59b4d5dfab251078d467f8a19b0f620..cadcf029f1b675f9e847d07f2d3eacce + this.closeInventory(org.bukkit.event.inventory.InventoryCloseEvent.Reason.DEATH); // Paper } - String deathMessage = event.getDeathMessage(); -@@ -1160,7 +1160,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { + net.kyori.adventure.text.Component deathMessage = event.deathMessage() != null ? event.deathMessage() : net.kyori.adventure.text.Component.empty(); // Paper - Adventure +@@ -1157,7 +1157,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { return OptionalInt.empty(); } else { if (this.activeContainer != this.defaultContainer) { @@ -64,7 +64,7 @@ index 2fafae87a59b4d5dfab251078d467f8a19b0f620..cadcf029f1b675f9e847d07f2d3eacce } this.nextContainerCounter(); -@@ -1220,7 +1220,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1217,7 +1217,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } // CraftBukkit end if (this.activeContainer != this.defaultContainer) { @@ -73,7 +73,7 @@ index 2fafae87a59b4d5dfab251078d467f8a19b0f620..cadcf029f1b675f9e847d07f2d3eacce } // this.nextContainerCounter(); // CraftBukkit - moved up -@@ -1284,7 +1284,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1281,7 +1281,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @Override public void closeInventory() { @@ -88,10 +88,10 @@ index 2fafae87a59b4d5dfab251078d467f8a19b0f620..cadcf029f1b675f9e847d07f2d3eacce this.o(); } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index f92a1d69119af0c6baee83cd96c344695f23dc3c..7276807e0a22c640edc2c3e94c263f175f47d642 100644 +index a6a9ee8f34a61fbabfb1643b41cfb5e3a72cdf78..77e0d5dde4f3a7c808df545fd8d3870d24c42a38 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -43,6 +43,7 @@ import org.bukkit.event.inventory.ClickType; +@@ -45,6 +45,7 @@ import org.bukkit.event.inventory.ClickType; import org.bukkit.event.inventory.CraftItemEvent; import org.bukkit.event.inventory.InventoryAction; import org.bukkit.event.inventory.InventoryClickEvent; @@ -99,7 +99,7 @@ index f92a1d69119af0c6baee83cd96c344695f23dc3c..7276807e0a22c640edc2c3e94c263f17 import org.bukkit.event.inventory.InventoryCreativeEvent; import org.bukkit.event.inventory.InventoryType.SlotType; import org.bukkit.event.player.AsyncPlayerChatEvent; -@@ -2161,10 +2162,15 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -2164,10 +2165,15 @@ public class PlayerConnection implements PacketListenerPlayIn { @Override public void a(PacketPlayInCloseWindow packetplayinclosewindow) { @@ -117,7 +117,7 @@ index f92a1d69119af0c6baee83cd96c344695f23dc3c..7276807e0a22c640edc2c3e94c263f17 this.player.o(); } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 02479d398189f0956a6e2a8882f398e33853873e..020cd10518328b81495e44b816446c96bfe1bdcc 100644 +index d574bc5755b3075aa8d4a566262ee391b463be19..6c652849a24787a74e7eed16cb30d77e7b293ce9 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -422,7 +422,7 @@ public abstract class PlayerList { @@ -128,7 +128,7 @@ index 02479d398189f0956a6e2a8882f398e33853873e..020cd10518328b81495e44b816446c96 + entityplayer.closeInventory(org.bukkit.event.inventory.InventoryCloseEvent.Reason.DISCONNECT); // Paper } - PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(cserver.getPlayer(entityplayer), "\u00A7e" + entityplayer.getName() + " left the game"); + PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(cserver.getPlayer(entityplayer), net.kyori.adventure.text.Component.translatable("multiplayer.player.left", net.kyori.adventure.text.format.NamedTextColor.YELLOW)); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java index a1491094b58cf814d7b05d6c0ce4067bf34dae1a..a0d1e9f7535db896c0589dc02cb03bda23086167 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java @@ -152,10 +152,10 @@ index a1491094b58cf814d7b05d6c0ce4067bf34dae1a..a0d1e9f7535db896c0589dc02cb03bda } // Spigot End diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -index 99bd0b3f17dea43e85806fcad317ef8227d95715..08955d127859785bad49139c7f211f0ce7ea62ed 100644 +index fb26a4f2953007b7fa503b654a99ca203ccc8caf..38c0d54fcb084bb102ee004cc8987c8358b5a2ac 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -@@ -369,7 +369,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -373,7 +373,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { if (((EntityPlayer) getHandle()).playerConnection == null) return; if (getHandle().activeContainer != getHandle().defaultContainer) { // fire INVENTORY_CLOSE if one already open @@ -164,7 +164,7 @@ index 99bd0b3f17dea43e85806fcad317ef8227d95715..08955d127859785bad49139c7f211f0c } EntityPlayer player = (EntityPlayer) getHandle(); Container container; -@@ -435,8 +435,13 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -443,8 +443,13 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { @Override public void closeInventory() { @@ -180,10 +180,10 @@ index 99bd0b3f17dea43e85806fcad317ef8227d95715..08955d127859785bad49139c7f211f0c @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 0fc25497e7605a04088f888aab99482bd7187ae5..290bd5f50618be0a9d1e10afa3642d47501d192d 100644 +index 03b4d9f0a396ef8016e8f5a8be7198843bf0b8dd..6ecbeffc83cef741c9a4ab1d8de1d536849c9268 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -812,7 +812,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -882,7 +882,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { // Close any foreign inventory if (getHandle().activeContainer != getHandle().defaultContainer) { @@ -193,10 +193,10 @@ index 0fc25497e7605a04088f888aab99482bd7187ae5..290bd5f50618be0a9d1e10afa3642d47 // Check if the fromWorld and toWorld are the same. diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 70a678dc8637897378f9924bae159233b181f817..44fd948d9ce23e541bf47c89ff3d36ac8da9e41a 100644 +index 7805ba48a33b12fb7094cd88972f422b14549c8f..229d1df5b10b0823e41b1f32d1bb4770592f81cc 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1165,7 +1165,7 @@ public class CraftEventFactory { +@@ -1171,7 +1171,7 @@ public class CraftEventFactory { public static Container callInventoryOpenEvent(EntityPlayer player, Container container, boolean cancelled) { if (player.activeContainer != player.defaultContainer) { // fire INVENTORY_CLOSE if one already open @@ -205,7 +205,7 @@ index 70a678dc8637897378f9924bae159233b181f817..44fd948d9ce23e541bf47c89ff3d36ac } CraftServer server = player.world.getServer(); -@@ -1330,8 +1330,18 @@ public class CraftEventFactory { +@@ -1336,8 +1336,18 @@ public class CraftEventFactory { return event; } diff --git a/Spigot-Server-Patches/0234-Vex-getSummoner-API.patch b/Spigot-Server-Patches/0235-Vex-getSummoner-API.patch similarity index 100% rename from Spigot-Server-Patches/0234-Vex-getSummoner-API.patch rename to Spigot-Server-Patches/0235-Vex-getSummoner-API.patch diff --git a/Spigot-Server-Patches/0235-Refresh-player-inventory-when-cancelling-PlayerInter.patch b/Spigot-Server-Patches/0236-Refresh-player-inventory-when-cancelling-PlayerInter.patch similarity index 89% rename from Spigot-Server-Patches/0235-Refresh-player-inventory-when-cancelling-PlayerInter.patch rename to Spigot-Server-Patches/0236-Refresh-player-inventory-when-cancelling-PlayerInter.patch index 2538607cd4..399e320386 100644 --- a/Spigot-Server-Patches/0235-Refresh-player-inventory-when-cancelling-PlayerInter.patch +++ b/Spigot-Server-Patches/0236-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/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 7276807e0a22c640edc2c3e94c263f175f47d642..251333ba81aa55d321b94fa1959306abcb6da636 100644 +index 77e0d5dde4f3a7c808df545fd8d3870d24c42a38..359892d3b4df1dcf67ba01794bcd7be46933e4d7 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -2074,6 +2074,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -2077,6 +2077,7 @@ public class PlayerConnection implements PacketListenerPlayIn { } if (event.isCancelled()) { diff --git a/Spigot-Server-Patches/0236-Don-t-change-the-Entity-Random-seed-for-squids.patch b/Spigot-Server-Patches/0237-Don-t-change-the-Entity-Random-seed-for-squids.patch similarity index 100% rename from Spigot-Server-Patches/0236-Don-t-change-the-Entity-Random-seed-for-squids.patch rename to Spigot-Server-Patches/0237-Don-t-change-the-Entity-Random-seed-for-squids.patch diff --git a/Spigot-Server-Patches/0237-Re-add-vanilla-entity-warnings-for-duplicates.patch b/Spigot-Server-Patches/0238-Re-add-vanilla-entity-warnings-for-duplicates.patch similarity index 100% rename from Spigot-Server-Patches/0237-Re-add-vanilla-entity-warnings-for-duplicates.patch rename to Spigot-Server-Patches/0238-Re-add-vanilla-entity-warnings-for-duplicates.patch diff --git a/Spigot-Server-Patches/0238-Avoid-item-merge-if-stack-size-above-max-stack-size.patch b/Spigot-Server-Patches/0239-Avoid-item-merge-if-stack-size-above-max-stack-size.patch similarity index 100% rename from Spigot-Server-Patches/0238-Avoid-item-merge-if-stack-size-above-max-stack-size.patch rename to Spigot-Server-Patches/0239-Avoid-item-merge-if-stack-size-above-max-stack-size.patch diff --git a/Spigot-Server-Patches/0239-Use-asynchronous-Log4j-2-loggers.patch b/Spigot-Server-Patches/0240-Use-asynchronous-Log4j-2-loggers.patch similarity index 100% rename from Spigot-Server-Patches/0239-Use-asynchronous-Log4j-2-loggers.patch rename to Spigot-Server-Patches/0240-Use-asynchronous-Log4j-2-loggers.patch diff --git a/Spigot-Server-Patches/0240-add-more-information-to-Entity.toString.patch b/Spigot-Server-Patches/0241-add-more-information-to-Entity.toString.patch similarity index 93% rename from Spigot-Server-Patches/0240-add-more-information-to-Entity.toString.patch rename to Spigot-Server-Patches/0241-add-more-information-to-Entity.toString.patch index 65d82439a6..43604c9da5 100644 --- a/Spigot-Server-Patches/0240-add-more-information-to-Entity.toString.patch +++ b/Spigot-Server-Patches/0241-add-more-information-to-Entity.toString.patch @@ -6,7 +6,7 @@ Subject: [PATCH] add more information to Entity.toString() UUID, ticks lived, valid, dead diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index f647b4975e714164313142acef04f8e320ca79cf..18ec6f553ddea775b279658a280fc2a3e5f96fa9 100644 +index 3b134ea0a6b30dce70ed9d00414c305354e07476..74b1aa0d52d0e325f8162d78d60c27f855ef0112 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -2437,7 +2437,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/0241-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch b/Spigot-Server-Patches/0242-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch similarity index 97% rename from Spigot-Server-Patches/0241-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch rename to Spigot-Server-Patches/0242-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch index dd1fca6abf..bef658d8eb 100644 --- a/Spigot-Server-Patches/0241-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch +++ b/Spigot-Server-Patches/0242-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Add Debug Entities option to debug dupe uuid issues Add -Ddebug.entities=true to your JVM flags to gain more information diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 18ec6f553ddea775b279658a280fc2a3e5f96fa9..be5ad564964f26c90440bb30464edbf9882ff1e1 100644 +index 74b1aa0d52d0e325f8162d78d60c27f855ef0112..64a739d0660098b840e2369f150670691eb9c441 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -76,6 +76,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -40,7 +40,7 @@ index 8862bbd73b627e37709d46e6aeeee70c89cbd821..4bbcd00950405a4bf3ce391b557049a3 protected void g() { diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index d3c282eb5253351ec4288bffaeca715547089cec..cb1330ef117224aea07208cebff544c714ae313a 100644 +index 33444cd8aec8ce39fb4fef232909cd42ef036d54..3bad056cf3c9a4322dbbf3486ea4510117a8d95b 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -68,6 +68,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { diff --git a/Spigot-Server-Patches/0242-EnderDragon-Events.patch b/Spigot-Server-Patches/0243-EnderDragon-Events.patch similarity index 100% rename from Spigot-Server-Patches/0242-EnderDragon-Events.patch rename to Spigot-Server-Patches/0243-EnderDragon-Events.patch diff --git a/Spigot-Server-Patches/0243-PlayerElytraBoostEvent.patch b/Spigot-Server-Patches/0244-PlayerElytraBoostEvent.patch similarity index 100% rename from Spigot-Server-Patches/0243-PlayerElytraBoostEvent.patch rename to Spigot-Server-Patches/0244-PlayerElytraBoostEvent.patch diff --git a/Spigot-Server-Patches/0244-Improve-BlockPosition-inlining.patch b/Spigot-Server-Patches/0245-Improve-BlockPosition-inlining.patch similarity index 100% rename from Spigot-Server-Patches/0244-Improve-BlockPosition-inlining.patch rename to Spigot-Server-Patches/0245-Improve-BlockPosition-inlining.patch diff --git a/Spigot-Server-Patches/0245-Optimize-RegistryID.c.patch b/Spigot-Server-Patches/0246-Optimize-RegistryID.c.patch similarity index 100% rename from Spigot-Server-Patches/0245-Optimize-RegistryID.c.patch rename to Spigot-Server-Patches/0246-Optimize-RegistryID.c.patch diff --git a/Spigot-Server-Patches/0246-Option-to-prevent-armor-stands-from-doing-entity-loo.patch b/Spigot-Server-Patches/0247-Option-to-prevent-armor-stands-from-doing-entity-loo.patch similarity index 94% rename from Spigot-Server-Patches/0246-Option-to-prevent-armor-stands-from-doing-entity-loo.patch rename to Spigot-Server-Patches/0247-Option-to-prevent-armor-stands-from-doing-entity-loo.patch index 83a9dc7725..e5fc5b1901 100644 --- a/Spigot-Server-Patches/0246-Option-to-prevent-armor-stands-from-doing-entity-loo.patch +++ b/Spigot-Server-Patches/0247-Option-to-prevent-armor-stands-from-doing-entity-loo.patch @@ -31,10 +31,10 @@ index e17637cfee773b1b79c05d7a8e6558963c7a9c14..9a3183e55fcb6809d2b324ad52e27f3e for (int i = 0; i < list.size(); ++i) { diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index cb1330ef117224aea07208cebff544c714ae313a..51c57f4752ea49859b9e00045a40899783731f28 100644 +index 3bad056cf3c9a4322dbbf3486ea4510117a8d95b..7b2df7f3538f7ee696db08f7d8be74f258ff1996 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -801,6 +801,13 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -802,6 +802,13 @@ public abstract class World implements GeneratorAccess, AutoCloseable { // Paper end } } diff --git a/Spigot-Server-Patches/0247-Vanished-players-don-t-have-rights.patch b/Spigot-Server-Patches/0248-Vanished-players-don-t-have-rights.patch similarity index 96% rename from Spigot-Server-Patches/0247-Vanished-players-don-t-have-rights.patch rename to Spigot-Server-Patches/0248-Vanished-players-don-t-have-rights.patch index 06f2e9e8d8..fed62f96ac 100644 --- a/Spigot-Server-Patches/0247-Vanished-players-don-t-have-rights.patch +++ b/Spigot-Server-Patches/0248-Vanished-players-don-t-have-rights.patch @@ -17,7 +17,7 @@ index e0ae51ede44de5c894df526c1fc6d94c46d72013..8bcca73ae48ee822d32a6d23be2e1056 return this.getBlock().c(this.p(), iblockaccess, blockposition, voxelshapecollision); } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index be5ad564964f26c90440bb30464edbf9882ff1e1..c7c8dd944c084c281568cb6444c8bda35b35a4df 100644 +index 64a739d0660098b840e2369f150670691eb9c441..91b450da31b972e2251382cd068a818a6bd70c1e 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -98,7 +98,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -96,7 +96,7 @@ index ed0f9c5d29c4f88b7beee4b0ecdd7a56de2d7a9e..881cea7c466f29ff4a89db28d104e850 if (operatorboolean.apply(false, false)) { throw (IllegalArgumentException) SystemUtils.c((Throwable) (new IllegalArgumentException())); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 51c57f4752ea49859b9e00045a40899783731f28..26669ded3ec47d13e4e79d65d0f05a588f9e1f63 100644 +index 7b2df7f3538f7ee696db08f7d8be74f258ff1996..20a13b80e5df99c549b55d3cbddbe13f730f7cdf 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -178,6 +178,46 @@ public abstract class World implements GeneratorAccess, AutoCloseable { @@ -147,10 +147,10 @@ index 51c57f4752ea49859b9e00045a40899783731f28..26669ded3ec47d13e4e79d65d0f05a58 public boolean s_() { return this.isClientSide; diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 44fd948d9ce23e541bf47c89ff3d36ac8da9e41a..b470f29fc938740c0e9c728e3f5ee716a9208e6a 100644 +index 229d1df5b10b0823e41b1f32d1bb4770592f81cc..e762a20c92a990ecc08e8bd4fe65b80b5913587e 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1201,6 +1201,14 @@ public class CraftEventFactory { +@@ -1207,6 +1207,14 @@ public class CraftEventFactory { Projectile projectile = (Projectile) entity.getBukkitEntity(); org.bukkit.entity.Entity collided = position.getEntity().getBukkitEntity(); com.destroystokyo.paper.event.entity.ProjectileCollideEvent event = new com.destroystokyo.paper.event.entity.ProjectileCollideEvent(projectile, collided); diff --git a/Spigot-Server-Patches/0248-Mark-chunk-dirty-anytime-entities-change-to-guarante.patch b/Spigot-Server-Patches/0249-Mark-chunk-dirty-anytime-entities-change-to-guarante.patch similarity index 79% rename from Spigot-Server-Patches/0248-Mark-chunk-dirty-anytime-entities-change-to-guarante.patch rename to Spigot-Server-Patches/0249-Mark-chunk-dirty-anytime-entities-change-to-guarante.patch index 49acb393e1..69204c099e 100644 --- a/Spigot-Server-Patches/0248-Mark-chunk-dirty-anytime-entities-change-to-guarante.patch +++ b/Spigot-Server-Patches/0249-Mark-chunk-dirty-anytime-entities-change-to-guarante.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Mark chunk dirty anytime entities change to guarantee it diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 380690cdb1052b12d0574c111c2162bd7ed8ecca..84ad87f4a1ab9c136e00f4c9f029853d82f57247 100644 +index 8dd560c8207f14123ab9c9820d8ce7333775db35..90b2a891c5bfa26ab1ff6738f58719a10d5cbed6 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -524,6 +524,7 @@ public class Chunk implements IChunkAccess { +@@ -523,6 +523,7 @@ public class Chunk implements IChunkAccess { entity.chunkZ = this.loc.z; this.entities.add(entity); // Paper - per chunk entity list this.entitySlices[k].add(entity); @@ -17,7 +17,7 @@ index 380690cdb1052b12d0574c111c2162bd7ed8ecca..84ad87f4a1ab9c136e00f4c9f029853d } @Override -@@ -552,6 +553,7 @@ public class Chunk implements IChunkAccess { +@@ -550,6 +551,7 @@ public class Chunk implements IChunkAccess { return; } entityCounts.decrement(entity.getMinecraftKeyString()); diff --git a/Spigot-Server-Patches/0249-Add-some-Debug-to-Chunk-Entity-slices.patch b/Spigot-Server-Patches/0250-Add-some-Debug-to-Chunk-Entity-slices.patch similarity index 88% rename from Spigot-Server-Patches/0249-Add-some-Debug-to-Chunk-Entity-slices.patch rename to Spigot-Server-Patches/0250-Add-some-Debug-to-Chunk-Entity-slices.patch index c8c69a78f4..8a0f47ecc6 100644 --- a/Spigot-Server-Patches/0249-Add-some-Debug-to-Chunk-Entity-slices.patch +++ b/Spigot-Server-Patches/0250-Add-some-Debug-to-Chunk-Entity-slices.patch @@ -9,10 +9,10 @@ This should hopefully avoid duplicate entities ever being created if the entity was to end up in 2 different chunk slices diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 84ad87f4a1ab9c136e00f4c9f029853d82f57247..e829f62397d092fa919d387b157a65b0c627e2e2 100644 +index 90b2a891c5bfa26ab1ff6738f58719a10d5cbed6..8b9454fd44fe1d14eb6d46f772be56937c99595a 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -515,6 +515,25 @@ public class Chunk implements IChunkAccess { +@@ -514,6 +514,25 @@ public class Chunk implements IChunkAccess { if (k >= this.entitySlices.length) { k = this.entitySlices.length - 1; } @@ -38,7 +38,7 @@ index 84ad87f4a1ab9c136e00f4c9f029853d82f57247..e829f62397d092fa919d387b157a65b0 if (!entity.inChunk || entity.getCurrentChunk() != this) entityCounts.increment(entity.getMinecraftKeyString()); // Paper entity.inChunk = true; -@@ -524,6 +543,7 @@ public class Chunk implements IChunkAccess { +@@ -523,6 +542,7 @@ public class Chunk implements IChunkAccess { entity.chunkZ = this.loc.z; this.entities.add(entity); // Paper - per chunk entity list this.entitySlices[k].add(entity); @@ -46,7 +46,7 @@ index 84ad87f4a1ab9c136e00f4c9f029853d82f57247..e829f62397d092fa919d387b157a65b0 this.markDirty(); // Paper } -@@ -549,6 +569,10 @@ public class Chunk implements IChunkAccess { +@@ -547,6 +567,10 @@ public class Chunk implements IChunkAccess { // Paper start if (entity.currentChunk != null && entity.currentChunk.get() == this) entity.setCurrentChunk(null); @@ -58,7 +58,7 @@ index 84ad87f4a1ab9c136e00f4c9f029853d82f57247..e829f62397d092fa919d387b157a65b0 return; } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index c7c8dd944c084c281568cb6444c8bda35b35a4df..da195d9bb6995fcbe569ca2e2b08c473431376a6 100644 +index 91b450da31b972e2251382cd068a818a6bd70c1e..a331a62be48c3d9f5247817dfeeaba923aed5f57 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -71,6 +71,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/0250-SkeletonHorse-Additions.patch b/Spigot-Server-Patches/0251-SkeletonHorse-Additions.patch similarity index 100% rename from Spigot-Server-Patches/0250-SkeletonHorse-Additions.patch rename to Spigot-Server-Patches/0251-SkeletonHorse-Additions.patch diff --git a/Spigot-Server-Patches/0251-Prevent-Saving-Bad-entities-to-chunks.patch b/Spigot-Server-Patches/0252-Prevent-Saving-Bad-entities-to-chunks.patch similarity index 100% rename from Spigot-Server-Patches/0251-Prevent-Saving-Bad-entities-to-chunks.patch rename to Spigot-Server-Patches/0252-Prevent-Saving-Bad-entities-to-chunks.patch diff --git a/Spigot-Server-Patches/0252-Don-t-call-getItemMeta-on-hasItemMeta.patch b/Spigot-Server-Patches/0253-Don-t-call-getItemMeta-on-hasItemMeta.patch similarity index 100% rename from Spigot-Server-Patches/0252-Don-t-call-getItemMeta-on-hasItemMeta.patch rename to Spigot-Server-Patches/0253-Don-t-call-getItemMeta-on-hasItemMeta.patch diff --git a/Spigot-Server-Patches/0253-Ignore-Dead-Entities-in-entityList-iteration.patch b/Spigot-Server-Patches/0254-Ignore-Dead-Entities-in-entityList-iteration.patch similarity index 89% rename from Spigot-Server-Patches/0253-Ignore-Dead-Entities-in-entityList-iteration.patch rename to Spigot-Server-Patches/0254-Ignore-Dead-Entities-in-entityList-iteration.patch index 4963089a0f..8a8f50b210 100644 --- a/Spigot-Server-Patches/0253-Ignore-Dead-Entities-in-entityList-iteration.patch +++ b/Spigot-Server-Patches/0254-Ignore-Dead-Entities-in-entityList-iteration.patch @@ -23,10 +23,10 @@ index 9cb2f3b31921870ddba044840e99eb04babe26bb..f0a836db74ad3e20778d3863223bc9a3 MutablePair> info = list.computeIfAbsent(key, k -> MutablePair.of(0, Maps.newHashMap())); ChunkCoordIntPair chunk = new ChunkCoordIntPair(e.chunkX, e.chunkZ); diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index e829f62397d092fa919d387b157a65b0c627e2e2..3cb1ee261724e34a23c4a0f98673da1597786a01 100644 +index 8b9454fd44fe1d14eb6d46f772be56937c99595a..a35cd4df85f0043b83f2f70cec6091d6bae89767 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -825,6 +825,7 @@ public class Chunk implements IChunkAccess { +@@ -823,6 +823,7 @@ public class Chunk implements IChunkAccess { for (int i1 = 0; i1 < l; ++i1) { Entity entity1 = (Entity) list1.get(i1); @@ -34,7 +34,7 @@ index e829f62397d092fa919d387b157a65b0c627e2e2..3cb1ee261724e34a23c4a0f98673da15 if (entity1.getBoundingBox().c(axisalignedbb) && entity1 != entity) { if (predicate == null || predicate.test(entity1)) { -@@ -862,6 +863,7 @@ public class Chunk implements IChunkAccess { +@@ -860,6 +861,7 @@ public class Chunk implements IChunkAccess { while (iterator.hasNext()) { T entity = (T) iterator.next(); // CraftBukkit - decompile error @@ -42,7 +42,7 @@ index e829f62397d092fa919d387b157a65b0c627e2e2..3cb1ee261724e34a23c4a0f98673da15 if ((entitytypes == null || entity.getEntityType() == entitytypes) && entity.getBoundingBox().c(axisalignedbb) && predicate.test(entity)) { list.add(entity); -@@ -884,6 +886,7 @@ public class Chunk implements IChunkAccess { +@@ -882,6 +884,7 @@ public class Chunk implements IChunkAccess { while (iterator.hasNext()) { T t0 = (T) iterator.next(); // CraftBukkit - decompile error @@ -51,7 +51,7 @@ index e829f62397d092fa919d387b157a65b0c627e2e2..3cb1ee261724e34a23c4a0f98673da15 if (oclass.isInstance(t0) && t0.getBoundingBox().c(axisalignedbb) && (predicate == null || predicate.test(t0))) { // Spigot - instance check list.add(t0); diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index da195d9bb6995fcbe569ca2e2b08c473431376a6..49c7b40744adcd36e5ae1eef026679e9b646feac 100644 +index a331a62be48c3d9f5247817dfeeaba923aed5f57..769fada8ffa657493e5d7bf025281ff5f9f4299f 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -190,6 +190,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -83,10 +83,10 @@ index d6c319c1177e43eebeb7d9f366da3495b38b6b97..1cbb1c3ddf45cd6d650ca274af4545f2 } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 6c58b404807c109bacdf6f3d35fbb05329ea8465..47d407af1a770404284c591978978b229cbf7541 100644 +index cd0a59c3c88a0d7aa4d79acb473ad5da1c465072..9e9b9b9f81f1e4340b98724ca50fb03f699a03cb 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1032,6 +1032,7 @@ public class CraftWorld implements World { +@@ -1027,6 +1027,7 @@ public class CraftWorld implements World { for (Object o : world.entitiesById.values()) { if (o instanceof net.minecraft.server.Entity) { net.minecraft.server.Entity mcEnt = (net.minecraft.server.Entity) o; @@ -94,7 +94,7 @@ index 6c58b404807c109bacdf6f3d35fbb05329ea8465..47d407af1a770404284c591978978b22 Entity bukkitEntity = mcEnt.getBukkitEntity(); // Assuming that bukkitEntity isn't null -@@ -1051,6 +1052,7 @@ public class CraftWorld implements World { +@@ -1046,6 +1047,7 @@ public class CraftWorld implements World { for (Object o : world.entitiesById.values()) { if (o instanceof net.minecraft.server.Entity) { net.minecraft.server.Entity mcEnt = (net.minecraft.server.Entity) o; @@ -102,7 +102,7 @@ index 6c58b404807c109bacdf6f3d35fbb05329ea8465..47d407af1a770404284c591978978b22 Entity bukkitEntity = mcEnt.getBukkitEntity(); // Assuming that bukkitEntity isn't null -@@ -1077,6 +1079,7 @@ public class CraftWorld implements World { +@@ -1072,6 +1074,7 @@ public class CraftWorld implements World { for (Object entity: world.entitiesById.values()) { if (entity instanceof net.minecraft.server.Entity) { @@ -110,7 +110,7 @@ index 6c58b404807c109bacdf6f3d35fbb05329ea8465..47d407af1a770404284c591978978b22 Entity bukkitEntity = ((net.minecraft.server.Entity) entity).getBukkitEntity(); if (bukkitEntity == null) { -@@ -1100,6 +1103,7 @@ public class CraftWorld implements World { +@@ -1095,6 +1098,7 @@ public class CraftWorld implements World { for (Object entity: world.entitiesById.values()) { if (entity instanceof net.minecraft.server.Entity) { diff --git a/Spigot-Server-Patches/0254-Implement-Expanded-ArmorStand-API.patch b/Spigot-Server-Patches/0255-Implement-Expanded-ArmorStand-API.patch similarity index 100% rename from Spigot-Server-Patches/0254-Implement-Expanded-ArmorStand-API.patch rename to Spigot-Server-Patches/0255-Implement-Expanded-ArmorStand-API.patch diff --git a/Spigot-Server-Patches/0255-AnvilDamageEvent.patch b/Spigot-Server-Patches/0256-AnvilDamageEvent.patch similarity index 100% rename from Spigot-Server-Patches/0255-AnvilDamageEvent.patch rename to Spigot-Server-Patches/0256-AnvilDamageEvent.patch diff --git a/Spigot-Server-Patches/0256-Add-TNTPrimeEvent.patch b/Spigot-Server-Patches/0257-Add-TNTPrimeEvent.patch similarity index 100% rename from Spigot-Server-Patches/0256-Add-TNTPrimeEvent.patch rename to Spigot-Server-Patches/0257-Add-TNTPrimeEvent.patch diff --git a/Spigot-Server-Patches/0257-Break-up-and-make-tab-spam-limits-configurable.patch b/Spigot-Server-Patches/0258-Break-up-and-make-tab-spam-limits-configurable.patch similarity index 95% rename from Spigot-Server-Patches/0257-Break-up-and-make-tab-spam-limits-configurable.patch rename to Spigot-Server-Patches/0258-Break-up-and-make-tab-spam-limits-configurable.patch index 69bd3bd575..aa16af5d05 100644 --- a/Spigot-Server-Patches/0257-Break-up-and-make-tab-spam-limits-configurable.patch +++ b/Spigot-Server-Patches/0258-Break-up-and-make-tab-spam-limits-configurable.patch @@ -45,10 +45,10 @@ index fddc8e25347b2a14ff7e0636ec341fd9c0fa5581..89f1eb215a585eccd8498cb337e58943 + } } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 251333ba81aa55d321b94fa1959306abcb6da636..c15d0d0f6f0cfede9c22eba058f2323590f48df7 100644 +index 359892d3b4df1dcf67ba01794bcd7be46933e4d7..ffc0d54ef7aa717d539d9de8af39637b5676dba7 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -81,6 +81,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -83,6 +83,7 @@ public class PlayerConnection implements PacketListenerPlayIn { // CraftBukkit start - multithreaded fields private volatile int chatThrottle; private static final AtomicIntegerFieldUpdater chatSpamField = AtomicIntegerFieldUpdater.newUpdater(PlayerConnection.class, "chatThrottle"); @@ -56,7 +56,7 @@ index 251333ba81aa55d321b94fa1959306abcb6da636..c15d0d0f6f0cfede9c22eba058f23235 // CraftBukkit end private int j; private final Int2ShortMap k = new Int2ShortOpenHashMap(); -@@ -216,6 +217,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -218,6 +219,7 @@ public class PlayerConnection implements PacketListenerPlayIn { this.minecraftServer.getMethodProfiler().exit(); // CraftBukkit start for (int spam; (spam = this.chatThrottle) > 0 && !chatSpamField.compareAndSet(this, spam, spam - 1); ) ; diff --git a/Spigot-Server-Patches/0258-Add-hand-to-bucket-events.patch b/Spigot-Server-Patches/0259-Add-hand-to-bucket-events.patch similarity index 95% rename from Spigot-Server-Patches/0258-Add-hand-to-bucket-events.patch rename to Spigot-Server-Patches/0259-Add-hand-to-bucket-events.patch index 4bb165c899..efbd0f4a52 100644 --- a/Spigot-Server-Patches/0258-Add-hand-to-bucket-events.patch +++ b/Spigot-Server-Patches/0259-Add-hand-to-bucket-events.patch @@ -73,7 +73,7 @@ index 48958308a89cbe39e1b4dddcdd8d1d0b5ece6339..120bf8436fd82294c339add2e7bff1cd int i = blockposition.getX(); int j = blockposition.getY(); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 26669ded3ec47d13e4e79d65d0f05a588f9e1f63..d6bce67fff263d2c04be29020a8dc66fa260a53e 100644 +index 20a13b80e5df99c549b55d3cbddbe13f730f7cdf..ec77151d0dde422024ae5226ad7e3fb18c08f7c0 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -218,6 +218,17 @@ public abstract class World implements GeneratorAccess, AutoCloseable { @@ -95,10 +95,10 @@ index 26669ded3ec47d13e4e79d65d0f05a588f9e1f63..d6bce67fff263d2c04be29020a8dc66f public boolean s_() { return this.isClientSide; diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index e26b1362899a9fad5e0e3a4e49acd98b67a4f03b..f9d2228fb0543c60d2e0848afb4f927b6a7bce51 100644 +index 1cbb1c3ddf45cd6d650ca274af4545f2d1c8a813..f047f07e768b77feb469c69166f36a3f6779f561 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1547,15 +1547,17 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1536,15 +1536,17 @@ public class WorldServer extends World implements GeneratorAccessSeed { this.getMinecraftServer().getPlayerList().sendAll(new PacketPlayOutSpawnPosition(blockposition, f)); } @@ -126,10 +126,10 @@ index e26b1362899a9fad5e0e3a4e49acd98b67a4f03b..f9d2228fb0543c60d2e0848afb4f927b public float v() { return this.worldData.d(); diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index b470f29fc938740c0e9c728e3f5ee716a9208e6a..2b0d09e8791a0b2915eb36bda5f0848731c4236b 100644 +index e762a20c92a990ecc08e8bd4fe65b80b5913587e..42ffb557ac121ebf9404c02696231ef4e7117c92 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -226,7 +226,7 @@ public class CraftEventFactory { +@@ -232,7 +232,7 @@ public class CraftEventFactory { public static Entity entityDamage; // For use in EntityDamageByEntityEvent // helper methods @@ -138,7 +138,7 @@ index b470f29fc938740c0e9c728e3f5ee716a9208e6a..2b0d09e8791a0b2915eb36bda5f08487 int spawnSize = Bukkit.getServer().getSpawnRadius(); if (world.getDimensionKey() != World.OVERWORLD) return true; -@@ -405,6 +405,20 @@ public class CraftEventFactory { +@@ -411,6 +411,20 @@ public class CraftEventFactory { } private static PlayerEvent getPlayerBucketEvent(boolean isFilling, WorldServer world, EntityHuman who, BlockPosition changed, BlockPosition clicked, EnumDirection clickedFace, ItemStack itemstack, net.minecraft.server.Item item) { @@ -159,7 +159,7 @@ index b470f29fc938740c0e9c728e3f5ee716a9208e6a..2b0d09e8791a0b2915eb36bda5f08487 Player player = (Player) who.getBukkitEntity(); CraftItemStack itemInHand = CraftItemStack.asNewCraftStack(item); Material bucket = CraftMagicNumbers.getMaterial(itemstack.getItem()); -@@ -417,10 +431,10 @@ public class CraftEventFactory { +@@ -423,10 +437,10 @@ public class CraftEventFactory { PlayerEvent event; if (isFilling) { diff --git a/Spigot-Server-Patches/0259-MC-135506-Experience-should-save-as-Integers.patch b/Spigot-Server-Patches/0260-MC-135506-Experience-should-save-as-Integers.patch similarity index 100% rename from Spigot-Server-Patches/0259-MC-135506-Experience-should-save-as-Integers.patch rename to Spigot-Server-Patches/0260-MC-135506-Experience-should-save-as-Integers.patch diff --git a/Spigot-Server-Patches/0260-Fix-client-rendering-skulls-from-same-user.patch b/Spigot-Server-Patches/0261-Fix-client-rendering-skulls-from-same-user.patch similarity index 96% rename from Spigot-Server-Patches/0260-Fix-client-rendering-skulls-from-same-user.patch rename to Spigot-Server-Patches/0261-Fix-client-rendering-skulls-from-same-user.patch index 2baee0dd58..059402a95c 100644 --- a/Spigot-Server-Patches/0260-Fix-client-rendering-skulls-from-same-user.patch +++ b/Spigot-Server-Patches/0261-Fix-client-rendering-skulls-from-same-user.patch @@ -25,10 +25,10 @@ index bdb6f9bf3477f85859e3f0dd761e2e895f1a8e2b..22568201a292edc8e25396e55cad1572 private Entity k; private ShapeDetectorBlock l; diff --git a/src/main/java/net/minecraft/server/PacketDataSerializer.java b/src/main/java/net/minecraft/server/PacketDataSerializer.java -index 2976e8cc2da6e54e08e50ca1f5de5669823ef3f7..ee24acdd5e843e5421bf83bd6c069a4ecca09115 100644 +index 6c9aed49d5e63d6df608719ed17e813f86e93fcc..3d6fbde63d110559b552d052ef9a934318a00682 100644 --- a/src/main/java/net/minecraft/server/PacketDataSerializer.java +++ b/src/main/java/net/minecraft/server/PacketDataSerializer.java -@@ -284,9 +284,18 @@ public class PacketDataSerializer extends ByteBuf { +@@ -293,9 +293,18 @@ public class PacketDataSerializer extends ByteBuf { if (item.usesDurability() || item.n()) { // Spigot start - filter itemstack = itemstack.cloneItemStack(); @@ -48,7 +48,7 @@ index 2976e8cc2da6e54e08e50ca1f5de5669823ef3f7..ee24acdd5e843e5421bf83bd6c069a4e } this.a(nbttagcompound); -@@ -306,7 +315,16 @@ public class PacketDataSerializer extends ByteBuf { +@@ -315,7 +324,16 @@ public class PacketDataSerializer extends ByteBuf { itemstack.setTag(this.l()); // CraftBukkit start if (itemstack.getTag() != null) { diff --git a/Spigot-Server-Patches/0261-Add-Early-Warning-Feature-to-WatchDog.patch b/Spigot-Server-Patches/0262-Add-Early-Warning-Feature-to-WatchDog.patch similarity index 97% rename from Spigot-Server-Patches/0261-Add-Early-Warning-Feature-to-WatchDog.patch rename to Spigot-Server-Patches/0262-Add-Early-Warning-Feature-to-WatchDog.patch index e4d2610033..7bed22203e 100644 --- a/Spigot-Server-Patches/0261-Add-Early-Warning-Feature-to-WatchDog.patch +++ b/Spigot-Server-Patches/0262-Add-Early-Warning-Feature-to-WatchDog.patch @@ -48,10 +48,10 @@ index 88b45c8b4f58ee83d625408eae08aa329c87a6d4..d6d93c76f047573b3e7ea91409fb85e0 long start = System.nanoTime(), curTime, tickSection = start; // Paper - Further improve server tick loop lastTick = start - TICK_TIME; // Paper diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index bcb0191c2acb830e441fbf87838468954dc4c585..77c782acdfc4f0403a06219759f0154d77f69c58 100644 +index 272c27a7a63b7c01ad9c5ecfdba0a36ca18ad5d6..cb73b10ca46b6bb2080f4c76f48a2b9789408dc4 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -810,6 +810,7 @@ public final class CraftServer implements Server { +@@ -814,6 +814,7 @@ public final class CraftServer implements Server { @Override public void reload() { @@ -59,7 +59,7 @@ index bcb0191c2acb830e441fbf87838468954dc4c585..77c782acdfc4f0403a06219759f0154d reloadCount++; configuration = YamlConfiguration.loadConfiguration(getConfigFile()); commandsConfiguration = YamlConfiguration.loadConfiguration(getCommandsConfigFile()); -@@ -928,6 +929,7 @@ public final class CraftServer implements Server { +@@ -932,6 +933,7 @@ public final class CraftServer implements Server { enablePlugins(PluginLoadOrder.STARTUP); enablePlugins(PluginLoadOrder.POSTWORLD); getPluginManager().callEvent(new ServerLoadEvent(ServerLoadEvent.LoadType.RELOAD)); diff --git a/Spigot-Server-Patches/0262-Make-EnderDragon-implement-Mob.patch b/Spigot-Server-Patches/0263-Make-EnderDragon-implement-Mob.patch similarity index 100% rename from Spigot-Server-Patches/0262-Make-EnderDragon-implement-Mob.patch rename to Spigot-Server-Patches/0263-Make-EnderDragon-implement-Mob.patch diff --git a/Spigot-Server-Patches/0263-Use-ConcurrentHashMap-in-JsonList.patch b/Spigot-Server-Patches/0264-Use-ConcurrentHashMap-in-JsonList.patch similarity index 97% rename from Spigot-Server-Patches/0263-Use-ConcurrentHashMap-in-JsonList.patch rename to Spigot-Server-Patches/0264-Use-ConcurrentHashMap-in-JsonList.patch index b8bf63d230..3d14986a52 100644 --- a/Spigot-Server-Patches/0263-Use-ConcurrentHashMap-in-JsonList.patch +++ b/Spigot-Server-Patches/0264-Use-ConcurrentHashMap-in-JsonList.patch @@ -122,12 +122,12 @@ index da21918ce0339a0eb8f65ce7791a04ceb12749b7..1fc0139cb9694ddea41f57d95774c3b4 this.d.values().stream().map((jsonlistentry) -> { diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 020cd10518328b81495e44b816446c96bfe1bdcc..304ef7279f649dd8c51a68084b839c3092e5872e 100644 +index 6c652849a24787a74e7eed16cb30d77e7b293ce9..55427a0a8e420eb7eedd9dcc951c56ddc1ef4020 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -546,7 +546,7 @@ public abstract class PlayerList { } else if (!this.isWhitelisted(gameprofile, event)) { // Paper - chatmessage = new ChatMessage("multiplayer.disconnect.not_whitelisted"); + //chatmessage = new ChatMessage("multiplayer.disconnect.not_whitelisted"); // Paper //event.disallow(PlayerLoginEvent.Result.KICK_WHITELIST, org.spigotmc.SpigotConfig.whitelistMessage); // Spigot // Paper - moved to isWhitelisted - } else if (getIPBans().isBanned(socketaddress) && !getIPBans().get(socketaddress).hasExpired()) { + } else if (getIPBans().isBanned(socketaddress) && getIPBans().get(socketaddress) != null && !getIPBans().get(socketaddress).hasExpired()) { // Paper - fix NPE with temp ip bans diff --git a/Spigot-Server-Patches/0264-Use-a-Queue-for-Queueing-Commands.patch b/Spigot-Server-Patches/0265-Use-a-Queue-for-Queueing-Commands.patch similarity index 100% rename from Spigot-Server-Patches/0264-Use-a-Queue-for-Queueing-Commands.patch rename to Spigot-Server-Patches/0265-Use-a-Queue-for-Queueing-Commands.patch diff --git a/Spigot-Server-Patches/0265-Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch b/Spigot-Server-Patches/0266-Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch similarity index 100% rename from Spigot-Server-Patches/0265-Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch rename to Spigot-Server-Patches/0266-Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch diff --git a/Spigot-Server-Patches/0266-Allow-disabling-armour-stand-ticking.patch b/Spigot-Server-Patches/0267-Allow-disabling-armour-stand-ticking.patch similarity index 100% rename from Spigot-Server-Patches/0266-Allow-disabling-armour-stand-ticking.patch rename to Spigot-Server-Patches/0267-Allow-disabling-armour-stand-ticking.patch diff --git a/Spigot-Server-Patches/0267-Optimize-BlockPosition-helper-methods.patch b/Spigot-Server-Patches/0268-Optimize-BlockPosition-helper-methods.patch similarity index 100% rename from Spigot-Server-Patches/0267-Optimize-BlockPosition-helper-methods.patch rename to Spigot-Server-Patches/0268-Optimize-BlockPosition-helper-methods.patch diff --git a/Spigot-Server-Patches/0268-Restore-vanlla-default-mob-spawn-range.patch b/Spigot-Server-Patches/0269-Restore-vanlla-default-mob-spawn-range.patch similarity index 88% rename from Spigot-Server-Patches/0268-Restore-vanlla-default-mob-spawn-range.patch rename to Spigot-Server-Patches/0269-Restore-vanlla-default-mob-spawn-range.patch index 9574b666a3..85e9776191 100644 --- a/Spigot-Server-Patches/0268-Restore-vanlla-default-mob-spawn-range.patch +++ b/Spigot-Server-Patches/0269-Restore-vanlla-default-mob-spawn-range.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Restore vanlla default mob-spawn-range diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index 0efcbab8f8806aeb8dd8bd6384e5a7cee375d100..34ee684901906fc2ef5f0d09680d2686b813e52b 100644 +index 5c394d26e2d2dbc5d65e38c1273b7e5d02464f3a..f0ad5fa235adfd165b8e56be7352568a3b3ae54a 100644 --- a/src/main/java/org/spigotmc/SpigotWorldConfig.java +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java @@ -165,7 +165,7 @@ public class SpigotWorldConfig diff --git a/Spigot-Server-Patches/0269-Slime-Pathfinder-Events.patch b/Spigot-Server-Patches/0270-Slime-Pathfinder-Events.patch similarity index 100% rename from Spigot-Server-Patches/0269-Slime-Pathfinder-Events.patch rename to Spigot-Server-Patches/0270-Slime-Pathfinder-Events.patch diff --git a/Spigot-Server-Patches/0270-Configurable-speed-for-water-flowing-over-lava.patch b/Spigot-Server-Patches/0271-Configurable-speed-for-water-flowing-over-lava.patch similarity index 100% rename from Spigot-Server-Patches/0270-Configurable-speed-for-water-flowing-over-lava.patch rename to Spigot-Server-Patches/0271-Configurable-speed-for-water-flowing-over-lava.patch diff --git a/Spigot-Server-Patches/0271-Optimize-CraftBlockData-Creation.patch b/Spigot-Server-Patches/0272-Optimize-CraftBlockData-Creation.patch similarity index 100% rename from Spigot-Server-Patches/0271-Optimize-CraftBlockData-Creation.patch rename to Spigot-Server-Patches/0272-Optimize-CraftBlockData-Creation.patch diff --git a/Spigot-Server-Patches/0272-Optimize-RegistryMaterials.patch b/Spigot-Server-Patches/0273-Optimize-RegistryMaterials.patch similarity index 100% rename from Spigot-Server-Patches/0272-Optimize-RegistryMaterials.patch rename to Spigot-Server-Patches/0273-Optimize-RegistryMaterials.patch diff --git a/Spigot-Server-Patches/0273-Add-PhantomPreSpawnEvent.patch b/Spigot-Server-Patches/0274-Add-PhantomPreSpawnEvent.patch similarity index 100% rename from Spigot-Server-Patches/0273-Add-PhantomPreSpawnEvent.patch rename to Spigot-Server-Patches/0274-Add-PhantomPreSpawnEvent.patch diff --git a/Spigot-Server-Patches/0274-Add-More-Creeper-API.patch b/Spigot-Server-Patches/0275-Add-More-Creeper-API.patch similarity index 100% rename from Spigot-Server-Patches/0274-Add-More-Creeper-API.patch rename to Spigot-Server-Patches/0275-Add-More-Creeper-API.patch diff --git a/Spigot-Server-Patches/0275-Inventory-removeItemAnySlot.patch b/Spigot-Server-Patches/0276-Inventory-removeItemAnySlot.patch similarity index 100% rename from Spigot-Server-Patches/0275-Inventory-removeItemAnySlot.patch rename to Spigot-Server-Patches/0276-Inventory-removeItemAnySlot.patch diff --git a/Spigot-Server-Patches/0276-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch b/Spigot-Server-Patches/0277-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch similarity index 92% rename from Spigot-Server-Patches/0276-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch rename to Spigot-Server-Patches/0277-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch index bd56b13a5c..37d3a79050 100644 --- a/Spigot-Server-Patches/0276-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch +++ b/Spigot-Server-Patches/0277-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Make CraftWorld#loadChunk(int, int, false) load unconverted diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 47d407af1a770404284c591978978b229cbf7541..bc10ccd76fcf3f03c23f52064c4db17bcad1c574 100644 +index 9e9b9b9f81f1e4340b98724ca50fb03f699a03cb..ab05cc8e4188fcdfcd77ee6c1f217d0fa170c941 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -507,7 +507,7 @@ public class CraftWorld implements World { diff --git a/Spigot-Server-Patches/0277-Add-ray-tracing-methods-to-LivingEntity.patch b/Spigot-Server-Patches/0278-Add-ray-tracing-methods-to-LivingEntity.patch similarity index 100% rename from Spigot-Server-Patches/0277-Add-ray-tracing-methods-to-LivingEntity.patch rename to Spigot-Server-Patches/0278-Add-ray-tracing-methods-to-LivingEntity.patch diff --git a/Spigot-Server-Patches/0278-Expose-attack-cooldown-methods-for-Player.patch b/Spigot-Server-Patches/0279-Expose-attack-cooldown-methods-for-Player.patch similarity index 78% rename from Spigot-Server-Patches/0278-Expose-attack-cooldown-methods-for-Player.patch rename to Spigot-Server-Patches/0279-Expose-attack-cooldown-methods-for-Player.patch index 35b09fd217..28350bff26 100644 --- a/Spigot-Server-Patches/0278-Expose-attack-cooldown-methods-for-Player.patch +++ b/Spigot-Server-Patches/0279-Expose-attack-cooldown-methods-for-Player.patch @@ -17,14 +17,14 @@ index 4eea9bf6efb875cd7ba77958c9d3814237d8c74d..80a254039f3efbab6f0cbcf830ab5168 return (float) (1.0D / this.b(GenericAttributes.ATTACK_SPEED) * 20.0D); } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 290bd5f50618be0a9d1e10afa3642d47501d192d..96b9de5bf1ce1d32efe8d62079331c55533e4f15 100644 +index 6ecbeffc83cef741c9a4ab1d8de1d536849c9268..17ca2f9fbd9f43a9b39637d81e26c92ec00ed4d2 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1992,6 +1992,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { - getInventory().setItemInMainHand(hand); +@@ -2197,6 +2197,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player { + connection.sendPacket(new net.minecraft.server.PacketPlayOutOpenBook(net.minecraft.server.EnumHand.MAIN_HAND)); + connection.sendPacket(new net.minecraft.server.PacketPlayOutSetSlot(0, slot, inventory.getItemInHand())); } - -+ // Paper start ++ + public float getCooldownPeriod() { + return getHandle().getCooldownPeriod(); + } @@ -36,8 +36,6 @@ index 290bd5f50618be0a9d1e10afa3642d47501d192d..96b9de5bf1ce1d32efe8d62079331c55 + public void resetCooldown() { + getHandle().resetAttackCooldown(); + } -+ // Paper end -+ + // Paper end + // Spigot start - private final Player.Spigot spigot = new Player.Spigot() - { diff --git a/Spigot-Server-Patches/0279-Improve-death-events.patch b/Spigot-Server-Patches/0280-Improve-death-events.patch similarity index 95% rename from Spigot-Server-Patches/0279-Improve-death-events.patch rename to Spigot-Server-Patches/0280-Improve-death-events.patch index b6d27e072b..7f20819a6c 100644 --- a/Spigot-Server-Patches/0279-Improve-death-events.patch +++ b/Spigot-Server-Patches/0280-Improve-death-events.patch @@ -27,7 +27,7 @@ index 0790d45e3c8ac68c280b9378d93061b48b045639..a8054a599e3eb502e7bbce903b568398 int i = this.f ? 300 : 100; diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 49c7b40744adcd36e5ae1eef026679e9b646feac..9b55635d97f8ad90f13fdf609471c1f73eb40aed 100644 +index 769fada8ffa657493e5d7bf025281ff5f9f4299f..c9f4dab524e8f2a80b9e3ee178c36b2e394b5f84 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -1452,6 +1452,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -274,10 +274,10 @@ index 858db1505aa06d85f4e0b522d221f6543ff40f56..352049363d4b7a0302610f7d7cd54c9c return this.isBaby() ? (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.5F : (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F; } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index cadcf029f1b675f9e847d07f2d3eacce8b19ec96..012856b4dd5a004979d8a5f8521774a404d7d090 100644 +index d606e3faaf7c58d89539b6bd997978c066218b9a..273fd5a83790f76f089c2b1308a1e02ac6828683 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -85,6 +85,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -86,6 +86,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting { public int ping; public boolean viewingCredits; private int containerUpdateDelay; // Paper @@ -288,10 +288,10 @@ index cadcf029f1b675f9e847d07f2d3eacce8b19ec96..012856b4dd5a004979d8a5f8521774a4 // CraftBukkit start public String displayName; -@@ -587,6 +591,15 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -589,6 +593,15 @@ public class EntityPlayer extends EntityHuman implements ICrafting { + IChatBaseComponent defaultMessage = this.getCombatTracker().getDeathMessage(); - String deathmessage = defaultMessage.getString(); - org.bukkit.event.entity.PlayerDeathEvent event = CraftEventFactory.callPlayerDeathEvent(this, loot, deathmessage, keepInventory); + org.bukkit.event.entity.PlayerDeathEvent event = CraftEventFactory.callPlayerDeathEvent(this, loot, PaperAdventure.asAdventure(defaultMessage), keepInventory); // Paper - Adventure + // Paper start - cancellable death event + if (event.isCancelled()) { + // make compatible with plugins that might have already set the health in an event listener @@ -304,7 +304,7 @@ index cadcf029f1b675f9e847d07f2d3eacce8b19ec96..012856b4dd5a004979d8a5f8521774a4 // SPIGOT-943 - only call if they have an inventory open if (this.activeContainer != this.defaultContainer) { -@@ -738,8 +751,17 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -735,8 +748,17 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } } } @@ -325,10 +325,10 @@ index cadcf029f1b675f9e847d07f2d3eacce8b19ec96..012856b4dd5a004979d8a5f8521774a4 } } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 96b9de5bf1ce1d32efe8d62079331c55533e4f15..42d7bd435fa8ee94af5eda4542598ed1c6fbd0c1 100644 +index 17ca2f9fbd9f43a9b39637d81e26c92ec00ed4d2..bb88a4a035dc7f56c9b0e81e5c613235944ff934 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1783,7 +1783,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1853,7 +1853,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } public void sendHealthUpdate() { @@ -346,10 +346,10 @@ index 96b9de5bf1ce1d32efe8d62079331c55533e4f15..42d7bd435fa8ee94af5eda4542598ed1 public void injectScaledMaxHealth(Collection collection, boolean force) { diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 2b0d09e8791a0b2915eb36bda5f0848731c4236b..995194c4499cc93dc2fa21b0a6d7d826877d2c78 100644 +index 42ffb557ac121ebf9404c02696231ef4e7117c92..3719bf85502f8b0a44ea2044163df84f4273cbc2 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -783,9 +783,16 @@ public class CraftEventFactory { +@@ -789,9 +789,16 @@ public class CraftEventFactory { public static EntityDeathEvent callEntityDeathEvent(EntityLiving victim, List drops) { CraftLivingEntity entity = (CraftLivingEntity) victim.getBukkitEntity(); EntityDeathEvent event = new EntityDeathEvent(entity, drops, victim.getExpReward()); @@ -366,7 +366,7 @@ index 2b0d09e8791a0b2915eb36bda5f0848731c4236b..995194c4499cc93dc2fa21b0a6d7d826 victim.expToDrop = event.getDroppedExp(); for (org.bukkit.inventory.ItemStack stack : event.getDrops()) { -@@ -801,8 +808,15 @@ public class CraftEventFactory { +@@ -807,8 +814,15 @@ public class CraftEventFactory { CraftPlayer entity = victim.getBukkitEntity(); PlayerDeathEvent event = new PlayerDeathEvent(entity, drops, victim.getExpReward(), 0, deathMessage); event.setKeepInventory(keepInventory); @@ -382,7 +382,7 @@ index 2b0d09e8791a0b2915eb36bda5f0848731c4236b..995194c4499cc93dc2fa21b0a6d7d826 victim.keepLevel = event.getKeepLevel(); victim.newLevel = event.getNewLevel(); -@@ -819,6 +833,31 @@ public class CraftEventFactory { +@@ -825,6 +839,31 @@ public class CraftEventFactory { return event; } diff --git a/Spigot-Server-Patches/0280-Allow-chests-to-be-placed-with-NBT-data.patch b/Spigot-Server-Patches/0281-Allow-chests-to-be-placed-with-NBT-data.patch similarity index 100% rename from Spigot-Server-Patches/0280-Allow-chests-to-be-placed-with-NBT-data.patch rename to Spigot-Server-Patches/0281-Allow-chests-to-be-placed-with-NBT-data.patch diff --git a/Spigot-Server-Patches/0281-Mob-Pathfinding-API.patch b/Spigot-Server-Patches/0282-Mob-Pathfinding-API.patch similarity index 100% rename from Spigot-Server-Patches/0281-Mob-Pathfinding-API.patch rename to Spigot-Server-Patches/0282-Mob-Pathfinding-API.patch diff --git a/Spigot-Server-Patches/0282-Prevent-chunk-loading-from-Fluid-Flowing.patch b/Spigot-Server-Patches/0283-Prevent-chunk-loading-from-Fluid-Flowing.patch similarity index 100% rename from Spigot-Server-Patches/0282-Prevent-chunk-loading-from-Fluid-Flowing.patch rename to Spigot-Server-Patches/0283-Prevent-chunk-loading-from-Fluid-Flowing.patch diff --git a/Spigot-Server-Patches/0283-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch b/Spigot-Server-Patches/0284-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch similarity index 97% rename from Spigot-Server-Patches/0283-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch rename to Spigot-Server-Patches/0284-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch index a58bef7c16..9a6e6ce5c0 100644 --- a/Spigot-Server-Patches/0283-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch +++ b/Spigot-Server-Patches/0284-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch @@ -32,7 +32,7 @@ index dc7a320c83802159aab2440b4fca26543be2524a..892f99c8b9385e80381058ead72d4346 this.s = this::l; if (this.i.canRead() && this.i.peek() == '#') { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index 41627c49decca02635036c970674f958e4de1b4d..ccf1c5d27f83d6a82a0fdb6ff839b7628538c705 100644 +index 6408cfdd52754167deed3a31d0913eb2e7bc4500..d14e640167e1d00b91ea63038cb434b9c83ce887 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -84,6 +84,12 @@ import org.bukkit.persistence.PersistentDataContainer; @@ -207,8 +207,8 @@ index 41627c49decca02635036c970674f958e4de1b4d..ccf1c5d27f83d6a82a0fdb6ff839b762 + return !(hasDisplayName() || hasLocalizedName() || hasEnchants() || (lore != null) || hasCustomModelData() || hasBlockData() || hasRepairCost() || !unhandledTags.isEmpty() || !persistentDataContainer.isEmpty() || hideFlag != 0 || isUnbreakable() || hasDamage() || hasAttributeModifiers() || hasPlaceableKeys() || hasDestroyableKeys()); // Paper - Implement an API for CanPlaceOn and CanDestroy NBT values } - @Override -@@ -1145,7 +1253,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { + // Paper start +@@ -1169,7 +1277,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { && (this.hideFlag == that.hideFlag) && (this.isUnbreakable() == that.isUnbreakable()) && (this.hasDamage() ? that.hasDamage() && this.damage == that.damage : !that.hasDamage()) @@ -221,7 +221,7 @@ index 41627c49decca02635036c970674f958e4de1b4d..ccf1c5d27f83d6a82a0fdb6ff839b762 } /** -@@ -1180,6 +1292,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1204,6 +1316,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { hash = 61 * hash + (hasDamage() ? this.damage : 0); hash = 61 * hash + (hasAttributeModifiers() ? this.attributeModifiers.hashCode() : 0); hash = 61 * hash + version; @@ -232,7 +232,7 @@ index 41627c49decca02635036c970674f958e4de1b4d..ccf1c5d27f83d6a82a0fdb6ff839b762 return hash; } -@@ -1204,6 +1320,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1228,6 +1344,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { clone.unbreakable = this.unbreakable; clone.damage = this.damage; clone.version = this.version; @@ -247,7 +247,7 @@ index 41627c49decca02635036c970674f958e4de1b4d..ccf1c5d27f83d6a82a0fdb6ff839b762 return clone; } catch (CloneNotSupportedException e) { throw new Error(e); -@@ -1261,6 +1385,24 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1285,6 +1409,24 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { builder.put(DAMAGE.BUKKIT, damage); } @@ -272,7 +272,7 @@ index 41627c49decca02635036c970674f958e4de1b4d..ccf1c5d27f83d6a82a0fdb6ff839b762 final Map internalTags = new HashMap(unhandledTags); serializeInternal(internalTags); if (!internalTags.isEmpty()) { -@@ -1425,6 +1567,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1449,6 +1591,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { CraftMetaArmorStand.SHOW_ARMS.NBT, CraftMetaArmorStand.SMALL.NBT, CraftMetaArmorStand.MARKER.NBT, @@ -281,7 +281,7 @@ index 41627c49decca02635036c970674f958e4de1b4d..ccf1c5d27f83d6a82a0fdb6ff839b762 // Paper end CraftMetaCompass.LODESTONE_DIMENSION.NBT, CraftMetaCompass.LODESTONE_POS.NBT, -@@ -1452,4 +1596,147 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1476,4 +1620,147 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { } // Paper end diff --git a/Spigot-Server-Patches/0284-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch b/Spigot-Server-Patches/0285-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch similarity index 100% rename from Spigot-Server-Patches/0284-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch rename to Spigot-Server-Patches/0285-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch diff --git a/Spigot-Server-Patches/0285-Prevent-mob-spawning-from-loading-generating-chunks.patch b/Spigot-Server-Patches/0286-Prevent-mob-spawning-from-loading-generating-chunks.patch similarity index 100% rename from Spigot-Server-Patches/0285-Prevent-mob-spawning-from-loading-generating-chunks.patch rename to Spigot-Server-Patches/0286-Prevent-mob-spawning-from-loading-generating-chunks.patch diff --git a/Spigot-Server-Patches/0286-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch b/Spigot-Server-Patches/0287-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch similarity index 100% rename from Spigot-Server-Patches/0286-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch rename to Spigot-Server-Patches/0287-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch diff --git a/Spigot-Server-Patches/0287-Implement-furnace-cook-speed-multiplier-API.patch b/Spigot-Server-Patches/0288-Implement-furnace-cook-speed-multiplier-API.patch similarity index 100% rename from Spigot-Server-Patches/0287-Implement-furnace-cook-speed-multiplier-API.patch rename to Spigot-Server-Patches/0288-Implement-furnace-cook-speed-multiplier-API.patch diff --git a/Spigot-Server-Patches/0288-PreSpawnerSpawnEvent.patch b/Spigot-Server-Patches/0289-PreSpawnerSpawnEvent.patch similarity index 100% rename from Spigot-Server-Patches/0288-PreSpawnerSpawnEvent.patch rename to Spigot-Server-Patches/0289-PreSpawnerSpawnEvent.patch diff --git a/Spigot-Server-Patches/0289-Catch-JsonParseException-in-Entity-and-TE-names.patch b/Spigot-Server-Patches/0290-Catch-JsonParseException-in-Entity-and-TE-names.patch similarity index 100% rename from Spigot-Server-Patches/0289-Catch-JsonParseException-in-Entity-and-TE-names.patch rename to Spigot-Server-Patches/0290-Catch-JsonParseException-in-Entity-and-TE-names.patch diff --git a/Spigot-Server-Patches/0290-Honor-EntityAgeable.ageLock.patch b/Spigot-Server-Patches/0291-Honor-EntityAgeable.ageLock.patch similarity index 100% rename from Spigot-Server-Patches/0290-Honor-EntityAgeable.ageLock.patch rename to Spigot-Server-Patches/0291-Honor-EntityAgeable.ageLock.patch diff --git a/Spigot-Server-Patches/0291-Configurable-connection-throttle-kick-message.patch b/Spigot-Server-Patches/0292-Configurable-connection-throttle-kick-message.patch similarity index 100% rename from Spigot-Server-Patches/0291-Configurable-connection-throttle-kick-message.patch rename to Spigot-Server-Patches/0292-Configurable-connection-throttle-kick-message.patch diff --git a/Spigot-Server-Patches/0292-Hook-into-CB-plugin-rewrites.patch b/Spigot-Server-Patches/0293-Hook-into-CB-plugin-rewrites.patch similarity index 100% rename from Spigot-Server-Patches/0292-Hook-into-CB-plugin-rewrites.patch rename to Spigot-Server-Patches/0293-Hook-into-CB-plugin-rewrites.patch diff --git a/Spigot-Server-Patches/0293-Allow-setting-the-vex-s-summoner.patch b/Spigot-Server-Patches/0294-Allow-setting-the-vex-s-summoner.patch similarity index 100% rename from Spigot-Server-Patches/0293-Allow-setting-the-vex-s-summoner.patch rename to Spigot-Server-Patches/0294-Allow-setting-the-vex-s-summoner.patch diff --git a/Spigot-Server-Patches/0294-Add-sun-related-API.patch b/Spigot-Server-Patches/0295-Add-sun-related-API.patch similarity index 89% rename from Spigot-Server-Patches/0294-Add-sun-related-API.patch rename to Spigot-Server-Patches/0295-Add-sun-related-API.patch index 51b920af13..ab67adfd67 100644 --- a/Spigot-Server-Patches/0294-Add-sun-related-API.patch +++ b/Spigot-Server-Patches/0295-Add-sun-related-API.patch @@ -17,7 +17,7 @@ index fbecc8ccab47b428c43530ad344e325538cf242d..800a8dd2543f0b83eec67e7805104274 if (this.world.isDay() && !this.world.isClientSide) { float f = this.aR(); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index bc10ccd76fcf3f03c23f52064c4db17bcad1c574..46a7e7b2f6079df036d2b73c82d7bf5ea1b07871 100644 +index ab05cc8e4188fcdfcd77ee6c1f217d0fa170c941..7e08032c968bb8405591082193b03badbe872436 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -858,6 +858,13 @@ public class CraftWorld implements World { @@ -32,8 +32,8 @@ index bc10ccd76fcf3f03c23f52064c4db17bcad1c574..46a7e7b2f6079df036d2b73c82d7bf5e + // Paper end + @Override - public long getGameTime() { - return world.worldData.getTime(); + public boolean createExplosion(double x, double y, double z, float power) { + return createExplosion(x, y, z, power, false, true); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java index c89bc7024b650c3b6d2c551f0e4e156975570cca..eaad222fd38a4db4074db04c931bcff7a9ca5e24 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java diff --git a/Spigot-Server-Patches/0295-Turtle-API.patch b/Spigot-Server-Patches/0296-Turtle-API.patch similarity index 100% rename from Spigot-Server-Patches/0295-Turtle-API.patch rename to Spigot-Server-Patches/0296-Turtle-API.patch diff --git a/Spigot-Server-Patches/0296-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch b/Spigot-Server-Patches/0297-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch similarity index 100% rename from Spigot-Server-Patches/0296-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch rename to Spigot-Server-Patches/0297-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch diff --git a/Spigot-Server-Patches/0297-Call-player-spectator-target-events-and-improve-impl.patch b/Spigot-Server-Patches/0298-Call-player-spectator-target-events-and-improve-impl.patch similarity index 95% rename from Spigot-Server-Patches/0297-Call-player-spectator-target-events-and-improve-impl.patch rename to Spigot-Server-Patches/0298-Call-player-spectator-target-events-and-improve-impl.patch index f0433d4b8d..956293caa1 100644 --- a/Spigot-Server-Patches/0297-Call-player-spectator-target-events-and-improve-impl.patch +++ b/Spigot-Server-Patches/0298-Call-player-spectator-target-events-and-improve-impl.patch @@ -19,10 +19,10 @@ spectate the target entity. Co-authored-by: Spottedleaf diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 012856b4dd5a004979d8a5f8521774a404d7d090..8307dd36f772fd575a5a0cbdc7e49aecbd6e29c7 100644 +index 273fd5a83790f76f089c2b1308a1e02ac6828683..d92cb1aca385ea15c181ba0dc8f19f317c995163 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -1681,15 +1681,59 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1683,15 +1683,59 @@ public class EntityPlayer extends EntityHuman implements ICrafting { return (Entity) (this.spectatedEntity == null ? this : this.spectatedEntity); } @@ -88,7 +88,7 @@ index 012856b4dd5a004979d8a5f8521774a404d7d090..8307dd36f772fd575a5a0cbdc7e49aec @Override diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index c15d0d0f6f0cfede9c22eba058f2323590f48df7..a534b36ebeb73da843973cc26cdffc91a8173a03 100644 +index ffc0d54ef7aa717d539d9de8af39637b5676dba7..f6bd6a3977678891e7c900fc7b3696e922675dde 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -1204,6 +1204,7 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0298-Add-Velocity-IP-Forwarding-Support.patch b/Spigot-Server-Patches/0299-Add-Velocity-IP-Forwarding-Support.patch similarity index 93% rename from Spigot-Server-Patches/0298-Add-Velocity-IP-Forwarding-Support.patch rename to Spigot-Server-Patches/0299-Add-Velocity-IP-Forwarding-Support.patch index 05fd3367f7..89a7a64c7e 100644 --- a/Spigot-Server-Patches/0298-Add-Velocity-IP-Forwarding-Support.patch +++ b/Spigot-Server-Patches/0299-Add-Velocity-IP-Forwarding-Support.patch @@ -127,10 +127,10 @@ index 0000000000000000000000000000000000000000..fdd8708f974700c7cde6e436c2f189d9 + } +} diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java -index 87dcb1688d1bf1221609a410c33a8d61b0761a1f..2b46943e094544611390758664f3b2a3e2949323 100644 +index 066b0dbdbc101a8235fb872c2d1e9d427dfd6bb8..ddad076c7eb6d30f2e0f187e004c9e198f7ff777 100644 --- a/src/main/java/net/minecraft/server/LoginListener.java +++ b/src/main/java/net/minecraft/server/LoginListener.java -@@ -26,6 +26,7 @@ import org.bukkit.craftbukkit.util.Waitable; +@@ -27,6 +27,7 @@ import org.bukkit.craftbukkit.util.Waitable; import org.bukkit.event.player.AsyncPlayerPreLoginEvent; import org.bukkit.event.player.PlayerPreLoginEvent; // CraftBukkit end @@ -138,7 +138,7 @@ index 87dcb1688d1bf1221609a410c33a8d61b0761a1f..2b46943e094544611390758664f3b2a3 public class LoginListener implements PacketLoginInListener { -@@ -42,6 +43,7 @@ public class LoginListener implements PacketLoginInListener { +@@ -43,6 +44,7 @@ public class LoginListener implements PacketLoginInListener { private SecretKey loginKey; private EntityPlayer l; public String hostname = ""; // CraftBukkit - add field @@ -146,7 +146,7 @@ index 87dcb1688d1bf1221609a410c33a8d61b0761a1f..2b46943e094544611390758664f3b2a3 public LoginListener(MinecraftServer minecraftserver, NetworkManager networkmanager) { this.g = LoginListener.EnumProtocolState.HELLO; -@@ -193,6 +195,14 @@ public class LoginListener implements PacketLoginInListener { +@@ -194,6 +196,14 @@ public class LoginListener implements PacketLoginInListener { this.g = LoginListener.EnumProtocolState.KEY; this.networkManager.sendPacket(new PacketLoginOutEncryptionBegin("", this.server.getKeyPair().getPublic().getEncoded(), this.e)); } else { @@ -161,7 +161,7 @@ index 87dcb1688d1bf1221609a410c33a8d61b0761a1f..2b46943e094544611390758664f3b2a3 // Spigot start // Paper start - Cache authenticator threads authenticatorPool.execute(new Runnable() { -@@ -294,6 +304,12 @@ public class LoginListener implements PacketLoginInListener { +@@ -295,6 +305,12 @@ public class LoginListener implements PacketLoginInListener { public class LoginHandler { public void fireEvents() throws Exception { @@ -174,7 +174,7 @@ index 87dcb1688d1bf1221609a410c33a8d61b0761a1f..2b46943e094544611390758664f3b2a3 String playerName = i.getName(); java.net.InetAddress address = ((java.net.InetSocketAddress) networkManager.getSocketAddress()).getAddress(); java.util.UUID uniqueId = i.getId(); -@@ -341,6 +357,35 @@ public class LoginListener implements PacketLoginInListener { +@@ -342,6 +358,35 @@ public class LoginListener implements PacketLoginInListener { // Spigot end public void a(PacketLoginInCustomPayload packetloginincustompayload) { @@ -211,10 +211,10 @@ index 87dcb1688d1bf1221609a410c33a8d61b0761a1f..2b46943e094544611390758664f3b2a3 } diff --git a/src/main/java/net/minecraft/server/PacketDataSerializer.java b/src/main/java/net/minecraft/server/PacketDataSerializer.java -index ee24acdd5e843e5421bf83bd6c069a4ecca09115..f43193c1090238f2241b878120247d1b3d0d4e57 100644 +index 3d6fbde63d110559b552d052ef9a934318a00682..4be310ada6477b2040f2ea11010f429c3f38c4ac 100644 --- a/src/main/java/net/minecraft/server/PacketDataSerializer.java +++ b/src/main/java/net/minecraft/server/PacketDataSerializer.java -@@ -164,6 +164,7 @@ public class PacketDataSerializer extends ByteBuf { +@@ -173,6 +173,7 @@ public class PacketDataSerializer extends ByteBuf { return this.d(oenum.ordinal()); } @@ -222,7 +222,7 @@ index ee24acdd5e843e5421bf83bd6c069a4ecca09115..f43193c1090238f2241b878120247d1b public int i() { int i = 0; int j = 0; -@@ -204,6 +205,7 @@ public class PacketDataSerializer extends ByteBuf { +@@ -213,6 +214,7 @@ public class PacketDataSerializer extends ByteBuf { return this; } @@ -230,7 +230,7 @@ index ee24acdd5e843e5421bf83bd6c069a4ecca09115..f43193c1090238f2241b878120247d1b public UUID k() { return new UUID(this.readLong(), this.readLong()); } -@@ -331,6 +333,7 @@ public class PacketDataSerializer extends ByteBuf { +@@ -340,6 +342,7 @@ public class PacketDataSerializer extends ByteBuf { } } @@ -273,10 +273,10 @@ index b52e8b72eaee87e227b7cc2fd66101550262cb7e..990cfea6c2339cd3cf688e4645de76dc public void a(PacketDataSerializer packetdataserializer) throws IOException { this.a = packetdataserializer.i(); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 77c782acdfc4f0403a06219759f0154d77f69c58..42f3d7545203f9e00ac241452ac8f214c693486d 100644 +index cb73b10ca46b6bb2080f4c76f48a2b9789408dc4..1babfde50eee8d90cab8d8d0445d5dae7f5965bf 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -682,7 +682,7 @@ public final class CraftServer implements Server { +@@ -686,7 +686,7 @@ public final class CraftServer implements Server { @Override public long getConnectionThrottle() { // Spigot Start - Automatically set connection throttle for bungee configurations diff --git a/Spigot-Server-Patches/0299-Add-more-Witch-API.patch b/Spigot-Server-Patches/0300-Add-more-Witch-API.patch similarity index 100% rename from Spigot-Server-Patches/0299-Add-more-Witch-API.patch rename to Spigot-Server-Patches/0300-Add-more-Witch-API.patch diff --git a/Spigot-Server-Patches/0300-Check-Drowned-for-Villager-Aggression-Config.patch b/Spigot-Server-Patches/0301-Check-Drowned-for-Villager-Aggression-Config.patch similarity index 100% rename from Spigot-Server-Patches/0300-Check-Drowned-for-Villager-Aggression-Config.patch rename to Spigot-Server-Patches/0301-Check-Drowned-for-Villager-Aggression-Config.patch diff --git a/Spigot-Server-Patches/0301-Here-s-Johnny.patch b/Spigot-Server-Patches/0302-Here-s-Johnny.patch similarity index 100% rename from Spigot-Server-Patches/0301-Here-s-Johnny.patch rename to Spigot-Server-Patches/0302-Here-s-Johnny.patch diff --git a/Spigot-Server-Patches/0302-Add-option-to-prevent-players-from-moving-into-unloa.patch b/Spigot-Server-Patches/0303-Add-option-to-prevent-players-from-moving-into-unloa.patch similarity index 97% rename from Spigot-Server-Patches/0302-Add-option-to-prevent-players-from-moving-into-unloa.patch rename to Spigot-Server-Patches/0303-Add-option-to-prevent-players-from-moving-into-unloa.patch index a25771c3ad..cc8d786568 100644 --- a/Spigot-Server-Patches/0302-Add-option-to-prevent-players-from-moving-into-unloa.patch +++ b/Spigot-Server-Patches/0303-Add-option-to-prevent-players-from-moving-into-unloa.patch @@ -20,7 +20,7 @@ index f280dbff4a09bc611a9ca565c6d697d08801f53b..fbf3ccfb347a5ba6e895339e9576629d + } } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index a534b36ebeb73da843973cc26cdffc91a8173a03..c2fa077daad9d29e18b6d562f2870bd38177fb24 100644 +index f6bd6a3977678891e7c900fc7b3696e922675dde..36f2bf45ca443c12abb2ef79ea815466e5fa4843 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -392,6 +392,13 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0303-Reset-players-airTicks-on-respawn.patch b/Spigot-Server-Patches/0304-Reset-players-airTicks-on-respawn.patch similarity index 81% rename from Spigot-Server-Patches/0303-Reset-players-airTicks-on-respawn.patch rename to Spigot-Server-Patches/0304-Reset-players-airTicks-on-respawn.patch index 1bd90c0266..42ee52deb6 100644 --- a/Spigot-Server-Patches/0303-Reset-players-airTicks-on-respawn.patch +++ b/Spigot-Server-Patches/0304-Reset-players-airTicks-on-respawn.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Reset players airTicks on respawn diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 9b55635d97f8ad90f13fdf609471c1f73eb40aed..00d783a7fd27fb46f5bbca4055be1530efd71534 100644 +index c9f4dab524e8f2a80b9e3ee178c36b2e394b5f84..9b8d17aa68bad1a4916681b9eed121011bf3380c 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -2264,6 +2264,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -17,10 +17,10 @@ index 9b55635d97f8ad90f13fdf609471c1f73eb40aed..00d783a7fd27fb46f5bbca4055be1530 return 300; } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 8307dd36f772fd575a5a0cbdc7e49aecbd6e29c7..3530d98ce36e418aa62cc9be3751863af8283339 100644 +index d92cb1aca385ea15c181ba0dc8f19f317c995163..79a451fb8b19ff35fa935d40d97a53075e6b6e54 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -2023,6 +2023,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -2025,6 +2025,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } this.setHealth(this.getMaxHealth()); diff --git a/Spigot-Server-Patches/0304-Don-t-sleep-after-profile-lookups-if-not-needed.patch b/Spigot-Server-Patches/0305-Don-t-sleep-after-profile-lookups-if-not-needed.patch similarity index 100% rename from Spigot-Server-Patches/0304-Don-t-sleep-after-profile-lookups-if-not-needed.patch rename to Spigot-Server-Patches/0305-Don-t-sleep-after-profile-lookups-if-not-needed.patch diff --git a/Spigot-Server-Patches/0305-Improve-Server-Thread-Pool-and-Thread-Priorities.patch b/Spigot-Server-Patches/0306-Improve-Server-Thread-Pool-and-Thread-Priorities.patch similarity index 100% rename from Spigot-Server-Patches/0305-Improve-Server-Thread-Pool-and-Thread-Priorities.patch rename to Spigot-Server-Patches/0306-Improve-Server-Thread-Pool-and-Thread-Priorities.patch diff --git a/Spigot-Server-Patches/0306-Optimize-World-Time-Updates.patch b/Spigot-Server-Patches/0307-Optimize-World-Time-Updates.patch similarity index 100% rename from Spigot-Server-Patches/0306-Optimize-World-Time-Updates.patch rename to Spigot-Server-Patches/0307-Optimize-World-Time-Updates.patch diff --git a/Spigot-Server-Patches/0307-Restore-custom-InventoryHolder-support.patch b/Spigot-Server-Patches/0308-Restore-custom-InventoryHolder-support.patch similarity index 88% rename from Spigot-Server-Patches/0307-Restore-custom-InventoryHolder-support.patch rename to Spigot-Server-Patches/0308-Restore-custom-InventoryHolder-support.patch index 247173fb9d..eb090bde9f 100644 --- a/Spigot-Server-Patches/0307-Restore-custom-InventoryHolder-support.patch +++ b/Spigot-Server-Patches/0308-Restore-custom-InventoryHolder-support.patch @@ -17,10 +17,10 @@ will always work as intended in the past, those without will create implementati based inventories. diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftInventoryCreator.java b/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftInventoryCreator.java -index b51321c8dd70a90ab149f456c7ffb4587c4fbd34..c1db7104e398df484f1e5400e98714aefd3315f2 100644 +index 94d807c5d09f165c6eedd0a1c4026c2b833806a0..3e56de295be0d03dddd3e54fcd7b05d4b9c74dc4 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftInventoryCreator.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftInventoryCreator.java -@@ -40,10 +40,20 @@ public final class CraftInventoryCreator { +@@ -40,6 +40,11 @@ public final class CraftInventoryCreator { } public Inventory createInventory(InventoryHolder holder, InventoryType type) { @@ -32,6 +32,9 @@ index b51321c8dd70a90ab149f456c7ffb4587c4fbd34..c1db7104e398df484f1e5400e98714ae return converterMap.get(type).createInventory(holder, type); } +@@ -55,6 +60,11 @@ public final class CraftInventoryCreator { + // Paper end + public Inventory createInventory(InventoryHolder holder, InventoryType type, String title) { + // Paper start + if (holder != null) { diff --git a/Spigot-Server-Patches/0308-Use-Vanilla-Minecart-Speeds.patch b/Spigot-Server-Patches/0309-Use-Vanilla-Minecart-Speeds.patch similarity index 100% rename from Spigot-Server-Patches/0308-Use-Vanilla-Minecart-Speeds.patch rename to Spigot-Server-Patches/0309-Use-Vanilla-Minecart-Speeds.patch diff --git a/Spigot-Server-Patches/0309-Fix-SpongeAbsortEvent-handling.patch b/Spigot-Server-Patches/0310-Fix-SpongeAbsortEvent-handling.patch similarity index 100% rename from Spigot-Server-Patches/0309-Fix-SpongeAbsortEvent-handling.patch rename to Spigot-Server-Patches/0310-Fix-SpongeAbsortEvent-handling.patch diff --git a/Spigot-Server-Patches/0310-Don-t-allow-digging-into-unloaded-chunks.patch b/Spigot-Server-Patches/0311-Don-t-allow-digging-into-unloaded-chunks.patch similarity index 97% rename from Spigot-Server-Patches/0310-Don-t-allow-digging-into-unloaded-chunks.patch rename to Spigot-Server-Patches/0311-Don-t-allow-digging-into-unloaded-chunks.patch index 2bb667e205..0aed0fd13b 100644 --- a/Spigot-Server-Patches/0310-Don-t-allow-digging-into-unloaded-chunks.patch +++ b/Spigot-Server-Patches/0311-Don-t-allow-digging-into-unloaded-chunks.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Don't allow digging into unloaded chunks diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index c2fa077daad9d29e18b6d562f2870bd38177fb24..cc141f02d5a2b1a5c50e5583d3537d5883762db1 100644 +index 36f2bf45ca443c12abb2ef79ea815466e5fa4843..25e5c0ca0c8895a060d1fa00bee373ca624595bf 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -1368,6 +1368,11 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0311-Book-Size-Limits.patch b/Spigot-Server-Patches/0312-Book-Size-Limits.patch similarity index 97% rename from Spigot-Server-Patches/0311-Book-Size-Limits.patch rename to Spigot-Server-Patches/0312-Book-Size-Limits.patch index d6c8144ffc..ea7480e6c4 100644 --- a/Spigot-Server-Patches/0311-Book-Size-Limits.patch +++ b/Spigot-Server-Patches/0312-Book-Size-Limits.patch @@ -22,7 +22,7 @@ index 1697687405392198d2df653220465671675362c2..e8bade581ed391b25c592dbafb3fb3cc + } } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index cc141f02d5a2b1a5c50e5583d3537d5883762db1..6ad02246267f4d95f82164b70c30ac2955c563fe 100644 +index 25e5c0ca0c8895a060d1fa00bee373ca624595bf..604aa80fe8d8efd171b9db691bba77b6090194b5 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -20,6 +20,7 @@ import java.util.function.Consumer; diff --git a/Spigot-Server-Patches/0312-Make-the-default-permission-message-configurable.patch b/Spigot-Server-Patches/0313-Make-the-default-permission-message-configurable.patch similarity index 93% rename from Spigot-Server-Patches/0312-Make-the-default-permission-message-configurable.patch rename to Spigot-Server-Patches/0313-Make-the-default-permission-message-configurable.patch index 05243c02e7..b7f00a99ff 100644 --- a/Spigot-Server-Patches/0312-Make-the-default-permission-message-configurable.patch +++ b/Spigot-Server-Patches/0313-Make-the-default-permission-message-configurable.patch @@ -29,10 +29,10 @@ index e8bade581ed391b25c592dbafb3fb3ccf72be616..053ba1023b6d1393c0ade589ae53feb2 Object val = config.get("settings.save-player-data"); if (val instanceof Boolean) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 42f3d7545203f9e00ac241452ac8f214c693486d..c04722999aac8cf4f38765312edf47444b90f91b 100644 +index 1babfde50eee8d90cab8d8d0445d5dae7f5965bf..53c26b5353e1114a63451af1a466978b094cf2dd 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2277,6 +2277,11 @@ public final class CraftServer implements Server { +@@ -2334,6 +2334,11 @@ public final class CraftServer implements Server { return com.destroystokyo.paper.PaperConfig.suggestPlayersWhenNullTabCompletions; } diff --git a/Spigot-Server-Patches/0313-Prevent-rayTrace-from-loading-chunks.patch b/Spigot-Server-Patches/0314-Prevent-rayTrace-from-loading-chunks.patch similarity index 100% rename from Spigot-Server-Patches/0313-Prevent-rayTrace-from-loading-chunks.patch rename to Spigot-Server-Patches/0314-Prevent-rayTrace-from-loading-chunks.patch diff --git a/Spigot-Server-Patches/0314-Handle-Large-Packets-disconnecting-client.patch b/Spigot-Server-Patches/0315-Handle-Large-Packets-disconnecting-client.patch similarity index 97% rename from Spigot-Server-Patches/0314-Handle-Large-Packets-disconnecting-client.patch rename to Spigot-Server-Patches/0315-Handle-Large-Packets-disconnecting-client.patch index aa7bf79387..3dbddbe99f 100644 --- a/Spigot-Server-Patches/0314-Handle-Large-Packets-disconnecting-client.patch +++ b/Spigot-Server-Patches/0315-Handle-Large-Packets-disconnecting-client.patch @@ -52,10 +52,10 @@ index 601d4d0fa2a0b3e90f81aed55a2d3473c66c7875..2d8e6a2f4a0c3c5d74a647d7164b0028 return false; } diff --git a/src/main/java/net/minecraft/server/PacketEncoder.java b/src/main/java/net/minecraft/server/PacketEncoder.java -index 63c4dbd327beb7b6ab42eb44650d68accd3b0de6..b0cfef52cbb5e23beae528668e4e98cedecf603c 100644 +index d3c6bdbefb89b3e668477e0d771015e9b25c24a8..dbf85f49703f9599f6d6b441db566dd8f6d3cd4b 100644 --- a/src/main/java/net/minecraft/server/PacketEncoder.java +++ b/src/main/java/net/minecraft/server/PacketEncoder.java -@@ -49,7 +49,31 @@ public class PacketEncoder extends MessageToByteEncoder> { +@@ -51,7 +51,31 @@ public class PacketEncoder extends MessageToByteEncoder> { throw throwable; } } diff --git a/Spigot-Server-Patches/0315-force-entity-dismount-during-teleportation.patch b/Spigot-Server-Patches/0316-force-entity-dismount-during-teleportation.patch similarity index 96% rename from Spigot-Server-Patches/0315-force-entity-dismount-during-teleportation.patch rename to Spigot-Server-Patches/0316-force-entity-dismount-during-teleportation.patch index f3c5bffd1f..13c939233a 100644 --- a/Spigot-Server-Patches/0315-force-entity-dismount-during-teleportation.patch +++ b/Spigot-Server-Patches/0316-force-entity-dismount-during-teleportation.patch @@ -20,7 +20,7 @@ this is going to be the best soultion all around. Improvements/suggestions welcome! diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 00d783a7fd27fb46f5bbca4055be1530efd71534..1db2c51f0c1de27504d3f44070042e5e0dacf9cd 100644 +index 9b8d17aa68bad1a4916681b9eed121011bf3380c..031dcd2092800118d4cb12c8bb92b51ccf1bbd27 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -1954,12 +1954,15 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -112,10 +112,10 @@ index 352049363d4b7a0302610f7d7cd54c9cc6c2a9e0..cade819fe5f7b23b2f4ada721b33ae74 this.a(entity); } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 3530d98ce36e418aa62cc9be3751863af8283339..054820fb0d105b5d5aaaeea9a0675e3085eb4646 100644 +index 79a451fb8b19ff35fa935d40d97a53075e6b6e54..32e22f179b525021d80d4e58d04a14947671a725 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -1128,11 +1128,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1125,11 +1125,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } } diff --git a/Spigot-Server-Patches/0316-Add-more-Zombie-API.patch b/Spigot-Server-Patches/0317-Add-more-Zombie-API.patch similarity index 93% rename from Spigot-Server-Patches/0316-Add-more-Zombie-API.patch rename to Spigot-Server-Patches/0317-Add-more-Zombie-API.patch index 01c228d71e..4f5286f33a 100644 --- a/Spigot-Server-Patches/0316-Add-more-Zombie-API.patch +++ b/Spigot-Server-Patches/0317-Add-more-Zombie-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add more Zombie API diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java -index 422632c9050d0bcc5398ac5d4cf51801cea9cdda..9b1297e564738eb40e6e9329817d8ebab11dce40 100644 +index d07847876e22971b4a90f67d8281bf08361424e0..8c4a27721b66800c2d9b7bc6c1878b73b76b0df1 100644 --- a/src/main/java/net/minecraft/server/EntityZombie.java +++ b/src/main/java/net/minecraft/server/EntityZombie.java @@ -33,6 +33,7 @@ public class EntityZombie extends EntityMonster { @@ -29,7 +29,7 @@ index 422632c9050d0bcc5398ac5d4cf51801cea9cdda..9b1297e564738eb40e6e9329817d8eba public void startDrownedConversion(int i) { this.lastTick = MinecraftServer.currentTick; // CraftBukkit this.drownedConversionTime = i; -@@ -229,9 +236,16 @@ public class EntityZombie extends EntityMonster { +@@ -226,9 +233,16 @@ public class EntityZombie extends EntityMonster { } @@ -47,7 +47,7 @@ index 422632c9050d0bcc5398ac5d4cf51801cea9cdda..9b1297e564738eb40e6e9329817d8eba @Override public boolean damageEntity(DamageSource damagesource, float f) { -@@ -352,6 +366,7 @@ public class EntityZombie extends EntityMonster { +@@ -349,6 +363,7 @@ public class EntityZombie extends EntityMonster { nbttagcompound.setBoolean("CanBreakDoors", this.eU()); nbttagcompound.setInt("InWaterTime", this.isInWater() ? this.bt : -1); nbttagcompound.setInt("DrownedConversionTime", this.isDrownConverting() ? this.drownedConversionTime : -1); @@ -55,7 +55,7 @@ index 422632c9050d0bcc5398ac5d4cf51801cea9cdda..9b1297e564738eb40e6e9329817d8eba } @Override -@@ -363,7 +378,11 @@ public class EntityZombie extends EntityMonster { +@@ -360,7 +375,11 @@ public class EntityZombie extends EntityMonster { if (nbttagcompound.hasKeyOfType("DrownedConversionTime", 99) && nbttagcompound.getInt("DrownedConversionTime") > -1) { this.startDrownedConversion(nbttagcompound.getInt("DrownedConversionTime")); } diff --git a/Spigot-Server-Patches/0317-Add-PlayerConnectionCloseEvent.patch b/Spigot-Server-Patches/0318-Add-PlayerConnectionCloseEvent.patch similarity index 96% rename from Spigot-Server-Patches/0317-Add-PlayerConnectionCloseEvent.patch rename to Spigot-Server-Patches/0318-Add-PlayerConnectionCloseEvent.patch index a7e3659966..8a986fcb5a 100644 --- a/Spigot-Server-Patches/0317-Add-PlayerConnectionCloseEvent.patch +++ b/Spigot-Server-Patches/0318-Add-PlayerConnectionCloseEvent.patch @@ -34,10 +34,10 @@ how PlayerPreLoginEvent interacts with PlayerConnectionCloseEvent is undefined. diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java -index 2b46943e094544611390758664f3b2a3e2949323..0b1baeab3075a741519c6875f7b4847ce6cad8fc 100644 +index ddad076c7eb6d30f2e0f187e004c9e198f7ff777..e5790c2aeaa380a3acc26434f5de78ac746c6d57 100644 --- a/src/main/java/net/minecraft/server/LoginListener.java +++ b/src/main/java/net/minecraft/server/LoginListener.java -@@ -36,9 +36,9 @@ public class LoginListener implements PacketLoginInListener { +@@ -37,9 +37,9 @@ public class LoginListener implements PacketLoginInListener { private final byte[] e = new byte[4]; private final MinecraftServer server; public final NetworkManager networkManager; diff --git a/Spigot-Server-Patches/0318-Prevent-Enderman-from-loading-chunks.patch b/Spigot-Server-Patches/0319-Prevent-Enderman-from-loading-chunks.patch similarity index 100% rename from Spigot-Server-Patches/0318-Prevent-Enderman-from-loading-chunks.patch rename to Spigot-Server-Patches/0319-Prevent-Enderman-from-loading-chunks.patch diff --git a/Spigot-Server-Patches/0319-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch b/Spigot-Server-Patches/0320-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch similarity index 91% rename from Spigot-Server-Patches/0319-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch rename to Spigot-Server-Patches/0320-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch index c26dcdc5ea..52f3c9f701 100644 --- a/Spigot-Server-Patches/0319-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch +++ b/Spigot-Server-Patches/0320-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch @@ -16,10 +16,10 @@ intent to remove) and replace it with two new methods, clearly named and documented as to their purpose. diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 054820fb0d105b5d5aaaeea9a0675e3085eb4646..a8802c21c4892717730d71b157c0fcf66d86e47e 100644 +index 32e22f179b525021d80d4e58d04a14947671a725..0c494b9c463789cd35d906afbdba5bcfffdbb28d 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -85,6 +85,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -86,6 +86,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { public int ping; public boolean viewingCredits; private int containerUpdateDelay; // Paper @@ -28,10 +28,10 @@ index 054820fb0d105b5d5aaaeea9a0675e3085eb4646..a8802c21c4892717730d71b157c0fcf6 public boolean queueHealthUpdatePacket = false; public net.minecraft.server.PacketPlayOutUpdateHealth queuedHealthUpdatePacket; diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 304ef7279f649dd8c51a68084b839c3092e5872e..ed4aafc01f5befce2e5a3d6a562c6a1c866b2378 100644 +index 55427a0a8e420eb7eedd9dcc951c56ddc1ef4020..dbeb63de4fef480f5f4f3b967ddc93bb11616af5 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -97,6 +97,7 @@ public abstract class PlayerList { +@@ -99,6 +99,7 @@ public abstract class PlayerList { } public void a(NetworkManager networkmanager, EntityPlayer entityplayer) { @@ -106,7 +106,7 @@ index 00333548b470435aa89fb0f4b29047eb1461e992..5770d4183c1b9ab6119a25930283c023 public Location getBedSpawnLocation() { NBTTagCompound data = getData(); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 42d7bd435fa8ee94af5eda4542598ed1c6fbd0c1..cd6f4d8d3ab72ee2d4c9042bb17966ed36f4c383 100644 +index bb88a4a035dc7f56c9b0e81e5c613235944ff934..a96eb6d0383fb3a63e8d79eb41c7f9899eab744d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -141,6 +141,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -117,7 +117,7 @@ index 42d7bd435fa8ee94af5eda4542598ed1c6fbd0c1..cd6f4d8d3ab72ee2d4c9042bb17966ed // Paper end public CraftPlayer(CraftServer server, EntityPlayer entity) { -@@ -1427,6 +1428,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1497,6 +1498,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player { this.firstPlayed = firstPlayed; } @@ -136,7 +136,7 @@ index 42d7bd435fa8ee94af5eda4542598ed1c6fbd0c1..cd6f4d8d3ab72ee2d4c9042bb17966ed public void readExtraData(NBTTagCompound nbttagcompound) { hasPlayedBefore = true; if (nbttagcompound.hasKey("bukkit")) { -@@ -1449,6 +1462,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1519,6 +1532,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } public void setExtraData(NBTTagCompound nbttagcompound) { @@ -145,7 +145,7 @@ index 42d7bd435fa8ee94af5eda4542598ed1c6fbd0c1..cd6f4d8d3ab72ee2d4c9042bb17966ed if (!nbttagcompound.hasKey("bukkit")) { nbttagcompound.set("bukkit", new NBTTagCompound()); } -@@ -1463,6 +1478,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1533,6 +1548,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { data.setLong("firstPlayed", getFirstPlayed()); data.setLong("lastPlayed", System.currentTimeMillis()); data.setString("lastKnownName", handle.getName()); diff --git a/Spigot-Server-Patches/0320-Workaround-for-vehicle-tracking-issue-on-disconnect.patch b/Spigot-Server-Patches/0321-Workaround-for-vehicle-tracking-issue-on-disconnect.patch similarity index 85% rename from Spigot-Server-Patches/0320-Workaround-for-vehicle-tracking-issue-on-disconnect.patch rename to Spigot-Server-Patches/0321-Workaround-for-vehicle-tracking-issue-on-disconnect.patch index 73f3c3a89d..0a0bec7057 100644 --- a/Spigot-Server-Patches/0320-Workaround-for-vehicle-tracking-issue-on-disconnect.patch +++ b/Spigot-Server-Patches/0321-Workaround-for-vehicle-tracking-issue-on-disconnect.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Workaround for vehicle tracking issue on disconnect diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index a8802c21c4892717730d71b157c0fcf66d86e47e..07fbda110ed1a4f0286fe6352dbe90d54ee680ec 100644 +index 0c494b9c463789cd35d906afbdba5bcfffdbb28d..b1835179de7789ee98da8daa1d96c2feefab7ff6 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -1394,6 +1394,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1391,6 +1391,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting { public void p() { this.ch = true; this.ejectPassengers(); diff --git a/Spigot-Server-Patches/0321-Fire-BlockPistonRetractEvent-for-all-empty-pistons.patch b/Spigot-Server-Patches/0322-Fire-BlockPistonRetractEvent-for-all-empty-pistons.patch similarity index 100% rename from Spigot-Server-Patches/0321-Fire-BlockPistonRetractEvent-for-all-empty-pistons.patch rename to Spigot-Server-Patches/0322-Fire-BlockPistonRetractEvent-for-all-empty-pistons.patch diff --git a/Spigot-Server-Patches/0322-Block-Entity-remove-from-being-called-on-Players.patch b/Spigot-Server-Patches/0323-Block-Entity-remove-from-being-called-on-Players.patch similarity index 89% rename from Spigot-Server-Patches/0322-Block-Entity-remove-from-being-called-on-Players.patch rename to Spigot-Server-Patches/0323-Block-Entity-remove-from-being-called-on-Players.patch index 2bc81d669b..5f5c7111d8 100644 --- a/Spigot-Server-Patches/0322-Block-Entity-remove-from-being-called-on-Players.patch +++ b/Spigot-Server-Patches/0323-Block-Entity-remove-from-being-called-on-Players.patch @@ -12,10 +12,10 @@ Player we will look at limiting the scope of this change. It appears to be unintentional in the few cases we've seen so far. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index cd6f4d8d3ab72ee2d4c9042bb17966ed36f4c383..fdedd4de5a6538460a4c1124bfe45ceae6f2c809 100644 +index a96eb6d0383fb3a63e8d79eb41c7f9899eab744d..1b5b41cde053de63095099cb1018d429c3fbae75 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -2037,6 +2037,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2242,6 +2242,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public void resetCooldown() { getHandle().resetAttackCooldown(); } diff --git a/Spigot-Server-Patches/0323-BlockDestroyEvent.patch b/Spigot-Server-Patches/0324-BlockDestroyEvent.patch similarity index 95% rename from Spigot-Server-Patches/0323-BlockDestroyEvent.patch rename to Spigot-Server-Patches/0324-BlockDestroyEvent.patch index 17f5cfb7c1..29e57dba91 100644 --- a/Spigot-Server-Patches/0323-BlockDestroyEvent.patch +++ b/Spigot-Server-Patches/0324-BlockDestroyEvent.patch @@ -11,7 +11,7 @@ floating in the air. This can replace many uses of BlockPhysicsEvent diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index d6bce67fff263d2c04be29020a8dc66fa260a53e..6c0e179f4a6c14cf0cedc5a57e959d13a40ca42b 100644 +index ec77151d0dde422024ae5226ad7e3fb18c08f7c0..89bb995909882a4b35e2d07e5a47739c1d4f46f2 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -500,8 +500,20 @@ public abstract class World implements GeneratorAccess, AutoCloseable { diff --git a/Spigot-Server-Patches/0324-Fix-Custom-Shapeless-Custom-Crafting-Recipes.patch b/Spigot-Server-Patches/0325-Fix-Custom-Shapeless-Custom-Crafting-Recipes.patch similarity index 100% rename from Spigot-Server-Patches/0324-Fix-Custom-Shapeless-Custom-Crafting-Recipes.patch rename to Spigot-Server-Patches/0325-Fix-Custom-Shapeless-Custom-Crafting-Recipes.patch diff --git a/Spigot-Server-Patches/0325-Fix-sign-edit-memory-leak.patch b/Spigot-Server-Patches/0326-Fix-sign-edit-memory-leak.patch similarity index 92% rename from Spigot-Server-Patches/0325-Fix-sign-edit-memory-leak.patch rename to Spigot-Server-Patches/0326-Fix-sign-edit-memory-leak.patch index e0a1422f5d..b37b85c694 100644 --- a/Spigot-Server-Patches/0325-Fix-sign-edit-memory-leak.patch +++ b/Spigot-Server-Patches/0326-Fix-sign-edit-memory-leak.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Fix sign edit memory leak when a player edits a sign, a reference to their Entity is never cleand up. diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 6ad02246267f4d95f82164b70c30ac2955c563fe..42c6a55e76944dc78ee7b18cc95c418315b4250a 100644 +index 604aa80fe8d8efd171b9db691bba77b6090194b5..cd9818d33bf3206366838446779053b29c9750a3 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -2692,7 +2692,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -2695,7 +2695,7 @@ public class PlayerConnection implements PacketListenerPlayIn { TileEntitySign tileentitysign = (TileEntitySign) tileentity; diff --git a/Spigot-Server-Patches/0326-Limit-Client-Sign-length-more.patch b/Spigot-Server-Patches/0327-Limit-Client-Sign-length-more.patch similarity index 71% rename from Spigot-Server-Patches/0326-Limit-Client-Sign-length-more.patch rename to Spigot-Server-Patches/0327-Limit-Client-Sign-length-more.patch index 047bc3d02b..75b8cbbe27 100644 --- a/Spigot-Server-Patches/0326-Limit-Client-Sign-length-more.patch +++ b/Spigot-Server-Patches/0327-Limit-Client-Sign-length-more.patch @@ -22,10 +22,10 @@ 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/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 42c6a55e76944dc78ee7b18cc95c418315b4250a..800f6de16d5c0fe8fd0e8997e0f66fd494e2852f 100644 +index cd9818d33bf3206366838446779053b29c9750a3..90618fa896fbcbfe6559f38aeddf2f9592670f00 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -108,6 +108,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -110,6 +110,7 @@ public class PlayerConnection implements PacketListenerPlayIn { private int E; private int receivedMovePackets; private int processedMovePackets; @@ -33,11 +33,11 @@ index 42c6a55e76944dc78ee7b18cc95c418315b4250a..800f6de16d5c0fe8fd0e8997e0f66fd4 private static final long KEEPALIVE_LIMIT = Long.getLong("paper.playerconnection.keepalive", 30) * 1000; // Paper - provide property to set keepalive limit public PlayerConnection(MinecraftServer minecraftserver, NetworkManager networkmanager, EntityPlayer entityplayer) { -@@ -2706,7 +2707,17 @@ public class PlayerConnection implements PacketListenerPlayIn { - String[] lines = new String[4]; +@@ -2705,7 +2706,17 @@ public class PlayerConnection implements PacketListenerPlayIn { + List lines = new java.util.ArrayList<>(); for (int i = 0; i < list.size(); ++i) { -- lines[i] = SharedConstants.filterAllowedChatCharacters(list.get(i)); // Paper - Replaced with anvil color stripping method to stop exploits that allow colored signs to be created. +- lines.add(net.kyori.adventure.text.Component.text(SharedConstants.filterAllowedChatCharacters(list.get(i)))); // Paper - Replaced with anvil color stripping method to stop exploits that allow colored signs to be created. + // Paper start - cap line length - modified clients can send longer data than normal + String currentLine = list.get(i); + if (MAX_SIGN_LINE_LENGTH > 0 && currentLine.length() > MAX_SIGN_LINE_LENGTH) { @@ -48,7 +48,7 @@ index 42c6a55e76944dc78ee7b18cc95c418315b4250a..800f6de16d5c0fe8fd0e8997e0f66fd4 + } + } + // Paper end -+ lines[i] = SharedConstants.filterAllowedChatCharacters(currentLine); // Paper - Replaced with anvil color stripping method to stop exploits that allow colored signs to be created. ++ lines.add(net.kyori.adventure.text.Component.text(SharedConstants.filterAllowedChatCharacters(currentLine))); // Paper - Replaced with anvil color stripping method to stop exploits that allow colored signs to be created. } - SignChangeEvent event = new SignChangeEvent((org.bukkit.craftbukkit.block.CraftBlock) player.getWorld().getBlockAt(x, y, z), this.server.getPlayer(this.player), lines); + SignChangeEvent event = new SignChangeEvent(org.bukkit.craftbukkit.block.CraftBlock.at(worldserver, blockposition), this.getPlayer(), lines); this.server.getPluginManager().callEvent(event); diff --git a/Spigot-Server-Patches/0327-Don-t-check-ConvertSigns-boolean-every-sign-save.patch b/Spigot-Server-Patches/0328-Don-t-check-ConvertSigns-boolean-every-sign-save.patch similarity index 100% rename from Spigot-Server-Patches/0327-Don-t-check-ConvertSigns-boolean-every-sign-save.patch rename to Spigot-Server-Patches/0328-Don-t-check-ConvertSigns-boolean-every-sign-save.patch diff --git a/Spigot-Server-Patches/0328-Optimize-Network-Manager-and-add-advanced-packet-sup.patch b/Spigot-Server-Patches/0329-Optimize-Network-Manager-and-add-advanced-packet-sup.patch similarity index 100% rename from Spigot-Server-Patches/0328-Optimize-Network-Manager-and-add-advanced-packet-sup.patch rename to Spigot-Server-Patches/0329-Optimize-Network-Manager-and-add-advanced-packet-sup.patch diff --git a/Spigot-Server-Patches/0329-Handle-Oversized-Tile-Entities-in-chunks.patch b/Spigot-Server-Patches/0330-Handle-Oversized-Tile-Entities-in-chunks.patch similarity index 100% rename from Spigot-Server-Patches/0329-Handle-Oversized-Tile-Entities-in-chunks.patch rename to Spigot-Server-Patches/0330-Handle-Oversized-Tile-Entities-in-chunks.patch diff --git a/Spigot-Server-Patches/0330-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch b/Spigot-Server-Patches/0331-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch similarity index 94% rename from Spigot-Server-Patches/0330-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch rename to Spigot-Server-Patches/0331-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch index ff3c410987..b7509f753f 100644 --- a/Spigot-Server-Patches/0330-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch +++ b/Spigot-Server-Patches/0331-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch @@ -11,7 +11,7 @@ everything to the Whitelist object. https://github.com/PaperMC/Paper/issues/1880 diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index ed4aafc01f5befce2e5a3d6a562c6a1c866b2378..da345d7f1acd22441c2542d4f0268cd1b717a3e6 100644 +index dbeb63de4fef480f5f4f3b967ddc93bb11616af5..ce62e3706bb69068d3baa875ea9d227a9c3a9465 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -944,9 +944,9 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0331-Set-Zombie-last-tick-at-start-of-drowning-process.patch b/Spigot-Server-Patches/0332-Set-Zombie-last-tick-at-start-of-drowning-process.patch similarity index 90% rename from Spigot-Server-Patches/0331-Set-Zombie-last-tick-at-start-of-drowning-process.patch rename to Spigot-Server-Patches/0332-Set-Zombie-last-tick-at-start-of-drowning-process.patch index 5b40177af7..239496a521 100644 --- a/Spigot-Server-Patches/0331-Set-Zombie-last-tick-at-start-of-drowning-process.patch +++ b/Spigot-Server-Patches/0332-Set-Zombie-last-tick-at-start-of-drowning-process.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Set Zombie last tick at start of drowning process Fixes GH-1887 diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java -index 9b1297e564738eb40e6e9329817d8ebab11dce40..b7dc265ea684b71cc94e9a0542dad484864c0e30 100644 +index 8c4a27721b66800c2d9b7bc6c1878b73b76b0df1..05d7b7a67bfc117a91903db5f303587a4f8f8624 100644 --- a/src/main/java/net/minecraft/server/EntityZombie.java +++ b/src/main/java/net/minecraft/server/EntityZombie.java @@ -162,6 +162,7 @@ public class EntityZombie extends EntityMonster { diff --git a/Spigot-Server-Patches/0332-Allow-Saving-of-Oversized-Chunks.patch b/Spigot-Server-Patches/0333-Allow-Saving-of-Oversized-Chunks.patch similarity index 100% rename from Spigot-Server-Patches/0332-Allow-Saving-of-Oversized-Chunks.patch rename to Spigot-Server-Patches/0333-Allow-Saving-of-Oversized-Chunks.patch diff --git a/Spigot-Server-Patches/0333-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch b/Spigot-Server-Patches/0334-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch similarity index 88% rename from Spigot-Server-Patches/0333-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch rename to Spigot-Server-Patches/0334-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch index e9f146ac1a..b2412ae715 100644 --- a/Spigot-Server-Patches/0333-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch +++ b/Spigot-Server-Patches/0334-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Call WhitelistToggleEvent when whitelist is toggled diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index da345d7f1acd22441c2542d4f0268cd1b717a3e6..b6e8cd15fe2893ecde4c227f4fc28fcd07600f7c 100644 +index ce62e3706bb69068d3baa875ea9d227a9c3a9465..7e8178421c43fa3f555b1a30aa15512ab5b3b403 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -1062,6 +1062,7 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0334-Add-LivingEntity-getTargetEntity.patch b/Spigot-Server-Patches/0335-Add-LivingEntity-getTargetEntity.patch similarity index 98% rename from Spigot-Server-Patches/0334-Add-LivingEntity-getTargetEntity.patch rename to Spigot-Server-Patches/0335-Add-LivingEntity-getTargetEntity.patch index 73e0a46100..8075d015c6 100644 --- a/Spigot-Server-Patches/0334-Add-LivingEntity-getTargetEntity.patch +++ b/Spigot-Server-Patches/0335-Add-LivingEntity-getTargetEntity.patch @@ -46,7 +46,7 @@ index 02c09f39848399a86d46bd17569b4f01a7b5ab1f..ed9b2f9adfecdc6d1b9925579ec51065 double[] adouble = new double[]{1.0D}; double d0 = vec3d1.x - vec3d.x; diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 1db2c51f0c1de27504d3f44070042e5e0dacf9cd..00c57501f80fd0988573b36cd7e75a343c7e8e6e 100644 +index 031dcd2092800118d4cb12c8bb92b51ccf1bbd27..8827ccfc77284020496046e755b3639de75c5903 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -1418,6 +1418,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/0335-Use-proper-max-length-when-serialising-BungeeCord-te.patch b/Spigot-Server-Patches/0336-Use-proper-max-length-when-serialising-BungeeCord-te.patch similarity index 88% rename from Spigot-Server-Patches/0335-Use-proper-max-length-when-serialising-BungeeCord-te.patch rename to Spigot-Server-Patches/0336-Use-proper-max-length-when-serialising-BungeeCord-te.patch index 2918d2ee68..ccd312c668 100644 --- a/Spigot-Server-Patches/0335-Use-proper-max-length-when-serialising-BungeeCord-te.patch +++ b/Spigot-Server-Patches/0336-Use-proper-max-length-when-serialising-BungeeCord-te.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Use proper max length when serialising BungeeCord text diff --git a/src/main/java/net/minecraft/server/PacketPlayOutChat.java b/src/main/java/net/minecraft/server/PacketPlayOutChat.java -index 6ae26f8c3637e0c9e56ed3e14aaac0e3f781cb43..b9b2ddc1acadb96a0c750aeba0c0f6928f74e2fe 100644 +index b9cb21c5eb6f4a0318c3c63ec66f88b1750782ac..18528c792ae12bd8753e8529f4b73b76407e67dc 100644 --- a/src/main/java/net/minecraft/server/PacketPlayOutChat.java +++ b/src/main/java/net/minecraft/server/PacketPlayOutChat.java @@ -4,7 +4,7 @@ import java.io.IOException; @@ -16,9 +16,9 @@ index 6ae26f8c3637e0c9e56ed3e14aaac0e3f781cb43..b9b2ddc1acadb96a0c750aeba0c0f692 - + private static final int MAX_LENGTH = Short.MAX_VALUE * 8 + 8; // Paper private IChatBaseComponent a; + public net.kyori.adventure.text.Component adventure$message; // Paper public net.md_5.bungee.api.chat.BaseComponent[] components; // Spigot - private ChatMessageType b; -@@ -32,9 +32,9 @@ public class PacketPlayOutChat implements Packet { +@@ -38,9 +38,9 @@ public class PacketPlayOutChat implements Packet { //packetdataserializer.a(net.md_5.bungee.chat.ComponentSerializer.toString(components)); // Paper - comment, replaced with below // Paper start - don't nest if we don't need to so that we can preserve formatting if (this.components.length == 1) { diff --git a/Spigot-Server-Patches/0336-Entity-getEntitySpawnReason.patch b/Spigot-Server-Patches/0337-Entity-getEntitySpawnReason.patch similarity index 94% rename from Spigot-Server-Patches/0336-Entity-getEntitySpawnReason.patch rename to Spigot-Server-Patches/0337-Entity-getEntitySpawnReason.patch index 3b0afdbca6..6c866f8c48 100644 --- a/Spigot-Server-Patches/0336-Entity-getEntitySpawnReason.patch +++ b/Spigot-Server-Patches/0337-Entity-getEntitySpawnReason.patch @@ -10,7 +10,7 @@ persistenting Living Entity, SPAWNER for spawners, or DEFAULT since data was not stored. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 00c57501f80fd0988573b36cd7e75a343c7e8e6e..1dbeda9fb385be29b3bb20c33a0487334c6e7c16 100644 +index 8827ccfc77284020496046e755b3639de75c5903..3ba1ca223f689960c637245e1873a4aaa8672a22 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -72,6 +72,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -71,7 +71,7 @@ index 1aecc84479b00a019a5b68f5e726d1c2965ae0f7..c3a5db97fd85b31c6b4bce93527b9d0e // Spigot Start if (org.bukkit.craftbukkit.event.CraftEventFactory.callSpawnerSpawnEvent(entity, blockposition).isCancelled()) { diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index b6e8cd15fe2893ecde4c227f4fc28fcd07600f7c..625a2b2d0c71c40fa44429b00f0391aac7bce277 100644 +index 7e8178421c43fa3f555b1a30aa15512ab5b3b403..b09b3c34eb77df164cbc87f2383dd8dd5517f33d 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -262,7 +262,7 @@ public abstract class PlayerList { @@ -96,10 +96,10 @@ index f047f07e768b77feb469c69166f36a3f6779f561..41d466bcd676e6988c4f754d0232d3ad if (entity.valid) { MinecraftServer.LOGGER.error("Attempted Double World add on " + entity, new Throwable()); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index 018eea17881feeb6583a5b1ae2ab0795e962095b..e2d4aa9ba7fa007b3d93a166c5fb57c8a90387ed 100644 +index 8eff62bcdc424cd8c040fd95124d11009f27a0d6..1b722b5598043378c3a94856fa00a8bdf2b64718 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -@@ -1093,5 +1093,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { +@@ -1107,5 +1107,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { public boolean fromMobSpawner() { return getHandle().spawnedViaMobSpawner; } diff --git a/Spigot-Server-Patches/0337-Update-entity-Metadata-for-all-tracked-players.patch b/Spigot-Server-Patches/0338-Update-entity-Metadata-for-all-tracked-players.patch similarity index 93% rename from Spigot-Server-Patches/0337-Update-entity-Metadata-for-all-tracked-players.patch rename to Spigot-Server-Patches/0338-Update-entity-Metadata-for-all-tracked-players.patch index 23cdcef6d5..569d9d126f 100644 --- a/Spigot-Server-Patches/0337-Update-entity-Metadata-for-all-tracked-players.patch +++ b/Spigot-Server-Patches/0338-Update-entity-Metadata-for-all-tracked-players.patch @@ -22,10 +22,10 @@ index c346ca8ba30da401ea1a421e8ce6ed1d5b6e4c13..d89d53e9990918fb9863a7eed3111ef0 this.f.accept(packet); if (this.tracker instanceof EntityPlayer) { diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 800f6de16d5c0fe8fd0e8997e0f66fd494e2852f..1d630b6be698a9e23ceee81c30d3b4a8a1d6b1db 100644 +index 90618fa896fbcbfe6559f38aeddf2f9592670f00..3f50cebdb57dd5029a457c593ae17e2d2d56053a 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -2139,7 +2139,14 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -2142,7 +2142,14 @@ public class PlayerConnection implements PacketListenerPlayIn { if (event.isCancelled() || this.player.inventory.getItemInHand() == null || this.player.inventory.getItemInHand().getItem() != origItem) { // Refresh the current entity metadata diff --git a/Spigot-Server-Patches/0338-Implement-PlayerPostRespawnEvent.patch b/Spigot-Server-Patches/0339-Implement-PlayerPostRespawnEvent.patch similarity index 95% rename from Spigot-Server-Patches/0338-Implement-PlayerPostRespawnEvent.patch rename to Spigot-Server-Patches/0339-Implement-PlayerPostRespawnEvent.patch index d4940aaaec..dd0da17f95 100644 --- a/Spigot-Server-Patches/0338-Implement-PlayerPostRespawnEvent.patch +++ b/Spigot-Server-Patches/0339-Implement-PlayerPostRespawnEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Implement PlayerPostRespawnEvent diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 625a2b2d0c71c40fa44429b00f0391aac7bce277..a6aae6740c62f269e46db4a082fd983190deb290 100644 +index b09b3c34eb77df164cbc87f2383dd8dd5517f33d..46c7ad88af6f69347477ff96df5c522211d0a577 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -668,9 +668,14 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0339-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch b/Spigot-Server-Patches/0340-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch similarity index 100% rename from Spigot-Server-Patches/0339-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch rename to Spigot-Server-Patches/0340-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch diff --git a/Spigot-Server-Patches/0340-Server-Tick-Events.patch b/Spigot-Server-Patches/0341-Server-Tick-Events.patch similarity index 100% rename from Spigot-Server-Patches/0340-Server-Tick-Events.patch rename to Spigot-Server-Patches/0341-Server-Tick-Events.patch diff --git a/Spigot-Server-Patches/0341-PlayerDeathEvent-getItemsToKeep.patch b/Spigot-Server-Patches/0342-PlayerDeathEvent-getItemsToKeep.patch similarity index 92% rename from Spigot-Server-Patches/0341-PlayerDeathEvent-getItemsToKeep.patch rename to Spigot-Server-Patches/0342-PlayerDeathEvent-getItemsToKeep.patch index 42887391a3..20b160a825 100644 --- a/Spigot-Server-Patches/0341-PlayerDeathEvent-getItemsToKeep.patch +++ b/Spigot-Server-Patches/0342-PlayerDeathEvent-getItemsToKeep.patch @@ -8,10 +8,10 @@ Exposes a mutable array on items a player should keep on death Example Usage: https://gist.github.com/aikar/5bb202de6057a051a950ce1f29feb0b4 diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 07fbda110ed1a4f0286fe6352dbe90d54ee680ec..d34cbba632c8847fe40cf68acf4ec204cde8c2bc 100644 +index b1835179de7789ee98da8daa1d96c2feefab7ff6..763edf6a18401f9f7a84ae99a7ee2eb114a5791c 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -564,6 +564,46 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -567,6 +567,46 @@ public class EntityPlayer extends EntityHuman implements ICrafting { }); } @@ -58,7 +58,7 @@ index 07fbda110ed1a4f0286fe6352dbe90d54ee680ec..d34cbba632c8847fe40cf68acf4ec204 @Override public void die(DamageSource damagesource) { boolean flag = this.world.getGameRules().getBoolean(GameRules.SHOW_DEATH_MESSAGES); -@@ -653,7 +693,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -650,7 +690,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting { this.dropExperience(); // we clean the player's inventory after the EntityDeathEvent is called so plugins can get the exact state of the inventory. if (!event.getKeepInventory()) { diff --git a/Spigot-Server-Patches/0342-Optimize-Captured-TileEntity-Lookup.patch b/Spigot-Server-Patches/0343-Optimize-Captured-TileEntity-Lookup.patch similarity index 89% rename from Spigot-Server-Patches/0342-Optimize-Captured-TileEntity-Lookup.patch rename to Spigot-Server-Patches/0343-Optimize-Captured-TileEntity-Lookup.patch index 371675d5a9..146aefbed0 100644 --- a/Spigot-Server-Patches/0342-Optimize-Captured-TileEntity-Lookup.patch +++ b/Spigot-Server-Patches/0343-Optimize-Captured-TileEntity-Lookup.patch @@ -10,10 +10,10 @@ Optimize to check if the captured list even has values in it, and also to just do a get call since the value can never be null. diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 6c0e179f4a6c14cf0cedc5a57e959d13a40ca42b..4c36abfa48b7f4fee2d118ff1d218f8ee5fbe007 100644 +index 89bb995909882a4b35e2d07e5a47739c1d4f46f2..f96ddcba26155bf179489b9d856305b90d1ae014 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -908,12 +908,13 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -909,12 +909,13 @@ public abstract class World implements GeneratorAccess, AutoCloseable { return null; } else { // CraftBukkit start diff --git a/Spigot-Server-Patches/0343-Add-Heightmap-API.patch b/Spigot-Server-Patches/0344-Add-Heightmap-API.patch similarity index 93% rename from Spigot-Server-Patches/0343-Add-Heightmap-API.patch rename to Spigot-Server-Patches/0344-Add-Heightmap-API.patch index 2e62d3917b..c9a651a4cf 100644 --- a/Spigot-Server-Patches/0343-Add-Heightmap-API.patch +++ b/Spigot-Server-Patches/0344-Add-Heightmap-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add Heightmap API diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 4c36abfa48b7f4fee2d118ff1d218f8ee5fbe007..342374450382fea241659f5b63a9cc9a17dcb7b8 100644 +index f96ddcba26155bf179489b9d856305b90d1ae014..66aeb56325a5dab4ffe4879bf9c4a7414a184397 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -610,8 +610,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable { @@ -20,7 +20,7 @@ index 4c36abfa48b7f4fee2d118ff1d218f8ee5fbe007..342374450382fea241659f5b63a9cc9a if (i >= -30000000 && j >= -30000000 && i < 30000000 && j < 30000000) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 46a7e7b2f6079df036d2b73c82d7bf5ea1b07871..a682f6e66fd4ecfad1d61dd9a9c9ef657dc76348 100644 +index 7e08032c968bb8405591082193b03badbe872436..e59a86d18de8ea1eff6afca6fed088df74ce5f2c 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -342,6 +342,29 @@ public class CraftWorld implements World { diff --git a/Spigot-Server-Patches/0344-Mob-Spawner-API-Enhancements.patch b/Spigot-Server-Patches/0345-Mob-Spawner-API-Enhancements.patch similarity index 100% rename from Spigot-Server-Patches/0344-Mob-Spawner-API-Enhancements.patch rename to Spigot-Server-Patches/0345-Mob-Spawner-API-Enhancements.patch diff --git a/Spigot-Server-Patches/0345-Per-Player-View-Distance-API-placeholders.patch b/Spigot-Server-Patches/0346-Per-Player-View-Distance-API-placeholders.patch similarity index 96% rename from Spigot-Server-Patches/0345-Per-Player-View-Distance-API-placeholders.patch rename to Spigot-Server-Patches/0346-Per-Player-View-Distance-API-placeholders.patch index 6b44d4dbd6..8896a2c26e 100644 --- a/Spigot-Server-Patches/0345-Per-Player-View-Distance-API-placeholders.patch +++ b/Spigot-Server-Patches/0346-Per-Player-View-Distance-API-placeholders.patch @@ -40,10 +40,10 @@ index ad5a7cbe83fb61b79203369895e82edca2ffcb72..06cf8ca80c314b7c236984c7f6236533 double deltaZ = this.locZ() - player.locZ(); double distanceSquared = deltaX * deltaX + deltaZ * deltaZ; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index fdedd4de5a6538460a4c1124bfe45ceae6f2c809..687df7dd3ac33d8f331ae141782859b80b08a6ff 100644 +index 1b5b41cde053de63095099cb1018d429c3fbae75..655a8e18ad84b0a1f62cb0f4f740740886fb8cb7 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -2046,6 +2046,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2251,6 +2251,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { super.remove(); } } diff --git a/Spigot-Server-Patches/0346-Fix-CB-call-to-changed-postToMainThread-method.patch b/Spigot-Server-Patches/0347-Fix-CB-call-to-changed-postToMainThread-method.patch similarity index 90% rename from Spigot-Server-Patches/0346-Fix-CB-call-to-changed-postToMainThread-method.patch rename to Spigot-Server-Patches/0347-Fix-CB-call-to-changed-postToMainThread-method.patch index 32062259af..911354cca4 100644 --- a/Spigot-Server-Patches/0346-Fix-CB-call-to-changed-postToMainThread-method.patch +++ b/Spigot-Server-Patches/0347-Fix-CB-call-to-changed-postToMainThread-method.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix CB call to changed postToMainThread method diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 1d630b6be698a9e23ceee81c30d3b4a8a1d6b1db..ee8ea27e0878042d15e81ce02c250a9999723928 100644 +index 3f50cebdb57dd5029a457c593ae17e2d2d56053a..38d81c42a82bf1208ec727d7c6c0cfac7ae5cd2e 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -295,7 +295,7 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0347-Fix-sounds-when-item-frames-are-modified-MC-123450.patch b/Spigot-Server-Patches/0348-Fix-sounds-when-item-frames-are-modified-MC-123450.patch similarity index 100% rename from Spigot-Server-Patches/0347-Fix-sounds-when-item-frames-are-modified-MC-123450.patch rename to Spigot-Server-Patches/0348-Fix-sounds-when-item-frames-are-modified-MC-123450.patch diff --git a/Spigot-Server-Patches/0348-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch b/Spigot-Server-Patches/0349-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch similarity index 92% rename from Spigot-Server-Patches/0348-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch rename to Spigot-Server-Patches/0349-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch index e5b7a9d690..68da9cb0e1 100644 --- a/Spigot-Server-Patches/0348-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch +++ b/Spigot-Server-Patches/0349-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch @@ -29,10 +29,10 @@ index c4f1fa6bd54a1928d163d83807f2823029db54e6..83a0dc052683ad2de6843d49d2e2a861 public boolean isDebugging() { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index c04722999aac8cf4f38765312edf47444b90f91b..9e059fe1befff6ab1f0f04d824e524c33397cb62 100644 +index 53c26b5353e1114a63451af1a466978b094cf2dd..1b420307af7c7c6764a93dd659d045f36e6ba3d9 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1792,7 +1792,7 @@ public final class CraftServer implements Server { +@@ -1835,7 +1835,7 @@ public final class CraftServer implements Server { @Override public boolean isPrimaryThread() { @@ -40,4 +40,4 @@ index c04722999aac8cf4f38765312edf47444b90f91b..9e059fe1befff6ab1f0f04d824e524c3 + return Thread.currentThread().equals(console.serverThread); // Paper - Fix issues with detecting main thread properly } - @Override + // Paper start diff --git a/Spigot-Server-Patches/0349-Fix-issues-with-entity-loss-due-to-unloaded-chunks.patch b/Spigot-Server-Patches/0350-Fix-issues-with-entity-loss-due-to-unloaded-chunks.patch similarity index 100% rename from Spigot-Server-Patches/0349-Fix-issues-with-entity-loss-due-to-unloaded-chunks.patch rename to Spigot-Server-Patches/0350-Fix-issues-with-entity-loss-due-to-unloaded-chunks.patch diff --git a/Spigot-Server-Patches/0350-Duplicate-UUID-Resolve-Option.patch b/Spigot-Server-Patches/0351-Duplicate-UUID-Resolve-Option.patch similarity index 97% rename from Spigot-Server-Patches/0350-Duplicate-UUID-Resolve-Option.patch rename to Spigot-Server-Patches/0351-Duplicate-UUID-Resolve-Option.patch index ea48528009..7ebc5281fd 100644 --- a/Spigot-Server-Patches/0350-Duplicate-UUID-Resolve-Option.patch +++ b/Spigot-Server-Patches/0351-Duplicate-UUID-Resolve-Option.patch @@ -81,10 +81,10 @@ index fbf3ccfb347a5ba6e895339e9576629d940d1aa4..38d25a12c6a52d8a83214e2a0f43a218 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 3cb1ee261724e34a23c4a0f98673da1597786a01..b258d4a85c41c2de55a28c565766f57c3f1604ff 100644 +index a35cd4df85f0043b83f2f70cec6091d6bae89767..714ef2a305fe98895ab5eb9190826bafbb157f59 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -504,6 +504,7 @@ public class Chunk implements IChunkAccess { +@@ -503,6 +503,7 @@ public class Chunk implements IChunkAccess { if (i != this.loc.x || j != this.loc.z) { Chunk.LOGGER.warn("Wrong location! ({}, {}) should be ({}, {}), {}", i, j, this.loc.x, this.loc.z, entity); entity.dead = true; @@ -93,7 +93,7 @@ index 3cb1ee261724e34a23c4a0f98673da1597786a01..b258d4a85c41c2de55a28c565766f57c int k = MathHelper.floor(entity.locY() / 16.0D); diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 1dbeda9fb385be29b3bb20c33a0487334c6e7c16..595adbeb253529720e72f695667d5bf9584ebaf0 100644 +index 3ba1ca223f689960c637245e1873a4aaa8672a22..e8e6e3ed5fa5aed6160e667142a244a39078c479 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -2711,6 +2711,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/0351-improve-CraftWorld-isChunkLoaded.patch b/Spigot-Server-Patches/0352-improve-CraftWorld-isChunkLoaded.patch similarity index 94% rename from Spigot-Server-Patches/0351-improve-CraftWorld-isChunkLoaded.patch rename to Spigot-Server-Patches/0352-improve-CraftWorld-isChunkLoaded.patch index e6471b3fe1..916fe73ee0 100644 --- a/Spigot-Server-Patches/0351-improve-CraftWorld-isChunkLoaded.patch +++ b/Spigot-Server-Patches/0352-improve-CraftWorld-isChunkLoaded.patch @@ -9,7 +9,7 @@ waiting for the execution queue to get to our request; We can just query the chunk status and get a response now, vs having to wait diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index a682f6e66fd4ecfad1d61dd9a9c9ef657dc76348..af411ac8fb378f7ead19b4f82f9709680e321dfd 100644 +index e59a86d18de8ea1eff6afca6fed088df74ce5f2c..91eaa1964666607ec628d857ae4be8f94d2f89aa 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -413,13 +413,13 @@ public class CraftWorld implements World { diff --git a/Spigot-Server-Patches/0352-Configurable-Keep-Spawn-Loaded-range-per-world.patch b/Spigot-Server-Patches/0353-Configurable-Keep-Spawn-Loaded-range-per-world.patch similarity index 97% rename from Spigot-Server-Patches/0352-Configurable-Keep-Spawn-Loaded-range-per-world.patch rename to Spigot-Server-Patches/0353-Configurable-Keep-Spawn-Loaded-range-per-world.patch index 5060052491..f36510674d 100644 --- a/Spigot-Server-Patches/0352-Configurable-Keep-Spawn-Loaded-range-per-world.patch +++ b/Spigot-Server-Patches/0353-Configurable-Keep-Spawn-Loaded-range-per-world.patch @@ -117,10 +117,10 @@ index 3868572aed50c8bffd93727a139a3fbb8dc19688..ae77805f71c6c574d92f39c51b1e48f2 @Override public void a(ChunkCoordIntPair chunkcoordintpair) { diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 628d1a5555ec70571c0467900c884cc419cbab37..3a95b98b77171b4b18a1d939eb14953d24b903e0 100644 +index 33e30ed20c99ab237f86c9d8746041a5b046bd42..ffc048415e7321353644e3bb89cf89f9365f3644 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1563,12 +1563,88 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1552,12 +1552,88 @@ public class WorldServer extends World implements GeneratorAccessSeed { return ((PersistentIdCounts) this.getMinecraftServer().E().getWorldPersistentData().a(PersistentIdCounts::new, "idcounts")).a(); } @@ -213,10 +213,10 @@ index 628d1a5555ec70571c0467900c884cc419cbab37..3a95b98b77171b4b18a1d939eb14953d } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index af411ac8fb378f7ead19b4f82f9709680e321dfd..d1fa8ebc9137e0d4917dc6b933b21588257d343e 100644 +index 91eaa1964666607ec628d857ae4be8f94d2f89aa..3c44de754e2ee4668060dbf6140db8a20cfaec42 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1959,15 +1959,21 @@ public class CraftWorld implements World { +@@ -1954,15 +1954,21 @@ public class CraftWorld implements World { @Override public void setKeepSpawnInMemory(boolean keepLoaded) { diff --git a/Spigot-Server-Patches/0353-MC-114618-Fix-EntityAreaEffectCloud-from-going-negat.patch b/Spigot-Server-Patches/0354-MC-114618-Fix-EntityAreaEffectCloud-from-going-negat.patch similarity index 100% rename from Spigot-Server-Patches/0353-MC-114618-Fix-EntityAreaEffectCloud-from-going-negat.patch rename to Spigot-Server-Patches/0354-MC-114618-Fix-EntityAreaEffectCloud-from-going-negat.patch diff --git a/Spigot-Server-Patches/0354-ChunkMapDistance-CME.patch b/Spigot-Server-Patches/0355-ChunkMapDistance-CME.patch similarity index 96% rename from Spigot-Server-Patches/0354-ChunkMapDistance-CME.patch rename to Spigot-Server-Patches/0355-ChunkMapDistance-CME.patch index 69f09c8012..35844e4919 100644 --- a/Spigot-Server-Patches/0354-ChunkMapDistance-CME.patch +++ b/Spigot-Server-Patches/0355-ChunkMapDistance-CME.patch @@ -5,7 +5,7 @@ Subject: [PATCH] ChunkMapDistance CME diff --git a/src/main/java/net/minecraft/server/ChunkMapDistance.java b/src/main/java/net/minecraft/server/ChunkMapDistance.java -index 3d359b6dcea28135105cf0b9c06c65797cf537bf..706ef10959df897a4b1889c2e2e7ff41ed924876 100644 +index cf68c9105084d1823b5fc76b3f472a0f8ecd9568..d15bf949671c9a533573278d573376282bfed8c8 100644 --- a/src/main/java/net/minecraft/server/ChunkMapDistance.java +++ b/src/main/java/net/minecraft/server/ChunkMapDistance.java @@ -33,7 +33,16 @@ public abstract class ChunkMapDistance { @@ -60,7 +60,7 @@ index 3d359b6dcea28135105cf0b9c06c65797cf537bf..706ef10959df897a4b1889c2e2e7ff41 return true; } else { if (!this.l.isEmpty()) { -@@ -367,7 +364,7 @@ public abstract class ChunkMapDistance { +@@ -366,7 +363,7 @@ public abstract class ChunkMapDistance { ObjectIterator objectiterator = this.a.long2ByteEntrySet().iterator(); while (objectiterator.hasNext()) { diff --git a/Spigot-Server-Patches/0355-Implement-CraftBlockSoundGroup.patch b/Spigot-Server-Patches/0356-Implement-CraftBlockSoundGroup.patch similarity index 100% rename from Spigot-Server-Patches/0355-Implement-CraftBlockSoundGroup.patch rename to Spigot-Server-Patches/0356-Implement-CraftBlockSoundGroup.patch diff --git a/Spigot-Server-Patches/0356-Chunk-debug-command.patch b/Spigot-Server-Patches/0357-Chunk-debug-command.patch similarity index 100% rename from Spigot-Server-Patches/0356-Chunk-debug-command.patch rename to Spigot-Server-Patches/0357-Chunk-debug-command.patch diff --git a/Spigot-Server-Patches/0357-Catch-exceptions-from-dispenser-entity-spawns.patch b/Spigot-Server-Patches/0358-Catch-exceptions-from-dispenser-entity-spawns.patch similarity index 100% rename from Spigot-Server-Patches/0357-Catch-exceptions-from-dispenser-entity-spawns.patch rename to Spigot-Server-Patches/0358-Catch-exceptions-from-dispenser-entity-spawns.patch diff --git a/Spigot-Server-Patches/0358-Fix-World-isChunkGenerated-calls.patch b/Spigot-Server-Patches/0359-Fix-World-isChunkGenerated-calls.patch similarity index 97% rename from Spigot-Server-Patches/0358-Fix-World-isChunkGenerated-calls.patch rename to Spigot-Server-Patches/0359-Fix-World-isChunkGenerated-calls.patch index 868f93ca02..40602ff652 100644 --- a/Spigot-Server-Patches/0358-Fix-World-isChunkGenerated-calls.patch +++ b/Spigot-Server-Patches/0359-Fix-World-isChunkGenerated-calls.patch @@ -8,7 +8,7 @@ This patch also adds a chunk status cache on region files (note that its only purpose is to cache the status on DISK) diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index af597b8b3157ac76456f8575a8f85a48fb0f45cd..d340990000144d9500069824e7e6609400a54ece 100644 +index 534bcc215b0efb8561f7489f01fe49d34cba4c4f..c4909536af2af2949a6e7ee8f72f39a6622911f5 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -30,7 +30,7 @@ public class ChunkProviderServer extends IChunkProvider { @@ -20,7 +20,7 @@ index af597b8b3157ac76456f8575a8f85a48fb0f45cd..d340990000144d9500069824e7e66094 public final PlayerChunkMap playerChunkMap; private final WorldPersistentData worldPersistentData; private long lastTickTime; -@@ -295,6 +295,21 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -287,6 +287,21 @@ public class ChunkProviderServer extends IChunkProvider { return ret; } @@ -108,10 +108,10 @@ index 2fde0b6ca8f38a998ac73b68be61fbfea9088cee..fa03834dacacf7ae6a326c88007256a2 @Nullable private PersistentStructureLegacy c; diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java -index b7af53dbf3139d7d51069e11388b945785cb47f6..2d749c07b159604e1ab904e026adf326eb9a732e 100644 +index 2c73bc1151d5d87ce6eac3f778ebff9c555b0212..346bf40bbf3026d3bf5585f06f42eec6cae95704 100644 --- a/src/main/java/net/minecraft/server/PlayerChunk.java +++ b/src/main/java/net/minecraft/server/PlayerChunk.java -@@ -117,6 +117,19 @@ public class PlayerChunk { +@@ -113,6 +113,19 @@ public class PlayerChunk { Either either = (Either) statusFuture.getNow(null); return either == null ? null : (Chunk) either.left().orElse(null); } @@ -277,7 +277,7 @@ index de926992e20da3ec433f9c7b4bc73805fd9d36ab..7a15944926427eb6cad976daabe5e710 } catch (Throwable throwable1) { throwable = throwable1; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index d1fa8ebc9137e0d4917dc6b933b21588257d343e..32c4b0089bc4ab1351e74e04b4e07c79beb9e328 100644 +index 3c44de754e2ee4668060dbf6140db8a20cfaec42..7603250799196c04c61e76418c747b8ac86a8bf7 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -19,6 +19,7 @@ import java.util.Objects; diff --git a/Spigot-Server-Patches/0359-Show-blockstate-location-if-we-failed-to-read-it.patch b/Spigot-Server-Patches/0360-Show-blockstate-location-if-we-failed-to-read-it.patch similarity index 94% rename from Spigot-Server-Patches/0359-Show-blockstate-location-if-we-failed-to-read-it.patch rename to Spigot-Server-Patches/0360-Show-blockstate-location-if-we-failed-to-read-it.patch index 7f4c940352..bdabcc0cc8 100644 --- a/Spigot-Server-Patches/0359-Show-blockstate-location-if-we-failed-to-read-it.patch +++ b/Spigot-Server-Patches/0360-Show-blockstate-location-if-we-failed-to-read-it.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Show blockstate location if we failed to read it diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java -index cca1c2ca5c1fe91fda30ace6f06a343b7850842e..c5a9eb553068209e0e8ad0a1e5c93bcfa1e957e3 100644 +index feeae1a9eb309ae4101783b191bb2bffe9aeb7d3..6e9eff2c29528b857cf758e9e45606c8a1c1cc8d 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java @@ -19,6 +19,8 @@ public class CraftBlockEntityState extends CraftBlockState diff --git a/Spigot-Server-Patches/0360-Synchronize-DataPaletteBlock-instead-of-ReentrantLoc.patch b/Spigot-Server-Patches/0361-Synchronize-DataPaletteBlock-instead-of-ReentrantLoc.patch similarity index 100% rename from Spigot-Server-Patches/0360-Synchronize-DataPaletteBlock-instead-of-ReentrantLoc.patch rename to Spigot-Server-Patches/0361-Synchronize-DataPaletteBlock-instead-of-ReentrantLoc.patch diff --git a/Spigot-Server-Patches/0361-incremental-chunk-saving.patch b/Spigot-Server-Patches/0362-incremental-chunk-saving.patch similarity index 96% rename from Spigot-Server-Patches/0361-incremental-chunk-saving.patch rename to Spigot-Server-Patches/0362-incremental-chunk-saving.patch index d98826c858..2d0104733d 100644 --- a/Spigot-Server-Patches/0361-incremental-chunk-saving.patch +++ b/Spigot-Server-Patches/0362-incremental-chunk-saving.patch @@ -29,7 +29,7 @@ index ffe9b1a63d78925e1d77b9e730aef42fed6d58fa..1278d09f70c1e97607ef20d87a178dc2 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index b258d4a85c41c2de55a28c565766f57c3f1604ff..fa549cd2ab9d0665dc042f3d4e79e205eaf4da54 100644 +index 714ef2a305fe98895ab5eb9190826bafbb157f59..6b561332e89476dbecc0b2a044e8556c7fa70626 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -43,7 +43,7 @@ public class Chunk implements IChunkAccess { @@ -42,10 +42,10 @@ index b258d4a85c41c2de55a28c565766f57c3f1604ff..fa549cd2ab9d0665dc042f3d4e79e205 private long inhabitedTime; @Nullable diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index d340990000144d9500069824e7e6609400a54ece..71c7bf2fd4fdb0ad880ca81c198a7cf25cdb9e87 100644 +index c4909536af2af2949a6e7ee8f72f39a6622911f5..bd48c23890c1b28e9838612598a5e4bdcb83e8a0 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -535,6 +535,15 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -527,6 +527,15 @@ public class ChunkProviderServer extends IChunkProvider { } // Paper - Timings } @@ -104,7 +104,7 @@ index 816ab7ac0485f3eb80d461711800e84129f50d64..cb551b24a103ff81459483d610509488 this.methodProfiler.enter("snooper"); if (((DedicatedServer) this).getDedicatedServerProperties().snooperEnabled && !this.snooper.d() && this.ticks > 100) { // Spigot diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java -index 2d749c07b159604e1ab904e026adf326eb9a732e..ad01b9333e73c8e4a7c848edc4ce252a51ea52b6 100644 +index 346bf40bbf3026d3bf5585f06f42eec6cae95704..5d736e4ca6098d97b6c16d2452066fbd35fe123c 100644 --- a/src/main/java/net/minecraft/server/PlayerChunk.java +++ b/src/main/java/net/minecraft/server/PlayerChunk.java @@ -42,6 +42,9 @@ public class PlayerChunk { @@ -117,7 +117,7 @@ index 2d749c07b159604e1ab904e026adf326eb9a732e..ad01b9333e73c8e4a7c848edc4ce252a public PlayerChunk(ChunkCoordIntPair chunkcoordintpair, int i, LightEngine lightengine, PlayerChunk.c playerchunk_c, PlayerChunk.d playerchunk_d) { this.statusFutures = new AtomicReferenceArray(PlayerChunk.CHUNK_STATUSES.size()); this.fullChunkFuture = PlayerChunk.UNLOADED_CHUNK_FUTURE; -@@ -397,7 +400,19 @@ public class PlayerChunk { +@@ -393,7 +396,19 @@ public class PlayerChunk { boolean flag2 = playerchunk_state.isAtLeast(PlayerChunk.State.BORDER); boolean flag3 = playerchunk_state1.isAtLeast(PlayerChunk.State.BORDER); @@ -137,7 +137,7 @@ index 2d749c07b159604e1ab904e026adf326eb9a732e..ad01b9333e73c8e4a7c848edc4ce252a if (!flag2 && flag3) { // Paper start - cache ticking ready status int expectCreateCount = ++this.fullChunkCreateCount; -@@ -517,8 +532,32 @@ public class PlayerChunk { +@@ -513,8 +528,32 @@ public class PlayerChunk { } public void m() { @@ -265,7 +265,7 @@ index d8bedba819fa9ee0a4d3bdfbf0b010da7144dd68..c4ed4d58f7b344626acb13baeb142889 return PlayerChunk.getChunkState(playerchunk.getTicketLevel()); }); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 3a95b98b77171b4b18a1d939eb14953d24b903e0..3f97befa2742a575b103b68b19fc6415bfbd8c04 100644 +index ffc048415e7321353644e3bb89cf89f9365f3644..d43fe3564be139a935303a62047a8d74fd3b8d1f 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -776,11 +776,43 @@ public class WorldServer extends World implements GeneratorAccessSeed { diff --git a/Spigot-Server-Patches/0362-Anti-Xray.patch b/Spigot-Server-Patches/0363-Anti-Xray.patch similarity index 99% rename from Spigot-Server-Patches/0362-Anti-Xray.patch rename to Spigot-Server-Patches/0363-Anti-Xray.patch index 36ec121a47..6684bb52c7 100644 --- a/Spigot-Server-Patches/0362-Anti-Xray.patch +++ b/Spigot-Server-Patches/0363-Anti-Xray.patch @@ -1007,7 +1007,7 @@ index 0000000000000000000000000000000000000000..333763936897befda5bb6c077944d266 + } +} diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index fa549cd2ab9d0665dc042f3d4e79e205eaf4da54..6763ecaf5f814302c310f29e3a5a42fc1312a990 100644 +index 6b561332e89476dbecc0b2a044e8556c7fa70626..68a6e8e3425291eb28f1759ecdd54eb80612f3a4 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -427,7 +427,7 @@ public class Chunk implements IChunkAccess { @@ -1422,7 +1422,7 @@ index 420bf7116def909d3dd7dc9a799723446ddf8f7f..300cbb8b01d94e7eb0cded0c8e118103 } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 342374450382fea241659f5b63a9cc9a17dcb7b8..16bc226dfef36b5f96d95f2de4c6bc2e6e606332 100644 +index 66aeb56325a5dab4ffe4879bf9c4a7414a184397..5bb9cd2a9b00e908af700fa44944b2dd218b9653 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -2,6 +2,8 @@ package net.minecraft.server; diff --git a/Spigot-Server-Patches/0363-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch b/Spigot-Server-Patches/0364-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch similarity index 100% rename from Spigot-Server-Patches/0363-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch rename to Spigot-Server-Patches/0364-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch diff --git a/Spigot-Server-Patches/0364-Configurable-projectile-relative-velocity.patch b/Spigot-Server-Patches/0365-Configurable-projectile-relative-velocity.patch similarity index 100% rename from Spigot-Server-Patches/0364-Configurable-projectile-relative-velocity.patch rename to Spigot-Server-Patches/0365-Configurable-projectile-relative-velocity.patch diff --git a/Spigot-Server-Patches/0365-Mark-entities-as-being-ticked-when-notifying-navigat.patch b/Spigot-Server-Patches/0366-Mark-entities-as-being-ticked-when-notifying-navigat.patch similarity index 86% rename from Spigot-Server-Patches/0365-Mark-entities-as-being-ticked-when-notifying-navigat.patch rename to Spigot-Server-Patches/0366-Mark-entities-as-being-ticked-when-notifying-navigat.patch index 1309794f71..8b8044209c 100644 --- a/Spigot-Server-Patches/0365-Mark-entities-as-being-ticked-when-notifying-navigat.patch +++ b/Spigot-Server-Patches/0366-Mark-entities-as-being-ticked-when-notifying-navigat.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Mark entities as being ticked when notifying navigation diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 5ce589e38f924c1a60597589ea12d15dbc2a479c..6f9c3f913b2afbde3b5e285ffb9ee49017fa5464 100644 +index b3af14ed0364e1b2e68656884dff678309498f03..a468398008c176c67ead844e21b0dbf6cc4a9bf7 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -1364,6 +1364,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -16,7 +16,7 @@ index 5ce589e38f924c1a60597589ea12d15dbc2a479c..6f9c3f913b2afbde3b5e285ffb9ee490 Iterator iterator = this.navigators.iterator(); while (iterator.hasNext()) { -@@ -1385,6 +1386,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1374,6 +1375,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { } } diff --git a/Spigot-Server-Patches/0366-offset-item-frame-ticking.patch b/Spigot-Server-Patches/0367-offset-item-frame-ticking.patch similarity index 100% rename from Spigot-Server-Patches/0366-offset-item-frame-ticking.patch rename to Spigot-Server-Patches/0367-offset-item-frame-ticking.patch diff --git a/Spigot-Server-Patches/0367-Avoid-hopper-searches-if-there-are-no-items.patch b/Spigot-Server-Patches/0368-Avoid-hopper-searches-if-there-are-no-items.patch similarity index 93% rename from Spigot-Server-Patches/0367-Avoid-hopper-searches-if-there-are-no-items.patch rename to Spigot-Server-Patches/0368-Avoid-hopper-searches-if-there-are-no-items.patch index c8c1bfae8b..ec836b8e81 100644 --- a/Spigot-Server-Patches/0367-Avoid-hopper-searches-if-there-are-no-items.patch +++ b/Spigot-Server-Patches/0368-Avoid-hopper-searches-if-there-are-no-items.patch @@ -14,7 +14,7 @@ And since minecart hoppers are used _very_ rarely near we can avoid alot of sear Combined, this adds up a lot. diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 6763ecaf5f814302c310f29e3a5a42fc1312a990..0601e9cdeb33dec82642ee9fbfaac1712bd0fae9 100644 +index 68a6e8e3425291eb28f1759ecdd54eb80612f3a4..08d122f7f20e3c2cdfeababb41b0a8910760b80b 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -85,6 +85,10 @@ public class Chunk implements IChunkAccess { @@ -28,7 +28,7 @@ index 6763ecaf5f814302c310f29e3a5a42fc1312a990..0601e9cdeb33dec82642ee9fbfaac171 // Paper end public Chunk(World world, ChunkCoordIntPair chunkcoordintpair, BiomeStorage biomestorage, ChunkConverter chunkconverter, TickList ticklist, TickList ticklist1, long i, @Nullable ChunkSection[] achunksection, @Nullable Consumer consumer) { -@@ -544,6 +548,13 @@ public class Chunk implements IChunkAccess { +@@ -543,6 +547,13 @@ public class Chunk implements IChunkAccess { entity.chunkZ = this.loc.z; this.entities.add(entity); // Paper - per chunk entity list this.entitySlices[k].add(entity); @@ -42,7 +42,7 @@ index 6763ecaf5f814302c310f29e3a5a42fc1312a990..0601e9cdeb33dec82642ee9fbfaac171 entity.entitySlice = this.entitySlices[k]; // Paper this.markDirty(); // Paper } -@@ -577,6 +588,11 @@ public class Chunk implements IChunkAccess { +@@ -575,6 +586,11 @@ public class Chunk implements IChunkAccess { if (!this.entitySlices[i].remove(entity)) { return; } @@ -54,7 +54,7 @@ index 6763ecaf5f814302c310f29e3a5a42fc1312a990..0601e9cdeb33dec82642ee9fbfaac171 entityCounts.decrement(entity.getMinecraftKeyString()); this.markDirty(); // Paper // Paper end -@@ -862,6 +878,14 @@ public class Chunk implements IChunkAccess { +@@ -860,6 +876,14 @@ public class Chunk implements IChunkAccess { for (int k = i; k <= j; ++k) { Iterator iterator = this.entitySlices[k].iterator(); // Spigot @@ -69,7 +69,7 @@ index 6763ecaf5f814302c310f29e3a5a42fc1312a990..0601e9cdeb33dec82642ee9fbfaac171 while (iterator.hasNext()) { T entity = (T) iterator.next(); // CraftBukkit - decompile error if (entity.shouldBeRemoved) continue; // Paper -@@ -882,9 +906,29 @@ public class Chunk implements IChunkAccess { +@@ -880,9 +904,29 @@ public class Chunk implements IChunkAccess { i = MathHelper.clamp(i, 0, this.entitySlices.length - 1); j = MathHelper.clamp(j, 0, this.entitySlices.length - 1); diff --git a/Spigot-Server-Patches/0368-Asynchronous-chunk-IO-and-loading.patch b/Spigot-Server-Patches/0369-Asynchronous-chunk-IO-and-loading.patch similarity index 99% rename from Spigot-Server-Patches/0368-Asynchronous-chunk-IO-and-loading.patch rename to Spigot-Server-Patches/0369-Asynchronous-chunk-IO-and-loading.patch index ef38d20b25..bec85bd518 100644 --- a/Spigot-Server-Patches/0368-Asynchronous-chunk-IO-and-loading.patch +++ b/Spigot-Server-Patches/0369-Asynchronous-chunk-IO-and-loading.patch @@ -2308,10 +2308,10 @@ index 0000000000000000000000000000000000000000..49a594e5f345096cb3b9913b8ee27607 + +} diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 71c7bf2fd4fdb0ad880ca81c198a7cf25cdb9e87..03e59fd8dc339f3479243acb5d1c89883b280b68 100644 +index bd48c23890c1b28e9838612598a5e4bdcb83e8a0..77e17feb56cc28e763640b2e37f66788241e09b4 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -310,11 +310,138 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -302,11 +302,138 @@ public class ChunkProviderServer extends IChunkProvider { return playerChunk.getAvailableChunkNow(); } @@ -2450,7 +2450,7 @@ index 71c7bf2fd4fdb0ad880ca81c198a7cf25cdb9e87..03e59fd8dc339f3479243acb5d1c8988 if (Thread.currentThread() != this.serverThread) { return (IChunkAccess) CompletableFuture.supplyAsync(() -> { return this.getChunkAt(i, j, chunkstatus, flag); -@@ -337,11 +464,16 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -329,11 +456,16 @@ public class ChunkProviderServer extends IChunkProvider { } gameprofilerfiller.c("getChunkCacheMiss"); @@ -2468,7 +2468,7 @@ index 71c7bf2fd4fdb0ad880ca81c198a7cf25cdb9e87..03e59fd8dc339f3479243acb5d1c8988 this.world.timings.syncChunkLoad.stopTiming(); // Paper } // Paper ichunkaccess = (IChunkAccess) ((Either) completablefuture.join()).map((ichunkaccess1) -> { -@@ -407,6 +539,11 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -399,6 +531,11 @@ public class ChunkProviderServer extends IChunkProvider { } private CompletableFuture> getChunkFutureMainThread(int i, int j, ChunkStatus chunkstatus, boolean flag) { @@ -2480,7 +2480,7 @@ index 71c7bf2fd4fdb0ad880ca81c198a7cf25cdb9e87..03e59fd8dc339f3479243acb5d1c8988 ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(i, j); long k = chunkcoordintpair.pair(); int l = 33 + ChunkStatus.a(chunkstatus); -@@ -806,11 +943,12 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -798,11 +935,12 @@ public class ChunkProviderServer extends IChunkProvider { protected boolean executeNext() { // CraftBukkit start - process pending Chunk loadCallback() and unloadCallback() after each run task try { @@ -3010,10 +3010,10 @@ index 4c52c57c02571353f71772e3650932f314da62ca..71daa0cb08d69c16bded510d1a490534 @Override diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java -index ad01b9333e73c8e4a7c848edc4ce252a51ea52b6..25f8febe63167349460e32c831088bb80b6b77ad 100644 +index 5d736e4ca6098d97b6c16d2452066fbd35fe123c..a1341617ba5388d1d1f2c91ad158b0210b4505cb 100644 --- a/src/main/java/net/minecraft/server/PlayerChunk.java +++ b/src/main/java/net/minecraft/server/PlayerChunk.java -@@ -133,6 +133,18 @@ public class PlayerChunk { +@@ -129,6 +129,18 @@ public class PlayerChunk { } return null; } @@ -3032,7 +3032,7 @@ index ad01b9333e73c8e4a7c848edc4ce252a51ea52b6..25f8febe63167349460e32c831088bb8 // Paper end public CompletableFuture> getStatusFutureUnchecked(ChunkStatus chunkstatus) { -@@ -351,7 +363,7 @@ public class PlayerChunk { +@@ -347,7 +359,7 @@ public class PlayerChunk { ChunkStatus chunkstatus = getChunkStatus(this.oldTicketLevel); ChunkStatus chunkstatus1 = getChunkStatus(this.ticketLevel); boolean flag = this.oldTicketLevel <= PlayerChunkMap.GOLDEN_TICKET; @@ -3041,7 +3041,7 @@ index ad01b9333e73c8e4a7c848edc4ce252a51ea52b6..25f8febe63167349460e32c831088bb8 PlayerChunk.State playerchunk_state = getChunkState(this.oldTicketLevel); PlayerChunk.State playerchunk_state1 = getChunkState(this.ticketLevel); // CraftBukkit start -@@ -387,6 +399,12 @@ public class PlayerChunk { +@@ -383,6 +395,12 @@ public class PlayerChunk { } }); @@ -3505,7 +3505,7 @@ index 325532e1585beefe1cb341580e0bb3e95020b6fe..7f72d13bb39182666a741d4376921530 return this.m; } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index ee8ea27e0878042d15e81ce02c250a9999723928..412442e197fff0010e06ce2b604450b91e2a984e 100644 +index 38d81c42a82bf1208ec727d7c6c0cfac7ae5cd2e..ba1046999ec48ed49de52be4d7b6d9893033a8d5 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -580,6 +580,13 @@ public class PlayerConnection implements PacketListenerPlayIn { @@ -3910,7 +3910,7 @@ index d6aca683465c6898536507fab9e6888fef2e77e5..b926cebd053bef829517c9d9bbf1c609 HAS_SPACE(VillagePlaceRecord::d), IS_OCCUPIED(VillagePlaceRecord::e), ANY((villageplacerecord) -> { diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 6f9c3f913b2afbde3b5e285ffb9ee49017fa5464..85c9943a32f21e338daa295d5034af379edb8ddd 100644 +index a468398008c176c67ead844e21b0dbf6cc4a9bf7..f9d3e7a774f6621cb8608d3dfa8676c3d13a174f 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -98,6 +98,79 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -4002,7 +4002,7 @@ index 6f9c3f913b2afbde3b5e285ffb9ee49017fa5464..85c9943a32f21e338daa295d5034af37 } // CraftBukkit start -@@ -1632,7 +1707,10 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1621,7 +1696,10 @@ public class WorldServer extends World implements GeneratorAccessSeed { } MCUtil.getSpiralOutChunks(spawn, radiusInBlocks >> 4).forEach(pair -> { @@ -4015,7 +4015,7 @@ index 6f9c3f913b2afbde3b5e285ffb9ee49017fa5464..85c9943a32f21e338daa295d5034af37 } public void removeTicketsForSpawn(int radiusInBlocks, BlockPosition spawn) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 32c4b0089bc4ab1351e74e04b4e07c79beb9e328..83d1c748c0dd3004c4a479ca58f634d6a9b6faf4 100644 +index 7603250799196c04c61e76418c747b8ac86a8bf7..fdef41cd64f18e145b042d887ea7d382283576fd 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -75,6 +75,7 @@ import net.minecraft.server.IBlockData; @@ -4058,7 +4058,7 @@ index 32c4b0089bc4ab1351e74e04b4e07c79beb9e328..83d1c748c0dd3004c4a479ca58f634d6 // fall through to load // we do this so we do not re-read the chunk data on disk -@@ -2489,6 +2491,34 @@ public class CraftWorld implements World { +@@ -2484,6 +2486,34 @@ public class CraftWorld implements World { public DragonBattle getEnderDragonBattle() { return (getHandle().getDragonBattle() == null) ? null : new CraftDragonBattle(getHandle().getDragonBattle()); } @@ -4094,10 +4094,10 @@ index 32c4b0089bc4ab1351e74e04b4e07c79beb9e328..83d1c748c0dd3004c4a479ca58f634d6 // Spigot start @Override diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index e2d4aa9ba7fa007b3d93a166c5fb57c8a90387ed..666876943675a8c299b414f6b5ea359aac186961 100644 +index 1b722b5598043378c3a94856fa00a8bdf2b64718..017410819a628c1b373f45ac5a0e9f00dd56639e 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -@@ -508,6 +508,28 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { +@@ -509,6 +509,28 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { entity.setHeadRotation(yaw); } diff --git a/Spigot-Server-Patches/0369-Use-getChunkIfLoadedImmediately-in-places.patch b/Spigot-Server-Patches/0370-Use-getChunkIfLoadedImmediately-in-places.patch similarity index 91% rename from Spigot-Server-Patches/0369-Use-getChunkIfLoadedImmediately-in-places.patch rename to Spigot-Server-Patches/0370-Use-getChunkIfLoadedImmediately-in-places.patch index 3df9568497..62737182fc 100644 --- a/Spigot-Server-Patches/0369-Use-getChunkIfLoadedImmediately-in-places.patch +++ b/Spigot-Server-Patches/0370-Use-getChunkIfLoadedImmediately-in-places.patch @@ -8,7 +8,7 @@ ticket level 33 (yes getChunkIfLoaded will actually perform a chunk load in that case). diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 412442e197fff0010e06ce2b604450b91e2a984e..ca5860d69dc729c8e1c2c123471a0a615367f00d 100644 +index ba1046999ec48ed49de52be4d7b6d9893033a8d5..71b92f99f0148849acc733005aa90234e739f717 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -1094,7 +1094,7 @@ public class PlayerConnection implements PacketListenerPlayIn { @@ -21,7 +21,7 @@ index 412442e197fff0010e06ce2b604450b91e2a984e..ca5860d69dc729c8e1c2c123471a0a61 return; } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 16bc226dfef36b5f96d95f2de4c6bc2e6e606332..c922f4d5c3a5e7af7237361cb95a5ba8bb3ce715 100644 +index 5bb9cd2a9b00e908af700fa44944b2dd218b9653..e2ae32a2bbb02c81ba7bb8c2f75a51f4f61eb218 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -104,6 +104,13 @@ public abstract class World implements GeneratorAccess, AutoCloseable { @@ -38,7 +38,7 @@ index 16bc226dfef36b5f96d95f2de4c6bc2e6e606332..c922f4d5c3a5e7af7237361cb95a5ba8 public ResourceKey getTypeKey() { return typeKey; } -@@ -1002,14 +1009,14 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -1003,14 +1010,14 @@ public abstract class World implements GeneratorAccess, AutoCloseable { } public boolean p(BlockPosition blockposition) { @@ -55,7 +55,7 @@ index 16bc226dfef36b5f96d95f2de4c6bc2e6e606332..c922f4d5c3a5e7af7237361cb95a5ba8 return ichunkaccess == null ? false : ichunkaccess.getType(blockposition).a((IBlockAccess) this, blockposition, entity, enumdirection); } -@@ -1130,7 +1137,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -1131,7 +1138,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { for (int i1 = i; i1 < j; ++i1) { for (int j1 = k; j1 < l; ++j1) { @@ -78,10 +78,10 @@ index f9d3e7a774f6621cb8608d3dfa8676c3d13a174f..d3130ff85d90a8fb197c9917b6617438 // Paper start - Asynchronous IO diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java -index d44ef056bdab3bcff39aea45b40a4c7e9c62398f..797e579afdbc77a8dc5fc4cdf5874e546922fbfa 100644 +index 78f0fb5d97b077673ec542cd70bbc3ffa13f916c..b73af0a5fb2d08c2f3a52c699ef0d8ed34c83f77 100644 --- a/src/main/java/org/spigotmc/ActivationRange.java +++ b/src/main/java/org/spigotmc/ActivationRange.java -@@ -141,9 +141,10 @@ public class ActivationRange +@@ -143,9 +143,10 @@ public class ActivationRange { for ( int j1 = k; j1 <= l; ++j1 ) { diff --git a/Spigot-Server-Patches/0370-Reduce-sync-loads.patch b/Spigot-Server-Patches/0371-Reduce-sync-loads.patch similarity index 96% rename from Spigot-Server-Patches/0370-Reduce-sync-loads.patch rename to Spigot-Server-Patches/0371-Reduce-sync-loads.patch index 0b99c5b44b..4b3fae6c9a 100644 --- a/Spigot-Server-Patches/0370-Reduce-sync-loads.patch +++ b/Spigot-Server-Patches/0371-Reduce-sync-loads.patch @@ -286,10 +286,10 @@ index 0000000000000000000000000000000000000000..1a68a8012f83bab9e814159c76b8c371 + } +} diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 03e59fd8dc339f3479243acb5d1c89883b280b68..070c3a842ebd9fa03e5daaee8355775718df6fb2 100644 +index 77e17feb56cc28e763640b2e37f66788241e09b4..2eb38bfcdc0c232da9dad6921df503e5a11de09f 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -471,6 +471,7 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -463,6 +463,7 @@ public class ChunkProviderServer extends IChunkProvider { this.world.asyncChunkTaskManager.raisePriority(x, z, com.destroystokyo.paper.io.PrioritizedTaskQueue.HIGHEST_PRIORITY); com.destroystokyo.paper.io.chunk.ChunkTaskManager.pushChunkWait(this.world, x, z); // Paper end @@ -298,10 +298,10 @@ index 03e59fd8dc339f3479243acb5d1c89883b280b68..070c3a842ebd9fa03e5daaee83557757 this.serverThreadQueue.awaitTasks(completablefuture::isDone); com.destroystokyo.paper.io.chunk.ChunkTaskManager.popChunkWait(); // Paper - async chunk debug diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index c922f4d5c3a5e7af7237361cb95a5ba8bb3ce715..dcca5257a03b6fe32ffcd6528e505762b7b4a3e7 100644 +index e2ae32a2bbb02c81ba7bb8c2f75a51f4f61eb218..16e2f0e9580486337b8bc060d4b088bb1bf40581 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -1070,7 +1070,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -1071,7 +1071,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { for (int i1 = i; i1 <= j; ++i1) { for (int j1 = k; j1 <= l; ++j1) { @@ -310,7 +310,7 @@ index c922f4d5c3a5e7af7237361cb95a5ba8bb3ce715..dcca5257a03b6fe32ffcd6528e505762 if (chunk != null) { chunk.a(entity, axisalignedbb, list, predicate); -@@ -1091,7 +1091,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -1092,7 +1092,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { for (int i1 = i; i1 < j; ++i1) { for (int j1 = k; j1 < l; ++j1) { @@ -319,7 +319,7 @@ index c922f4d5c3a5e7af7237361cb95a5ba8bb3ce715..dcca5257a03b6fe32ffcd6528e505762 if (chunk != null) { chunk.a(entitytypes, axisalignedbb, list, predicate); -@@ -1114,7 +1114,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -1115,7 +1115,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { for (int i1 = i; i1 < j; ++i1) { for (int j1 = k; j1 < l; ++j1) { @@ -329,7 +329,7 @@ index c922f4d5c3a5e7af7237361cb95a5ba8bb3ce715..dcca5257a03b6fe32ffcd6528e505762 if (chunk != null) { chunk.a(oclass, axisalignedbb, list, predicate); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index f599d607afd73e30008e54757502077d783636a1..6646b8e83c8658fa6cd4838ccd669fd4a280e2e8 100644 +index d3130ff85d90a8fb197c9917b66174389659e3bf..0d8ef258422c0aaba31afbecf4bee6da7678259a 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -170,6 +170,12 @@ public class WorldServer extends World implements GeneratorAccessSeed { diff --git a/Spigot-Server-Patches/0371-Implement-alternative-item-despawn-rate.patch b/Spigot-Server-Patches/0372-Implement-alternative-item-despawn-rate.patch similarity index 100% rename from Spigot-Server-Patches/0371-Implement-alternative-item-despawn-rate.patch rename to Spigot-Server-Patches/0372-Implement-alternative-item-despawn-rate.patch diff --git a/Spigot-Server-Patches/0372-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch b/Spigot-Server-Patches/0373-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch similarity index 100% rename from Spigot-Server-Patches/0372-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch rename to Spigot-Server-Patches/0373-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch diff --git a/Spigot-Server-Patches/0373-Fix-MC-158900.patch b/Spigot-Server-Patches/0374-Fix-MC-158900.patch similarity index 94% rename from Spigot-Server-Patches/0373-Fix-MC-158900.patch rename to Spigot-Server-Patches/0374-Fix-MC-158900.patch index 523a7a23e6..734cd72cc4 100644 --- a/Spigot-Server-Patches/0373-Fix-MC-158900.patch +++ b/Spigot-Server-Patches/0374-Fix-MC-158900.patch @@ -7,7 +7,7 @@ The problem was we were checking isExpired() on the entry, but if it was expired at that point, then it would be null. diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index a6aae6740c62f269e46db4a082fd983190deb290..1d4bb2004d606ef7bf9fba3474f057b04b3354b5 100644 +index 46c7ad88af6f69347477ff96df5c522211d0a577..a1f71569a6a0d0b69a52092f72fef23c888e636c 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -534,8 +534,10 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0374-implement-optional-per-player-mob-spawns.patch b/Spigot-Server-Patches/0375-implement-optional-per-player-mob-spawns.patch similarity index 98% rename from Spigot-Server-Patches/0374-implement-optional-per-player-mob-spawns.patch rename to Spigot-Server-Patches/0375-implement-optional-per-player-mob-spawns.patch index 13afc3c458..7dca6f4a2f 100644 --- a/Spigot-Server-Patches/0374-implement-optional-per-player-mob-spawns.patch +++ b/Spigot-Server-Patches/0375-implement-optional-per-player-mob-spawns.patch @@ -545,10 +545,10 @@ index 0000000000000000000000000000000000000000..4f13d3ff8391793a99f067189f854078 + } +} diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 070c3a842ebd9fa03e5daaee8355775718df6fb2..1eb201695cd118616fb404a0c7ed8cedee77db89 100644 +index 2eb38bfcdc0c232da9dad6921df503e5a11de09f..2fad6a79ee977c2712c55433bde8eca524d09ba7 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -744,7 +744,22 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -736,7 +736,22 @@ public class ChunkProviderServer extends IChunkProvider { this.world.getMethodProfiler().enter("naturalSpawnCount"); this.world.timings.countNaturalMobs.startTiming(); // Paper - timings int l = this.chunkMapDistance.b(); @@ -573,10 +573,10 @@ index 070c3a842ebd9fa03e5daaee8355775718df6fb2..1eb201695cd118616fb404a0c7ed8ced this.p = spawnercreature_d; diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index d34cbba632c8847fe40cf68acf4ec204cde8c2bc..e14875420dda139799ceabdddde4ade9705b1d02 100644 +index 763edf6a18401f9f7a84ae99a7ee2eb114a5791c..bf68562b08b8d8fecb25a469b4fb4dbc868b0f28 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -90,6 +90,11 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -91,6 +91,11 @@ public class EntityPlayer extends EntityHuman implements ICrafting { public boolean queueHealthUpdatePacket = false; public net.minecraft.server.PacketPlayOutUpdateHealth queuedHealthUpdatePacket; // Paper end @@ -588,15 +588,15 @@ index d34cbba632c8847fe40cf68acf4ec204cde8c2bc..e14875420dda139799ceabdddde4ade9 // CraftBukkit start public String displayName; -@@ -126,6 +131,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { - this.displayName = this.getName(); +@@ -129,6 +134,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { + this.adventure$displayName = net.kyori.adventure.text.Component.text(this.getName()); // Paper this.canPickUpLoot = true; this.maxHealthCache = this.getMaxHealth(); + this.cachedSingleMobDistanceMap = new com.destroystokyo.paper.util.PooledHashSets.PooledObjectLinkedOpenHashSet<>(this); // Paper } // Yes, this doesn't match Vanilla, but it's the best we can do for now. -@@ -1922,6 +1928,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1924,6 +1930,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } diff --git a/Spigot-Server-Patches/0375-Prevent-consuming-the-wrong-itemstack.patch b/Spigot-Server-Patches/0376-Prevent-consuming-the-wrong-itemstack.patch similarity index 100% rename from Spigot-Server-Patches/0375-Prevent-consuming-the-wrong-itemstack.patch rename to Spigot-Server-Patches/0376-Prevent-consuming-the-wrong-itemstack.patch diff --git a/Spigot-Server-Patches/0376-Fix-nether-portal-creation.patch b/Spigot-Server-Patches/0377-Fix-nether-portal-creation.patch similarity index 100% rename from Spigot-Server-Patches/0376-Fix-nether-portal-creation.patch rename to Spigot-Server-Patches/0377-Fix-nether-portal-creation.patch diff --git a/Spigot-Server-Patches/0377-Generator-Settings.patch b/Spigot-Server-Patches/0378-Generator-Settings.patch similarity index 100% rename from Spigot-Server-Patches/0377-Generator-Settings.patch rename to Spigot-Server-Patches/0378-Generator-Settings.patch diff --git a/Spigot-Server-Patches/0378-Fix-MC-161754.patch b/Spigot-Server-Patches/0379-Fix-MC-161754.patch similarity index 100% rename from Spigot-Server-Patches/0378-Fix-MC-161754.patch rename to Spigot-Server-Patches/0379-Fix-MC-161754.patch diff --git a/Spigot-Server-Patches/0379-Performance-improvement-for-Chunk.getEntities.patch b/Spigot-Server-Patches/0380-Performance-improvement-for-Chunk.getEntities.patch similarity index 100% rename from Spigot-Server-Patches/0379-Performance-improvement-for-Chunk.getEntities.patch rename to Spigot-Server-Patches/0380-Performance-improvement-for-Chunk.getEntities.patch diff --git a/Spigot-Server-Patches/0380-Fix-spawning-of-hanging-entities-that-are-not-ItemFr.patch b/Spigot-Server-Patches/0381-Fix-spawning-of-hanging-entities-that-are-not-ItemFr.patch similarity index 90% rename from Spigot-Server-Patches/0380-Fix-spawning-of-hanging-entities-that-are-not-ItemFr.patch rename to Spigot-Server-Patches/0381-Fix-spawning-of-hanging-entities-that-are-not-ItemFr.patch index 732fa76568..19c1af4579 100644 --- a/Spigot-Server-Patches/0380-Fix-spawning-of-hanging-entities-that-are-not-ItemFr.patch +++ b/Spigot-Server-Patches/0381-Fix-spawning-of-hanging-entities-that-are-not-ItemFr.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Fix spawning of hanging entities that are not ItemFrames and diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 83d1c748c0dd3004c4a479ca58f634d6a9b6faf4..6ddfeea46997907f1dd666000c7cc2eb27cd4398 100644 +index fdef41cd64f18e145b042d887ea7d382283576fd..e612d6528e1e73e774c742e763cbd3e5c28b87db 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1880,7 +1880,12 @@ public class CraftWorld implements World { +@@ -1875,7 +1875,12 @@ public class CraftWorld implements World { height = 9; } diff --git a/Spigot-Server-Patches/0381-Expose-the-internal-current-tick.patch b/Spigot-Server-Patches/0382-Expose-the-internal-current-tick.patch similarity index 81% rename from Spigot-Server-Patches/0381-Expose-the-internal-current-tick.patch rename to Spigot-Server-Patches/0382-Expose-the-internal-current-tick.patch index 24d89ccd90..fdb5a1ddd4 100644 --- a/Spigot-Server-Patches/0381-Expose-the-internal-current-tick.patch +++ b/Spigot-Server-Patches/0382-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 9e059fe1befff6ab1f0f04d824e524c33397cb62..d5a2f6d9274c91d2fe58652b9d58246d06fc5a70 100644 +index 1b420307af7c7c6764a93dd659d045f36e6ba3d9..e0f4dc286893fcb37b75e0982a3d2b0d57953943 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2300,5 +2300,10 @@ public final class CraftServer implements Server { +@@ -2357,5 +2357,10 @@ public final class CraftServer implements Server { } return new com.destroystokyo.paper.profile.CraftPlayerProfile(uuid, name); } diff --git a/Spigot-Server-Patches/0382-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch b/Spigot-Server-Patches/0383-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch similarity index 85% rename from Spigot-Server-Patches/0382-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch rename to Spigot-Server-Patches/0383-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch index 6b8187389d..ba52bc60cc 100644 --- a/Spigot-Server-Patches/0382-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch +++ b/Spigot-Server-Patches/0383-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix stuck in sneak when changing worlds (MC-10657) diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index e14875420dda139799ceabdddde4ade9705b1d02..fe62dee53155cfaf9e1c44479911a32dbc584e32 100644 +index bf68562b08b8d8fecb25a469b4fb4dbc868b0f28..c71a2264438317d1d36ddf56813ccd1cabd32c79 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -947,6 +947,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -944,6 +944,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting { this.lastHealthSent = -1.0F; this.lastFoodSent = -1; @@ -18,7 +18,7 @@ index e14875420dda139799ceabdddde4ade9705b1d02..fe62dee53155cfaf9e1c44479911a32d PlayerChangedWorldEvent changeEvent = new PlayerChangedWorldEvent(this.getBukkitEntity(), worldserver1.getWorld()); this.world.getServer().getPluginManager().callEvent(changeEvent); diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 1d4bb2004d606ef7bf9fba3474f057b04b3354b5..da1f15c3b7af9bfafae43315f509290662576ba1 100644 +index a1f71569a6a0d0b69a52092f72fef23c888e636c..a02c51c25d698594281bbe317cd91a44aaf52ebc 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -773,6 +773,8 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0383-Add-option-to-disable-pillager-patrols.patch b/Spigot-Server-Patches/0384-Add-option-to-disable-pillager-patrols.patch similarity index 100% rename from Spigot-Server-Patches/0383-Add-option-to-disable-pillager-patrols.patch rename to Spigot-Server-Patches/0384-Add-option-to-disable-pillager-patrols.patch diff --git a/Spigot-Server-Patches/0384-Fix-AssertionError-when-player-hand-set-to-empty-typ.patch b/Spigot-Server-Patches/0385-Fix-AssertionError-when-player-hand-set-to-empty-typ.patch similarity index 95% rename from Spigot-Server-Patches/0384-Fix-AssertionError-when-player-hand-set-to-empty-typ.patch rename to Spigot-Server-Patches/0385-Fix-AssertionError-when-player-hand-set-to-empty-typ.patch index c2cd94446a..6e2e9cd01e 100644 --- a/Spigot-Server-Patches/0384-Fix-AssertionError-when-player-hand-set-to-empty-typ.patch +++ b/Spigot-Server-Patches/0385-Fix-AssertionError-when-player-hand-set-to-empty-typ.patch @@ -19,7 +19,7 @@ index 4567b0fe175765748bb787049e10fbe0af0a61d9..11a1fad5450ec94aeb4b135d7efc7271 if (enumhand == EnumHand.MAIN_HAND) { return this.getEquipment(EnumItemSlot.MAINHAND); diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index ca5860d69dc729c8e1c2c123471a0a615367f00d..d35cfd180bb1854d61b66d46ab4930d70f470ab0 100644 +index 71b92f99f0148849acc733005aa90234e739f717..a90b0caeaa2340ce78dbad773b257db0f108a4ed 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -1557,6 +1557,10 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0385-PlayerLaunchProjectileEvent.patch b/Spigot-Server-Patches/0386-PlayerLaunchProjectileEvent.patch similarity index 100% rename from Spigot-Server-Patches/0385-PlayerLaunchProjectileEvent.patch rename to Spigot-Server-Patches/0386-PlayerLaunchProjectileEvent.patch diff --git a/Spigot-Server-Patches/0386-Add-CraftMagicNumbers.isSupportedApiVersion.patch b/Spigot-Server-Patches/0387-Add-CraftMagicNumbers.isSupportedApiVersion.patch similarity index 100% rename from Spigot-Server-Patches/0386-Add-CraftMagicNumbers.isSupportedApiVersion.patch rename to Spigot-Server-Patches/0387-Add-CraftMagicNumbers.isSupportedApiVersion.patch diff --git a/Spigot-Server-Patches/0387-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch b/Spigot-Server-Patches/0388-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch similarity index 100% rename from Spigot-Server-Patches/0387-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch rename to Spigot-Server-Patches/0388-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch diff --git a/Spigot-Server-Patches/0388-MC-145656-Fix-Follow-Range-Initial-Target.patch b/Spigot-Server-Patches/0389-MC-145656-Fix-Follow-Range-Initial-Target.patch similarity index 100% rename from Spigot-Server-Patches/0388-MC-145656-Fix-Follow-Range-Initial-Target.patch rename to Spigot-Server-Patches/0389-MC-145656-Fix-Follow-Range-Initial-Target.patch diff --git a/Spigot-Server-Patches/0389-Optimize-Hoppers.patch b/Spigot-Server-Patches/0390-Optimize-Hoppers.patch similarity index 99% rename from Spigot-Server-Patches/0389-Optimize-Hoppers.patch rename to Spigot-Server-Patches/0390-Optimize-Hoppers.patch index d4f864b58e..a679c33d13 100644 --- a/Spigot-Server-Patches/0389-Optimize-Hoppers.patch +++ b/Spigot-Server-Patches/0390-Optimize-Hoppers.patch @@ -485,10 +485,10 @@ index d9be182a574daaedcc7a106c759c2bde2e4eb19a..c6df2318762dc6542e73f18ed9a3172e } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index dcca5257a03b6fe32ffcd6528e505762b7b4a3e7..1dca840322990c996ed6eac49792529f60058a6f 100644 +index 16e2f0e9580486337b8bc060d4b088bb1bf40581..2fa1cd43a8a7b083cd1522c32716d21dee922c46 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -1102,8 +1102,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -1103,8 +1103,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable { return list; } diff --git a/Spigot-Server-Patches/0390-PlayerDeathEvent-shouldDropExperience.patch b/Spigot-Server-Patches/0391-PlayerDeathEvent-shouldDropExperience.patch similarity index 84% rename from Spigot-Server-Patches/0390-PlayerDeathEvent-shouldDropExperience.patch rename to Spigot-Server-Patches/0391-PlayerDeathEvent-shouldDropExperience.patch index 464818ad50..c8df8361b5 100644 --- a/Spigot-Server-Patches/0390-PlayerDeathEvent-shouldDropExperience.patch +++ b/Spigot-Server-Patches/0391-PlayerDeathEvent-shouldDropExperience.patch @@ -5,10 +5,10 @@ Subject: [PATCH] PlayerDeathEvent#shouldDropExperience diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index fe62dee53155cfaf9e1c44479911a32dbc584e32..f82255227f3a9470737d381be8f7a22216dc8f27 100644 +index c71a2264438317d1d36ddf56813ccd1cabd32c79..f87cfd0de55808c6d93e2e80772c122cf7a279b8 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -696,7 +696,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -693,7 +693,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { this.eW(); } // SPIGOT-5478 must be called manually now diff --git a/Spigot-Server-Patches/0391-Prevent-bees-loading-chunks-checking-hive-position.patch b/Spigot-Server-Patches/0392-Prevent-bees-loading-chunks-checking-hive-position.patch similarity index 100% rename from Spigot-Server-Patches/0391-Prevent-bees-loading-chunks-checking-hive-position.patch rename to Spigot-Server-Patches/0392-Prevent-bees-loading-chunks-checking-hive-position.patch diff --git a/Spigot-Server-Patches/0392-Don-t-load-Chunks-from-Hoppers-and-other-things.patch b/Spigot-Server-Patches/0393-Don-t-load-Chunks-from-Hoppers-and-other-things.patch similarity index 100% rename from Spigot-Server-Patches/0392-Don-t-load-Chunks-from-Hoppers-and-other-things.patch rename to Spigot-Server-Patches/0393-Don-t-load-Chunks-from-Hoppers-and-other-things.patch diff --git a/Spigot-Server-Patches/0393-Guard-against-serializing-mismatching-chunk-coordina.patch b/Spigot-Server-Patches/0394-Guard-against-serializing-mismatching-chunk-coordina.patch similarity index 100% rename from Spigot-Server-Patches/0393-Guard-against-serializing-mismatching-chunk-coordina.patch rename to Spigot-Server-Patches/0394-Guard-against-serializing-mismatching-chunk-coordina.patch diff --git a/Spigot-Server-Patches/0394-Optimise-IEntityAccess-getPlayerByUUID.patch b/Spigot-Server-Patches/0395-Optimise-IEntityAccess-getPlayerByUUID.patch similarity index 100% rename from Spigot-Server-Patches/0394-Optimise-IEntityAccess-getPlayerByUUID.patch rename to Spigot-Server-Patches/0395-Optimise-IEntityAccess-getPlayerByUUID.patch diff --git a/Spigot-Server-Patches/0395-Fix-items-not-falling-correctly.patch b/Spigot-Server-Patches/0396-Fix-items-not-falling-correctly.patch similarity index 100% rename from Spigot-Server-Patches/0395-Fix-items-not-falling-correctly.patch rename to Spigot-Server-Patches/0396-Fix-items-not-falling-correctly.patch diff --git a/Spigot-Server-Patches/0396-Lag-compensate-eating.patch b/Spigot-Server-Patches/0397-Lag-compensate-eating.patch similarity index 100% rename from Spigot-Server-Patches/0396-Lag-compensate-eating.patch rename to Spigot-Server-Patches/0397-Lag-compensate-eating.patch diff --git a/Spigot-Server-Patches/0397-Optimize-call-to-getFluid-for-explosions.patch b/Spigot-Server-Patches/0398-Optimize-call-to-getFluid-for-explosions.patch similarity index 100% rename from Spigot-Server-Patches/0397-Optimize-call-to-getFluid-for-explosions.patch rename to Spigot-Server-Patches/0398-Optimize-call-to-getFluid-for-explosions.patch diff --git a/Spigot-Server-Patches/0398-Fix-last-firework-in-stack-not-having-effects-when-d.patch b/Spigot-Server-Patches/0399-Fix-last-firework-in-stack-not-having-effects-when-d.patch similarity index 100% rename from Spigot-Server-Patches/0398-Fix-last-firework-in-stack-not-having-effects-when-d.patch rename to Spigot-Server-Patches/0399-Fix-last-firework-in-stack-not-having-effects-when-d.patch diff --git a/Spigot-Server-Patches/0399-Add-effect-to-block-break-naturally.patch b/Spigot-Server-Patches/0400-Add-effect-to-block-break-naturally.patch similarity index 100% rename from Spigot-Server-Patches/0399-Add-effect-to-block-break-naturally.patch rename to Spigot-Server-Patches/0400-Add-effect-to-block-break-naturally.patch diff --git a/Spigot-Server-Patches/0400-Tracking-Range-Improvements.patch b/Spigot-Server-Patches/0401-Tracking-Range-Improvements.patch similarity index 93% rename from Spigot-Server-Patches/0400-Tracking-Range-Improvements.patch rename to Spigot-Server-Patches/0401-Tracking-Range-Improvements.patch index f2071060ce..ac1d81ca1d 100644 --- a/Spigot-Server-Patches/0400-Tracking-Range-Improvements.patch +++ b/Spigot-Server-Patches/0401-Tracking-Range-Improvements.patch @@ -20,7 +20,7 @@ index a167696d2fc3cb69b9eaa720c5904762e073008b..74df45e6c3f86736f7d136cf6fd911d5 if (j > i) { i = j; diff --git a/src/main/java/org/spigotmc/TrackingRange.java b/src/main/java/org/spigotmc/TrackingRange.java -index 646811932e9703510679080dd93586a3389aace9..03990231a8b6bc6925f054e9033825316abfafcc 100644 +index 6f8e6c1d079f82d7706d0b4f710bfb9b50e209d9..03990231a8b6bc6925f054e9033825316abfafcc 100644 --- a/src/main/java/org/spigotmc/TrackingRange.java +++ b/src/main/java/org/spigotmc/TrackingRange.java @@ -1,6 +1,8 @@ @@ -36,7 +36,7 @@ index 646811932e9703510679080dd93586a3389aace9..03990231a8b6bc6925f054e903382531 if ( entity instanceof EntityPlayer ) { return config.playerTrackingRange; -- } else if ( entity.activationType == ActivationRange.ActivationType.MONSTER || entity.activationType == ActivationRange.ActivationType.RAIDER ) +- } else if ( entity.activationType == ActivationRange.ActivationType.MONSTER || entity.activationType == ActivationRange.ActivationType.RAIDER ) - { - return config.monsterTrackingRange; - } else if ( entity instanceof EntityGhast ) diff --git a/Spigot-Server-Patches/0401-Entity-Activation-Range-2.0.patch b/Spigot-Server-Patches/0402-Entity-Activation-Range-2.0.patch similarity index 97% rename from Spigot-Server-Patches/0401-Entity-Activation-Range-2.0.patch rename to Spigot-Server-Patches/0402-Entity-Activation-Range-2.0.patch index d37084c5ff..7cbca4dec7 100644 --- a/Spigot-Server-Patches/0401-Entity-Activation-Range-2.0.patch +++ b/Spigot-Server-Patches/0402-Entity-Activation-Range-2.0.patch @@ -14,7 +14,7 @@ Adds flying monsters to control ghast and phantoms Adds villagers as separate config diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 595adbeb253529720e72f695667d5bf9584ebaf0..09e33261f4fe7ed1b68f6954202b359e9d6d9928 100644 +index e8e6e3ed5fa5aed6160e667142a244a39078c479..2b06163358827e0773969226d8f77e6e0ba0ca3d 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -163,7 +163,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -143,7 +143,7 @@ index 65cbe073da6a035f1ac539908a3fa8dbf0f42808..d9e1b43283bee15c659dd3a99e45d941 return this.bB != null; } diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java -index 732323ee1de01929c73bc5f98444c0f68f908a67..2ed6af09e97a087ffdd5e014564d9b49bda51b77 100644 +index b6ad33b3bfc1a71d3e4495c803cba12ee3c2a971..bb096fd5fa20aead7df0188ae294da9c813abace 100644 --- a/src/main/java/net/minecraft/server/EntityVillager.java +++ b/src/main/java/net/minecraft/server/EntityVillager.java @@ -144,17 +144,29 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation @@ -332,7 +332,7 @@ index 182cd7e9110408fff9909ef362d368d055a2b167..f3df10587e652d3a26d15deb09304b97 return this.c; } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 1dca840322990c996ed6eac49792529f60058a6f..c9c5c0b6f8837001db0b38dabfba7e01bc6de6db 100644 +index 2fa1cd43a8a7b083cd1522c32716d21dee922c46..6a067e4db344ca5fc446650722db7118fa5127a2 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -82,6 +82,12 @@ public abstract class World implements GeneratorAccess, AutoCloseable { @@ -440,13 +440,13 @@ index 15d68e08a51ae83ae4a8031f47d512b7c89deae0..7d17623989cb601a99195d6d1b0c6c2b } } else { diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java -index 797e579afdbc77a8dc5fc4cdf5874e546922fbfa..5b6604c5c84e9ee716110cd63a148187ff34201a 100644 +index b73af0a5fb2d08c2f3a52c699ef0d8ed34c83f77..9030284ba06dfdcc17c2710f428e84d70afea8d5 100644 --- a/src/main/java/org/spigotmc/ActivationRange.java +++ b/src/main/java/org/spigotmc/ActivationRange.java -@@ -1,24 +1,34 @@ - package org.spigotmc; +@@ -2,24 +2,34 @@ package org.spigotmc; import java.util.Collection; + import java.util.List; + +import net.minecraft.server.Activity; import net.minecraft.server.AxisAlignedBB; @@ -478,7 +478,7 @@ index 797e579afdbc77a8dc5fc4cdf5874e546922fbfa..5b6604c5c84e9ee716110cd63a148187 import net.minecraft.server.EntityProjectile; import net.minecraft.server.EntityRaider; import net.minecraft.server.EntitySheep; -@@ -27,16 +37,26 @@ import net.minecraft.server.EntityTNTPrimed; +@@ -29,16 +39,26 @@ import net.minecraft.server.EntityTNTPrimed; import net.minecraft.server.EntityThrownTrident; import net.minecraft.server.EntityVillager; import net.minecraft.server.EntityWither; @@ -505,7 +505,7 @@ index 797e579afdbc77a8dc5fc4cdf5874e546922fbfa..5b6604c5c84e9ee716110cd63a148187 MONSTER, ANIMAL, RAIDER, -@@ -44,6 +64,43 @@ public class ActivationRange +@@ -46,6 +66,43 @@ public class ActivationRange AxisAlignedBB boundingBox = new AxisAlignedBB( 0, 0, 0, 0, 0, 0 ); } @@ -549,7 +549,7 @@ index 797e579afdbc77a8dc5fc4cdf5874e546922fbfa..5b6604c5c84e9ee716110cd63a148187 static AxisAlignedBB maxBB = new AxisAlignedBB( 0, 0, 0, 0, 0, 0 ); -@@ -56,10 +113,13 @@ public class ActivationRange +@@ -58,10 +115,13 @@ public class ActivationRange */ public static ActivationType initializeEntityActivationType(Entity entity) { @@ -564,7 +564,7 @@ index 797e579afdbc77a8dc5fc4cdf5874e546922fbfa..5b6604c5c84e9ee716110cd63a148187 { return ActivationType.MONSTER; } else if ( entity instanceof EntityCreature || entity instanceof EntityAmbient ) -@@ -80,10 +140,14 @@ public class ActivationRange +@@ -82,10 +142,14 @@ public class ActivationRange */ public static boolean initializeEntityActivationState(Entity entity, SpigotWorldConfig config) { @@ -583,7 +583,7 @@ index 797e579afdbc77a8dc5fc4cdf5874e546922fbfa..5b6604c5c84e9ee716110cd63a148187 || entity instanceof EntityHuman || entity instanceof EntityProjectile || entity instanceof EntityEnderDragon -@@ -116,10 +180,25 @@ public class ActivationRange +@@ -118,10 +182,25 @@ public class ActivationRange final int raiderActivationRange = world.spigotConfig.raiderActivationRange; final int animalActivationRange = world.spigotConfig.animalActivationRange; final int monsterActivationRange = world.spigotConfig.monsterActivationRange; @@ -609,7 +609,7 @@ index 797e579afdbc77a8dc5fc4cdf5874e546922fbfa..5b6604c5c84e9ee716110cd63a148187 maxRange = Math.min( ( world.spigotConfig.viewDistance << 4 ) - 8, maxRange ); for ( EntityHuman player : world.getPlayers() ) -@@ -131,6 +210,11 @@ public class ActivationRange +@@ -133,6 +212,11 @@ public class ActivationRange ActivationType.RAIDER.boundingBox = player.getBoundingBox().grow( raiderActivationRange, 256, raiderActivationRange ); ActivationType.ANIMAL.boundingBox = player.getBoundingBox().grow( animalActivationRange, 256, animalActivationRange ); ActivationType.MONSTER.boundingBox = player.getBoundingBox().grow( monsterActivationRange, 256, monsterActivationRange ); @@ -621,7 +621,7 @@ index 797e579afdbc77a8dc5fc4cdf5874e546922fbfa..5b6604c5c84e9ee716110cd63a148187 int i = MathHelper.floor( maxBB.minX / 16.0D ); int j = MathHelper.floor( maxBB.maxX / 16.0D ); -@@ -141,7 +225,7 @@ public class ActivationRange +@@ -143,7 +227,7 @@ public class ActivationRange { for ( int j1 = k; j1 <= l; ++j1 ) { @@ -630,11 +630,11 @@ index 797e579afdbc77a8dc5fc4cdf5874e546922fbfa..5b6604c5c84e9ee716110cd63a148187 if ( chunk != null ) { activateChunkEntities( chunk ); -@@ -159,19 +243,15 @@ public class ActivationRange +@@ -161,19 +245,15 @@ public class ActivationRange */ private static void activateChunkEntities(Chunk chunk) { -- for ( java.util.List slice : chunk.entitySlices ) +- for ( List slice : chunk.entitySlices ) - { - for ( Entity entity : (Collection) slice ) + // Paper start @@ -658,7 +658,7 @@ index 797e579afdbc77a8dc5fc4cdf5874e546922fbfa..5b6604c5c84e9ee716110cd63a148187 entity.activatedTick = MinecraftServer.currentTick; } } -@@ -186,56 +266,105 @@ public class ActivationRange +@@ -188,56 +268,105 @@ public class ActivationRange * @param entity * @return */ @@ -780,7 +780,7 @@ index 797e579afdbc77a8dc5fc4cdf5874e546922fbfa..5b6604c5c84e9ee716110cd63a148187 } /** -@@ -250,8 +379,19 @@ public class ActivationRange +@@ -252,8 +381,19 @@ public class ActivationRange if ( !entity.inChunk || entity instanceof EntityFireworks ) { return true; } @@ -801,7 +801,7 @@ index 797e579afdbc77a8dc5fc4cdf5874e546922fbfa..5b6604c5c84e9ee716110cd63a148187 // Should this entity tick? if ( !isActive ) -@@ -259,15 +399,19 @@ public class ActivationRange +@@ -261,15 +401,19 @@ public class ActivationRange if ( ( MinecraftServer.currentTick - entity.activatedTick - 1 ) % 20 == 0 ) { // Check immunities every 20 ticks. @@ -827,7 +827,7 @@ index 797e579afdbc77a8dc5fc4cdf5874e546922fbfa..5b6604c5c84e9ee716110cd63a148187 isActive = false; } diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index 34ee684901906fc2ef5f0d09680d2686b813e52b..6b015c1f26facb4e82d75b252164dec05731ca6c 100644 +index f0ad5fa235adfd165b8e56be7352568a3b3ae54a..9859e0c964e4d1e7dc7689cb97f40643a8e5cdd7 100644 --- a/src/main/java/org/spigotmc/SpigotWorldConfig.java +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java @@ -180,13 +180,59 @@ public class SpigotWorldConfig diff --git a/Spigot-Server-Patches/0402-Fix-items-vanishing-through-end-portal.patch b/Spigot-Server-Patches/0403-Fix-items-vanishing-through-end-portal.patch similarity index 93% rename from Spigot-Server-Patches/0402-Fix-items-vanishing-through-end-portal.patch rename to Spigot-Server-Patches/0403-Fix-items-vanishing-through-end-portal.patch index 1c613ec343..8737179ac1 100644 --- a/Spigot-Server-Patches/0402-Fix-items-vanishing-through-end-portal.patch +++ b/Spigot-Server-Patches/0403-Fix-items-vanishing-through-end-portal.patch @@ -13,7 +13,7 @@ Quickly loading the exact world spawn chunk before searching the heightmap resolves the issue without having to load all spawn chunks. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 09e33261f4fe7ed1b68f6954202b359e9d6d9928..1f23d9d1e0054e55f410c1d901c33db708c0b621 100644 +index 2b06163358827e0773969226d8f77e6e0ba0ca3d..2a12dd777d881a9231f8e241aee65db60792a110 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -2641,6 +2641,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/0403-Bees-get-gravity-in-void.-Fixes-MC-167279.patch b/Spigot-Server-Patches/0404-Bees-get-gravity-in-void.-Fixes-MC-167279.patch similarity index 100% rename from Spigot-Server-Patches/0403-Bees-get-gravity-in-void.-Fixes-MC-167279.patch rename to Spigot-Server-Patches/0404-Bees-get-gravity-in-void.-Fixes-MC-167279.patch diff --git a/Spigot-Server-Patches/0404-Optimise-getChunkAt-calls-for-loaded-chunks.patch b/Spigot-Server-Patches/0405-Optimise-getChunkAt-calls-for-loaded-chunks.patch similarity index 92% rename from Spigot-Server-Patches/0404-Optimise-getChunkAt-calls-for-loaded-chunks.patch rename to Spigot-Server-Patches/0405-Optimise-getChunkAt-calls-for-loaded-chunks.patch index 9c88237f66..c4713f719c 100644 --- a/Spigot-Server-Patches/0404-Optimise-getChunkAt-calls-for-loaded-chunks.patch +++ b/Spigot-Server-Patches/0405-Optimise-getChunkAt-calls-for-loaded-chunks.patch @@ -7,10 +7,10 @@ bypass the need to get a player chunk, then get the either, then unwrap it... diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 1eb201695cd118616fb404a0c7ed8cedee77db89..e0296920a794157d89bb314b162de706d69a5459 100644 +index 2fad6a79ee977c2712c55433bde8eca524d09ba7..37ea114deba56efa6692a5e2290c2ef2d4d70ec8 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -447,6 +447,12 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -439,6 +439,12 @@ public class ChunkProviderServer extends IChunkProvider { return this.getChunkAt(i, j, chunkstatus, flag); }, this.serverThreadQueue).join(); } else { @@ -23,7 +23,7 @@ index 1eb201695cd118616fb404a0c7ed8cedee77db89..e0296920a794157d89bb314b162de706 GameProfilerFiller gameprofilerfiller = this.world.getMethodProfiler(); gameprofilerfiller.c("getChunk"); -@@ -497,39 +503,7 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -489,39 +495,7 @@ public class ChunkProviderServer extends IChunkProvider { if (Thread.currentThread() != this.serverThread) { return null; } else { diff --git a/Spigot-Server-Patches/0405-Allow-overriding-the-java-version-check.patch b/Spigot-Server-Patches/0406-Allow-overriding-the-java-version-check.patch similarity index 100% rename from Spigot-Server-Patches/0405-Allow-overriding-the-java-version-check.patch rename to Spigot-Server-Patches/0406-Allow-overriding-the-java-version-check.patch diff --git a/Spigot-Server-Patches/0406-Add-ThrownEggHatchEvent.patch b/Spigot-Server-Patches/0407-Add-ThrownEggHatchEvent.patch similarity index 100% rename from Spigot-Server-Patches/0406-Add-ThrownEggHatchEvent.patch rename to Spigot-Server-Patches/0407-Add-ThrownEggHatchEvent.patch diff --git a/Spigot-Server-Patches/0407-Optimise-random-block-ticking.patch b/Spigot-Server-Patches/0408-Optimise-random-block-ticking.patch similarity index 98% rename from Spigot-Server-Patches/0407-Optimise-random-block-ticking.patch rename to Spigot-Server-Patches/0408-Optimise-random-block-ticking.patch index 9e5b261d99..a73154f8e2 100644 --- a/Spigot-Server-Patches/0407-Optimise-random-block-ticking.patch +++ b/Spigot-Server-Patches/0408-Optimise-random-block-ticking.patch @@ -83,10 +83,10 @@ index f068436960c96b0df427bcdf337a4dcc6a9f66f5..253423acc3c3697a5e47136f34da9261 return this.d(baseblockposition.getX(), baseblockposition.getY(), baseblockposition.getZ()); } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 0601e9cdeb33dec82642ee9fbfaac1712bd0fae9..49bcd959206eeb21ff743f827a076b0c4cd3c722 100644 +index 08d122f7f20e3c2cdfeababb41b0a8910760b80b..81504bfbbd4a987c95f35d0f25754dbf8b2487e4 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java -@@ -599,8 +599,8 @@ public class Chunk implements IChunkAccess { +@@ -597,8 +597,8 @@ public class Chunk implements IChunkAccess { this.entities.remove(entity); // Paper } @@ -243,10 +243,10 @@ index fa8eab20bb839c53bf7989d02d2274f835002609..4ad393bc99881d813e2b349fb929fc8e public BlockPosition getHomePos() { // Paper - public diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index c9c5c0b6f8837001db0b38dabfba7e01bc6de6db..4da88ce31cfb8baa6fa68c0115edadac0c5b2fba 100644 +index 6a067e4db344ca5fc446650722db7118fa5127a2..a6a16f72b49a8a641dbb8ab580ecd9d61e9f4b37 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -1412,10 +1412,18 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -1413,10 +1413,18 @@ public abstract class World implements GeneratorAccess, AutoCloseable { public abstract ITagRegistry p(); public BlockPosition a(int i, int j, int k, int l) { diff --git a/Spigot-Server-Patches/0408-Entity-Jump-API.patch b/Spigot-Server-Patches/0409-Entity-Jump-API.patch similarity index 100% rename from Spigot-Server-Patches/0408-Entity-Jump-API.patch rename to Spigot-Server-Patches/0409-Entity-Jump-API.patch diff --git a/Spigot-Server-Patches/0409-Add-option-to-nerf-pigmen-from-nether-portals.patch b/Spigot-Server-Patches/0410-Add-option-to-nerf-pigmen-from-nether-portals.patch similarity index 97% rename from Spigot-Server-Patches/0409-Add-option-to-nerf-pigmen-from-nether-portals.patch rename to Spigot-Server-Patches/0410-Add-option-to-nerf-pigmen-from-nether-portals.patch index 81445c53e9..59a15ac0d7 100644 --- a/Spigot-Server-Patches/0409-Add-option-to-nerf-pigmen-from-nether-portals.patch +++ b/Spigot-Server-Patches/0410-Add-option-to-nerf-pigmen-from-nether-portals.patch @@ -32,7 +32,7 @@ index a224a04ee1bb9705166913ef1c66aa031d87c270..4132cd4c6f13cfa1c0cda43daaa908ff } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 1f23d9d1e0054e55f410c1d901c33db708c0b621..f124527c4f727383c6da4eaa503b69112b583e32 100644 +index 2a12dd777d881a9231f8e241aee65db60792a110..cabbc9019d6b6fe174b0be61b7f18a2db4702987 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -189,6 +189,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/0410-Make-the-GUI-graph-fancier.patch b/Spigot-Server-Patches/0411-Make-the-GUI-graph-fancier.patch similarity index 100% rename from Spigot-Server-Patches/0410-Make-the-GUI-graph-fancier.patch rename to Spigot-Server-Patches/0411-Make-the-GUI-graph-fancier.patch diff --git a/Spigot-Server-Patches/0411-add-hand-to-BlockMultiPlaceEvent.patch b/Spigot-Server-Patches/0412-add-hand-to-BlockMultiPlaceEvent.patch similarity index 89% rename from Spigot-Server-Patches/0411-add-hand-to-BlockMultiPlaceEvent.patch rename to Spigot-Server-Patches/0412-add-hand-to-BlockMultiPlaceEvent.patch index e2e6e88cfd..eb794a0fcc 100644 --- a/Spigot-Server-Patches/0411-add-hand-to-BlockMultiPlaceEvent.patch +++ b/Spigot-Server-Patches/0412-add-hand-to-BlockMultiPlaceEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] add hand to BlockMultiPlaceEvent diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 995194c4499cc93dc2fa21b0a6d7d826877d2c78..a4c80ebc49ba3b9ac244f64e10448ebc90932795 100644 +index 3719bf85502f8b0a44ea2044163df84f4273cbc2..6234baf6abea43cd054630fb029f0cd40350c723 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -328,13 +328,18 @@ public class CraftEventFactory { +@@ -334,13 +334,18 @@ public class CraftEventFactory { } org.bukkit.inventory.ItemStack item; diff --git a/Spigot-Server-Patches/0412-Prevent-teleporting-dead-entities.patch b/Spigot-Server-Patches/0413-Prevent-teleporting-dead-entities.patch similarity index 90% rename from Spigot-Server-Patches/0412-Prevent-teleporting-dead-entities.patch rename to Spigot-Server-Patches/0413-Prevent-teleporting-dead-entities.patch index 81670242a8..df3638c0b8 100644 --- a/Spigot-Server-Patches/0412-Prevent-teleporting-dead-entities.patch +++ b/Spigot-Server-Patches/0413-Prevent-teleporting-dead-entities.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Prevent teleporting dead entities diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index d35cfd180bb1854d61b66d46ab4930d70f470ab0..46815f388a785009a103e8a726ca85e30a5d55e1 100644 +index a90b0caeaa2340ce78dbad773b257db0f108a4ed..5b42d6ff29dfd7415a8b89b36e8522ab4f5494ca 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -1319,6 +1319,10 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0413-Validate-tripwire-hook-placement-before-update.patch b/Spigot-Server-Patches/0414-Validate-tripwire-hook-placement-before-update.patch similarity index 100% rename from Spigot-Server-Patches/0413-Validate-tripwire-hook-placement-before-update.patch rename to Spigot-Server-Patches/0414-Validate-tripwire-hook-placement-before-update.patch diff --git a/Spigot-Server-Patches/0414-Add-option-to-allow-iron-golems-to-spawn-in-air.patch b/Spigot-Server-Patches/0415-Add-option-to-allow-iron-golems-to-spawn-in-air.patch similarity index 100% rename from Spigot-Server-Patches/0414-Add-option-to-allow-iron-golems-to-spawn-in-air.patch rename to Spigot-Server-Patches/0415-Add-option-to-allow-iron-golems-to-spawn-in-air.patch diff --git a/Spigot-Server-Patches/0415-Configurable-chance-of-villager-zombie-infection.patch b/Spigot-Server-Patches/0416-Configurable-chance-of-villager-zombie-infection.patch similarity index 94% rename from Spigot-Server-Patches/0415-Configurable-chance-of-villager-zombie-infection.patch rename to Spigot-Server-Patches/0416-Configurable-chance-of-villager-zombie-infection.patch index 341a5ca810..046a44c9dc 100644 --- a/Spigot-Server-Patches/0415-Configurable-chance-of-villager-zombie-infection.patch +++ b/Spigot-Server-Patches/0416-Configurable-chance-of-villager-zombie-infection.patch @@ -22,10 +22,10 @@ index fe1c9dd8258ec8c3fdf343d4a44de2be2ae3d35f..525d702d78a609af987ebd2c32169b87 + } } diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java -index b7dc265ea684b71cc94e9a0542dad484864c0e30..360f14a3128f9a4c31fadb5a6f245d15845c8ae0 100644 +index 05d7b7a67bfc117a91903db5f303587a4f8f8624..f390abf65d648e1e0697e2d802f3195a0241116e 100644 --- a/src/main/java/net/minecraft/server/EntityZombie.java +++ b/src/main/java/net/minecraft/server/EntityZombie.java -@@ -389,10 +389,14 @@ public class EntityZombie extends EntityMonster { +@@ -386,10 +386,14 @@ public class EntityZombie extends EntityMonster { @Override public void a(WorldServer worldserver, EntityLiving entityliving) { super.a(worldserver, entityliving); diff --git a/Spigot-Server-Patches/0416-Optimise-Chunk-getFluid.patch b/Spigot-Server-Patches/0417-Optimise-Chunk-getFluid.patch similarity index 96% rename from Spigot-Server-Patches/0416-Optimise-Chunk-getFluid.patch rename to Spigot-Server-Patches/0417-Optimise-Chunk-getFluid.patch index b507c446bc..6102a2a441 100644 --- a/Spigot-Server-Patches/0416-Optimise-Chunk-getFluid.patch +++ b/Spigot-Server-Patches/0417-Optimise-Chunk-getFluid.patch @@ -8,7 +8,7 @@ faster on its own, however removing the try catch makes it easier to inline due to code size diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 49bcd959206eeb21ff743f827a076b0c4cd3c722..63de4bba14df9bc33ce04fff5bc0baede6fad6f7 100644 +index 81504bfbbd4a987c95f35d0f25754dbf8b2487e4..8e91a0270a7a72f09dfc86331a788765de1f9f5e 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -390,17 +390,20 @@ public class Chunk implements IChunkAccess { diff --git a/Spigot-Server-Patches/0417-Optimise-TickListServer-by-rewriting-it.patch b/Spigot-Server-Patches/0418-Optimise-TickListServer-by-rewriting-it.patch similarity index 99% rename from Spigot-Server-Patches/0417-Optimise-TickListServer-by-rewriting-it.patch rename to Spigot-Server-Patches/0418-Optimise-TickListServer-by-rewriting-it.patch index e6b5c373e4..1bbfbf7268 100644 --- a/Spigot-Server-Patches/0417-Optimise-TickListServer-by-rewriting-it.patch +++ b/Spigot-Server-Patches/0418-Optimise-TickListServer-by-rewriting-it.patch @@ -901,7 +901,7 @@ index 253423acc3c3697a5e47136f34da92617e719753..52ae74571b0d671a294900caedaa400b return this.b(baseblockposition.getX(), baseblockposition.getY(), baseblockposition.getZ()); } diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index e0296920a794157d89bb314b162de706d69a5459..1f4776f6f2debb4e000440ed8e47e3e063202850 100644 +index 37ea114deba56efa6692a5e2290c2ef2d4d70ec8..6d1744bbe6af33180fb814a99c041edad9d44aeb 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -194,6 +194,13 @@ public class ChunkProviderServer extends IChunkProvider { @@ -990,10 +990,10 @@ index 33cfeabdee03195a294f303f28044a313cb1c4ed..2287e47d1b891135a5f2579ec324c705 public String toString() { return this.e + ": " + this.a + ", " + this.b + ", " + this.c + ", " + this.f; diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java -index 25f8febe63167349460e32c831088bb80b6b77ad..5305da4c7253c7e259d7b08e9722145188adc513 100644 +index a1341617ba5388d1d1f2c91ad158b0210b4505cb..3cdfb6cddf4b998ee48df64fd884a85237004b63 100644 --- a/src/main/java/net/minecraft/server/PlayerChunk.java +++ b/src/main/java/net/minecraft/server/PlayerChunk.java -@@ -471,7 +471,9 @@ public class PlayerChunk { +@@ -467,7 +467,9 @@ public class PlayerChunk { PlayerChunk.this.isTickingReady = true; @@ -1191,7 +1191,7 @@ index 3b8f56c0f0507ebdd9ac20be70688b4c0cfe4cf8..3e148b7e99554a1abe257dd3c9acafb9 } } diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 640ae46d754f4af09ef3a404860b6b3db7d63a1a..e0be5975ddeb5116f16696b2ca0d067146b00cf4 100644 +index 91e8dceec2d3aa8bb072b3d2f80953dc9af470b4..fb9c55a864ce3fd646e9576b2feede70ab759bbc 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -186,6 +186,15 @@ public class WorldServer extends World implements GeneratorAccessSeed { diff --git a/Spigot-Server-Patches/0418-Pillager-patrol-spawn-settings-and-per-player-option.patch b/Spigot-Server-Patches/0419-Pillager-patrol-spawn-settings-and-per-player-option.patch similarity index 97% rename from Spigot-Server-Patches/0418-Pillager-patrol-spawn-settings-and-per-player-option.patch rename to Spigot-Server-Patches/0419-Pillager-patrol-spawn-settings-and-per-player-option.patch index 129c65dd3e..47babc6c7c 100644 --- a/Spigot-Server-Patches/0418-Pillager-patrol-spawn-settings-and-per-player-option.patch +++ b/Spigot-Server-Patches/0419-Pillager-patrol-spawn-settings-and-per-player-option.patch @@ -36,10 +36,10 @@ index 525d702d78a609af987ebd2c32169b873e5c05ed..6c8e9d498c9a30a1aa88494ba09c3cae private void entitiesTargetWithFollowRange() { entitiesTargetWithFollowRange = getBoolean("entities-target-with-follow-range", entitiesTargetWithFollowRange); diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index f82255227f3a9470737d381be8f7a22216dc8f27..46dad293f19e84e30a32522591c3b8edf8e3a4dd 100644 +index f87cfd0de55808c6d93e2e80772c122cf7a279b8..e60dac038e8a414a45f8dab465d722ee3fb5ef54 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -86,6 +86,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -87,6 +87,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { public boolean viewingCredits; private int containerUpdateDelay; // Paper public long loginTime; // Paper diff --git a/Spigot-Server-Patches/0419-Ensure-Entity-is-never-double-registered.patch b/Spigot-Server-Patches/0420-Ensure-Entity-is-never-double-registered.patch similarity index 97% rename from Spigot-Server-Patches/0419-Ensure-Entity-is-never-double-registered.patch rename to Spigot-Server-Patches/0420-Ensure-Entity-is-never-double-registered.patch index 3b525c0463..68ff965915 100644 --- a/Spigot-Server-Patches/0419-Ensure-Entity-is-never-double-registered.patch +++ b/Spigot-Server-Patches/0420-Ensure-Entity-is-never-double-registered.patch @@ -11,7 +11,7 @@ Vs behavior of non ticking of just overwriting state. We will now simply log a warning when this happens instead of crashing the server. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index f124527c4f727383c6da4eaa503b69112b583e32..874dddc5d70dc149c272855a98ed858867dd2bb6 100644 +index cabbc9019d6b6fe174b0be61b7f18a2db4702987..0adeb46e1a82820df8744379829f6f7a68fa6d2d 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -59,6 +59,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/0420-Fix-unregistering-entities-from-unloading-chunks.patch b/Spigot-Server-Patches/0421-Fix-unregistering-entities-from-unloading-chunks.patch similarity index 80% rename from Spigot-Server-Patches/0420-Fix-unregistering-entities-from-unloading-chunks.patch rename to Spigot-Server-Patches/0421-Fix-unregistering-entities-from-unloading-chunks.patch index 34a39f5621..d1f6dbd738 100644 --- a/Spigot-Server-Patches/0420-Fix-unregistering-entities-from-unloading-chunks.patch +++ b/Spigot-Server-Patches/0421-Fix-unregistering-entities-from-unloading-chunks.patch @@ -15,14 +15,14 @@ Combine that with a buggy detail of the previous implementation of the Dupe UUID patch, then this was the likely source of the "Ghost entities" diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 69060be0daf3fbae2763852209c915be59caac4f..cd04994ed38c7f5d4db6b1ef1796f95ef2c490e1 100644 +index 95b25bb17d9d4b025047b01909a880da26e59146..0543f5f30340e367511ec282ea67b611168c6000 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -1451,9 +1451,9 @@ public class WorldServer extends World implements GeneratorAccessSeed { } private void removeEntityFromChunk(Entity entity) { -- IChunkAccess ichunkaccess = chunkProvider.getChunkUnchecked(entity.chunkX, entity.chunkZ); // CraftBukkit - SPIGOT-5228: getChunkAt won't find the entity's chunk if it has already been unloaded (i.e. if it switched to state INACCESSIBLE). +- IChunkAccess ichunkaccess = this.getChunkAt(entity.chunkX, entity.chunkZ, ChunkStatus.FULL, false); + Chunk ichunkaccess = entity.getCurrentChunk(); // Paper - getChunkAt(x,z,full,false) is broken by CraftBukkit as it won't return an unloading chunk. Use our current chunk reference as this points to what chunk they need to be removed from anyways - if (ichunkaccess instanceof Chunk) { diff --git a/Spigot-Server-Patches/0421-Remote-Connections-shouldn-t-hold-up-shutdown.patch b/Spigot-Server-Patches/0422-Remote-Connections-shouldn-t-hold-up-shutdown.patch similarity index 100% rename from Spigot-Server-Patches/0421-Remote-Connections-shouldn-t-hold-up-shutdown.patch rename to Spigot-Server-Patches/0422-Remote-Connections-shouldn-t-hold-up-shutdown.patch diff --git a/Spigot-Server-Patches/0422-Do-not-allow-bees-to-load-chunks-for-beehives.patch b/Spigot-Server-Patches/0423-Do-not-allow-bees-to-load-chunks-for-beehives.patch similarity index 100% rename from Spigot-Server-Patches/0422-Do-not-allow-bees-to-load-chunks-for-beehives.patch rename to Spigot-Server-Patches/0423-Do-not-allow-bees-to-load-chunks-for-beehives.patch diff --git a/Spigot-Server-Patches/0423-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch b/Spigot-Server-Patches/0424-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch similarity index 100% rename from Spigot-Server-Patches/0423-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch rename to Spigot-Server-Patches/0424-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch diff --git a/Spigot-Server-Patches/0424-Optimize-Collision-to-not-load-chunks.patch b/Spigot-Server-Patches/0425-Optimize-Collision-to-not-load-chunks.patch similarity index 97% rename from Spigot-Server-Patches/0424-Optimize-Collision-to-not-load-chunks.patch rename to Spigot-Server-Patches/0425-Optimize-Collision-to-not-load-chunks.patch index fe2ca67bea..4fd0dd1e28 100644 --- a/Spigot-Server-Patches/0424-Optimize-Collision-to-not-load-chunks.patch +++ b/Spigot-Server-Patches/0425-Optimize-Collision-to-not-load-chunks.patch @@ -14,7 +14,7 @@ movement will load only the chunk the player enters anyways and avoids loading massive amounts of surrounding chunks due to large AABB lookups. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 874dddc5d70dc149c272855a98ed858867dd2bb6..7da08dd7c2396ae1048d857bfae4fee2a9f3b4d9 100644 +index 0adeb46e1a82820df8744379829f6f7a68fa6d2d..3dc33c26150af672df19e3f78572e74ce65bdc79 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -80,6 +80,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -40,7 +40,7 @@ index 7bb0843d76864fc10575532745eb63f9ca478354..25e54a1fadc5d31fb250a3f47524b4f3 Stream c(@Nullable Entity entity, AxisAlignedBB axisalignedbb, Predicate predicate); diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index da1f15c3b7af9bfafae43315f509290662576ba1..a124b47f07dd223151f23cc27a6e5ee5921b7942 100644 +index a02c51c25d698594281bbe317cd91a44aaf52ebc..c52c6cc6ab0bed4fbd088f6d32455e1a58a70c16 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -736,6 +736,7 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0425-Don-t-tick-dead-players.patch b/Spigot-Server-Patches/0426-Don-t-tick-dead-players.patch similarity index 85% rename from Spigot-Server-Patches/0425-Don-t-tick-dead-players.patch rename to Spigot-Server-Patches/0426-Don-t-tick-dead-players.patch index a4b9562352..cea3c23e61 100644 --- a/Spigot-Server-Patches/0425-Don-t-tick-dead-players.patch +++ b/Spigot-Server-Patches/0426-Don-t-tick-dead-players.patch @@ -7,10 +7,10 @@ Causes sync chunk loads and who knows what all else. This is safe because Spectators are skipped in unloaded chunks too in vanilla. diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 46dad293f19e84e30a32522591c3b8edf8e3a4dd..d4c6d26a61bf3519333cb99f04f28afaf4764cac 100644 +index e60dac038e8a414a45f8dab465d722ee3fb5ef54..cfccab0b33dfa387fdab09ad51d518d42b1b5775 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -477,7 +477,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -480,7 +480,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { public void playerTick() { try { diff --git a/Spigot-Server-Patches/0426-Dead-Player-s-shouldn-t-be-able-to-move.patch b/Spigot-Server-Patches/0427-Dead-Player-s-shouldn-t-be-able-to-move.patch similarity index 100% rename from Spigot-Server-Patches/0426-Dead-Player-s-shouldn-t-be-able-to-move.patch rename to Spigot-Server-Patches/0427-Dead-Player-s-shouldn-t-be-able-to-move.patch diff --git a/Spigot-Server-Patches/0427-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch b/Spigot-Server-Patches/0428-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch similarity index 98% rename from Spigot-Server-Patches/0427-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch rename to Spigot-Server-Patches/0428-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch index 4cfa7e701f..9e836b2b24 100644 --- a/Spigot-Server-Patches/0427-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch +++ b/Spigot-Server-Patches/0428-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch @@ -57,10 +57,10 @@ index 0000000000000000000000000000000000000000..f6ff4d8132a95895680f5bc81f8f873e + } +} diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 1f4776f6f2debb4e000440ed8e47e3e063202850..475e35a5d3f25929e60ef34d7f41e2db193443ef 100644 +index 6d1744bbe6af33180fb814a99c041edad9d44aeb..44aa6baed64a0d3847cd8df067e0fa32a0739c93 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -756,7 +756,7 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -748,7 +748,7 @@ public class ChunkProviderServer extends IChunkProvider { entityPlayer.playerNaturallySpawnedEvent.callEvent(); }; // Paper end @@ -243,7 +243,7 @@ index 21dfbbdbe72a7562601e23384e2fec8f9393ef29..87de764f74e8174da4c1a28238375caa while (objectbidirectionaliterator.hasNext()) { Entry entry = (Entry) objectbidirectionaliterator.next(); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 6ddfeea46997907f1dd666000c7cc2eb27cd4398..756c675939c5f5835736e6b8c42ae20941712c49 100644 +index e612d6528e1e73e774c742e763cbd3e5c28b87db..8f221c3b4c4cc9b5dea9938d868a2a036854d6e3 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -74,6 +74,7 @@ import net.minecraft.server.GroupDataEntity; diff --git a/Spigot-Server-Patches/0428-Increase-Light-Queue-Size.patch b/Spigot-Server-Patches/0429-Increase-Light-Queue-Size.patch similarity index 100% rename from Spigot-Server-Patches/0428-Increase-Light-Queue-Size.patch rename to Spigot-Server-Patches/0429-Increase-Light-Queue-Size.patch diff --git a/Spigot-Server-Patches/0429-Mid-Tick-Chunk-Tasks-Speed-up-processing-of-chunk-lo.patch b/Spigot-Server-Patches/0430-Mid-Tick-Chunk-Tasks-Speed-up-processing-of-chunk-lo.patch similarity index 96% rename from Spigot-Server-Patches/0429-Mid-Tick-Chunk-Tasks-Speed-up-processing-of-chunk-lo.patch rename to Spigot-Server-Patches/0430-Mid-Tick-Chunk-Tasks-Speed-up-processing-of-chunk-lo.patch index 174a182b53..25b2eb8718 100644 --- a/Spigot-Server-Patches/0429-Mid-Tick-Chunk-Tasks-Speed-up-processing-of-chunk-lo.patch +++ b/Spigot-Server-Patches/0430-Mid-Tick-Chunk-Tasks-Speed-up-processing-of-chunk-lo.patch @@ -56,10 +56,10 @@ index 519b43154993ec01eb13a58336ddcc745362892f..63b3726bfdd22900e7bc577c34db58dd + } } diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 475e35a5d3f25929e60ef34d7f41e2db193443ef..1f63cdd9588a8dda1f04154f4d9de21fd8224678 100644 +index 44aa6baed64a0d3847cd8df067e0fa32a0739c93..cc7691a2ed5eaa30071ad5e385bbd76bec3c3d80 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -694,6 +694,7 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -686,6 +686,7 @@ public class ChunkProviderServer extends IChunkProvider { this.world.getMethodProfiler().enter("purge"); this.world.timings.doChunkMap.startTiming(); // Spigot this.chunkMapDistance.purgeTickets(); @@ -67,7 +67,7 @@ index 475e35a5d3f25929e60ef34d7f41e2db193443ef..1f63cdd9588a8dda1f04154f4d9de21f this.tickDistanceManager(); this.world.timings.doChunkMap.stopTiming(); // Spigot this.world.getMethodProfiler().exitEnter("chunks"); -@@ -703,6 +704,7 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -695,6 +696,7 @@ public class ChunkProviderServer extends IChunkProvider { this.world.timings.doChunkUnload.startTiming(); // Spigot this.world.getMethodProfiler().exitEnter("unload"); this.playerChunkMap.unloadChunks(booleansupplier); @@ -75,7 +75,7 @@ index 475e35a5d3f25929e60ef34d7f41e2db193443ef..1f63cdd9588a8dda1f04154f4d9de21f this.world.timings.doChunkUnload.stopTiming(); // Spigot this.world.getMethodProfiler().exit(); this.clearCache(); -@@ -756,7 +758,7 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -748,7 +750,7 @@ public class ChunkProviderServer extends IChunkProvider { entityPlayer.playerNaturallySpawnedEvent.callEvent(); }; // Paper end @@ -84,7 +84,7 @@ index 475e35a5d3f25929e60ef34d7f41e2db193443ef..1f63cdd9588a8dda1f04154f4d9de21f Optional optional = ((Either) playerchunk.a().getNow(PlayerChunk.UNLOADED_CHUNK)).left(); if (optional.isPresent()) { -@@ -780,6 +782,7 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -772,6 +774,7 @@ public class ChunkProviderServer extends IChunkProvider { this.world.timings.chunkTicks.startTiming(); // Spigot // Paper this.world.a(chunk, k); this.world.timings.chunkTicks.stopTiming(); // Spigot // Paper @@ -92,7 +92,7 @@ index 475e35a5d3f25929e60ef34d7f41e2db193443ef..1f63cdd9588a8dda1f04154f4d9de21f } } } -@@ -936,6 +939,41 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -928,6 +931,41 @@ public class ChunkProviderServer extends IChunkProvider { super.executeTask(runnable); } @@ -226,7 +226,7 @@ index 96a784744110e7dd4939eb2c1b57346a2d60f983..77a91fa0549d5db12e8a9fa9b51a34a2 // Spigot Start CrashReport crashreport; diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index cbfe3cc34922c4dffb3dea5a279970072de1daae..7230432a67b0d07bcd40352ce510ce80517dd9b6 100644 +index d018cbee11356110aace897b1dd4516dd3ca5b61..1096ecf62127ad92dfed3872dbf6053c13975c94 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -457,6 +457,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { diff --git a/Spigot-Server-Patches/0430-Don-t-move-existing-players-to-world-spawn.patch b/Spigot-Server-Patches/0431-Don-t-move-existing-players-to-world-spawn.patch similarity index 85% rename from Spigot-Server-Patches/0430-Don-t-move-existing-players-to-world-spawn.patch rename to Spigot-Server-Patches/0431-Don-t-move-existing-players-to-world-spawn.patch index 7010e3cddd..104e82b4a5 100644 --- a/Spigot-Server-Patches/0430-Don-t-move-existing-players-to-world-spawn.patch +++ b/Spigot-Server-Patches/0431-Don-t-move-existing-players-to-world-spawn.patch @@ -10,10 +10,10 @@ larger than the keep loaded range. By skipping this, we avoid potential for a large spike on server start. diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index d4c6d26a61bf3519333cb99f04f28afaf4764cac..67eaac661a03742051e63551e6f18e1475a19e99 100644 +index cfccab0b33dfa387fdab09ad51d518d42b1b5775..950a16e8aafe71b54b4ba46b61b5d71f8aa3cf94 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -123,7 +123,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -125,7 +125,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { this.serverStatisticManager = minecraftserver.getPlayerList().getStatisticManager(this); this.advancementDataPlayer = minecraftserver.getPlayerList().f(this); this.G = 1.0F; @@ -22,7 +22,7 @@ index d4c6d26a61bf3519333cb99f04f28afaf4764cac..67eaac661a03742051e63551e6f18e14 this.co = minecraftserver.a(this); this.cachedSingleHashSet = new com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<>(this); // Paper -@@ -174,6 +174,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -177,6 +177,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } // CraftBukkit end @@ -30,7 +30,7 @@ index d4c6d26a61bf3519333cb99f04f28afaf4764cac..67eaac661a03742051e63551e6f18e14 private void c(WorldServer worldserver) { BlockPosition blockposition = worldserver.getSpawn(); -@@ -351,7 +352,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -354,7 +355,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { position = Vec3D.a(((WorldServer) world).getSpawn()); } this.world = world; @@ -40,10 +40,10 @@ index d4c6d26a61bf3519333cb99f04f28afaf4764cac..67eaac661a03742051e63551e6f18e14 this.playerInteractManager.a((WorldServer) world); } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index a124b47f07dd223151f23cc27a6e5ee5921b7942..a1987b17adb5fa8fdeb601da948839fb1fd35aaf 100644 +index c52c6cc6ab0bed4fbd088f6d32455e1a58a70c16..ce097978a072dd5499169277aa1143be97c3b4e1 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -134,6 +134,8 @@ public abstract class PlayerList { +@@ -136,6 +136,8 @@ public abstract class PlayerList { worldserver1 = worldserver; } diff --git a/Spigot-Server-Patches/0431-Add-tick-times-API-and-mspt-command.patch b/Spigot-Server-Patches/0432-Add-tick-times-API-and-mspt-command.patch similarity index 96% rename from Spigot-Server-Patches/0431-Add-tick-times-API-and-mspt-command.patch rename to Spigot-Server-Patches/0432-Add-tick-times-API-and-mspt-command.patch index e69ab178ab..ac49389ffd 100644 --- a/Spigot-Server-Patches/0431-Add-tick-times-API-and-mspt-command.patch +++ b/Spigot-Server-Patches/0432-Add-tick-times-API-and-mspt-command.patch @@ -147,10 +147,10 @@ index 77a91fa0549d5db12e8a9fa9b51a34a258821e7b..a8fe6c5f99c2be9dc7fedb8dfa8b12e4 + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index d5a2f6d9274c91d2fe58652b9d58246d06fc5a70..e29142de4413f91014e26d158ac48c5dfcdabdf8 100644 +index e0f4dc286893fcb37b75e0982a3d2b0d57953943..7756b25f4b7e5aae7eb6f3e8b347db4d531589f4 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2148,6 +2148,16 @@ public final class CraftServer implements Server { +@@ -2197,6 +2197,16 @@ public final class CraftServer implements Server { net.minecraft.server.MinecraftServer.getServer().tps15.getAverage() }; } @@ -166,4 +166,4 @@ index d5a2f6d9274c91d2fe58652b9d58246d06fc5a70..e29142de4413f91014e26d158ac48c5d + } // Paper end - // Spigot start + private final Spigot spigot = new Spigot() diff --git a/Spigot-Server-Patches/0432-Expose-MinecraftServer-isRunning.patch b/Spigot-Server-Patches/0433-Expose-MinecraftServer-isRunning.patch similarity index 83% rename from Spigot-Server-Patches/0432-Expose-MinecraftServer-isRunning.patch rename to Spigot-Server-Patches/0433-Expose-MinecraftServer-isRunning.patch index 039d4df864..db798b7f33 100644 --- a/Spigot-Server-Patches/0432-Expose-MinecraftServer-isRunning.patch +++ b/Spigot-Server-Patches/0433-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 e29142de4413f91014e26d158ac48c5dfcdabdf8..e5568d86b64465f54fe9bdec89b1a8f1d7639be7 100644 +index 7756b25f4b7e5aae7eb6f3e8b347db4d531589f4..fa96805c33ab16fe3a8ffbc5e5b1a4517269dd41 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2315,5 +2315,10 @@ public final class CraftServer implements Server { +@@ -2372,5 +2372,10 @@ public final class CraftServer implements Server { public int getCurrentTick() { return net.minecraft.server.MinecraftServer.currentTick; } diff --git a/Spigot-Server-Patches/0433-Add-Raw-Byte-ItemStack-Serialization.patch b/Spigot-Server-Patches/0434-Add-Raw-Byte-ItemStack-Serialization.patch similarity index 100% rename from Spigot-Server-Patches/0433-Add-Raw-Byte-ItemStack-Serialization.patch rename to Spigot-Server-Patches/0434-Add-Raw-Byte-ItemStack-Serialization.patch diff --git a/Spigot-Server-Patches/0434-Remove-streams-from-Mob-AI-System.patch b/Spigot-Server-Patches/0435-Remove-streams-from-Mob-AI-System.patch similarity index 100% rename from Spigot-Server-Patches/0434-Remove-streams-from-Mob-AI-System.patch rename to Spigot-Server-Patches/0435-Remove-streams-from-Mob-AI-System.patch diff --git a/Spigot-Server-Patches/0435-Delay-unsafe-actions-until-after-entity-ticking-is-d.patch b/Spigot-Server-Patches/0436-Delay-unsafe-actions-until-after-entity-ticking-is-d.patch similarity index 100% rename from Spigot-Server-Patches/0435-Delay-unsafe-actions-until-after-entity-ticking-is-d.patch rename to Spigot-Server-Patches/0436-Delay-unsafe-actions-until-after-entity-ticking-is-d.patch diff --git a/Spigot-Server-Patches/0436-Async-command-map-building.patch b/Spigot-Server-Patches/0437-Async-command-map-building.patch similarity index 100% rename from Spigot-Server-Patches/0436-Async-command-map-building.patch rename to Spigot-Server-Patches/0437-Async-command-map-building.patch diff --git a/Spigot-Server-Patches/0437-Improved-Watchdog-Support.patch b/Spigot-Server-Patches/0438-Improved-Watchdog-Support.patch similarity index 98% rename from Spigot-Server-Patches/0437-Improved-Watchdog-Support.patch rename to Spigot-Server-Patches/0438-Improved-Watchdog-Support.patch index ff41306e31..9c6e691ea5 100644 --- a/Spigot-Server-Patches/0437-Improved-Watchdog-Support.patch +++ b/Spigot-Server-Patches/0438-Improved-Watchdog-Support.patch @@ -287,7 +287,7 @@ index 87de764f74e8174da4c1a28238375caa6fdb4d5e..1b5c97c74b7224a8ac4d6e834925c050 list.stream().map((playerchunk) -> { CompletableFuture completablefuture; diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index a1987b17adb5fa8fdeb601da948839fb1fd35aaf..fbd0ecb7bee67bf5affb6be6a57a8a0a8e2686b3 100644 +index ce097978a072dd5499169277aa1143be97c3b4e1..a37e0330f95c00cc50b70ebbd6381c4acd671ed6 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -432,7 +432,7 @@ public abstract class PlayerList { @@ -312,7 +312,7 @@ index 1fe1df445ba56b2f176ee25502a774aa0a7bd00b..916a6a1fc1ccc73e4fb974ad77310d16 a(SystemUtils.e); a(SystemUtils.f); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 4da88ce31cfb8baa6fa68c0115edadac0c5b2fba..d26fd68b2abd4907138ce77a6e6bb45c9af4af02 100644 +index a6a16f72b49a8a641dbb8ab580ecd9d61e9f4b37..a50b647631eae271380728c890ad3ff67f56bcbe 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -798,6 +798,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { @@ -323,7 +323,7 @@ index 4da88ce31cfb8baa6fa68c0115edadac0c5b2fba..d26fd68b2abd4907138ce77a6e6bb45c // Paper start - Prevent tile entity and entity crashes String msg = "TileEntity threw exception at " + tileentity.world.getWorld().getName() + ":" + tileentity.position.getX() + "," + tileentity.position.getY() + "," + tileentity.position.getZ(); System.err.println(msg); -@@ -872,6 +873,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -873,6 +874,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { try { consumer.accept(entity); } catch (Throwable throwable) { @@ -345,10 +345,10 @@ index 1c1dceb98413ccb24e3111435119b3b8c1b760c4..5d299a65417ff17eae3dfe52841c1a27 List afterEntityTickingTasks = Lists.newArrayList(); public void doIfNotEntityTicking(java.lang.Runnable run) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index e5568d86b64465f54fe9bdec89b1a8f1d7639be7..4f5fe1f10195b1e3b09bf8301750dc75687b318a 100644 +index fa96805c33ab16fe3a8ffbc5e5b1a4517269dd41..9cb68bc8be2256244e7908cf76183d11f3b1a58b 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1792,7 +1792,7 @@ public final class CraftServer implements Server { +@@ -1835,7 +1835,7 @@ public final class CraftServer implements Server { @Override public boolean isPrimaryThread() { @@ -356,7 +356,7 @@ index e5568d86b64465f54fe9bdec89b1a8f1d7639be7..4f5fe1f10195b1e3b09bf8301750dc75 + return Thread.currentThread().equals(console.serverThread) || Thread.currentThread().equals(net.minecraft.server.MinecraftServer.getServer().shutdownThread); // Paper - Fix issues with detecting main thread properly, the only time Watchdog will be used is during a crash shutdown which is a "try our best" scenario } - @Override + // Paper start diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java index 67331fa5463dd31e4aea3aebf6204ec5cb43d99e..8265879466333f4941c63c64b95d94f6ac0b5558 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java diff --git a/Spigot-Server-Patches/0438-Optimize-Pathfinding.patch b/Spigot-Server-Patches/0439-Optimize-Pathfinding.patch similarity index 100% rename from Spigot-Server-Patches/0438-Optimize-Pathfinding.patch rename to Spigot-Server-Patches/0439-Optimize-Pathfinding.patch diff --git a/Spigot-Server-Patches/0439-Reduce-Either-Optional-allocation.patch b/Spigot-Server-Patches/0440-Reduce-Either-Optional-allocation.patch similarity index 100% rename from Spigot-Server-Patches/0439-Reduce-Either-Optional-allocation.patch rename to Spigot-Server-Patches/0440-Reduce-Either-Optional-allocation.patch diff --git a/Spigot-Server-Patches/0440-Remove-streams-from-PairedQueue.patch b/Spigot-Server-Patches/0441-Remove-streams-from-PairedQueue.patch similarity index 100% rename from Spigot-Server-Patches/0440-Remove-streams-from-PairedQueue.patch rename to Spigot-Server-Patches/0441-Remove-streams-from-PairedQueue.patch diff --git a/Spigot-Server-Patches/0441-Reduce-memory-footprint-of-NBTTagCompound.patch b/Spigot-Server-Patches/0442-Reduce-memory-footprint-of-NBTTagCompound.patch similarity index 100% rename from Spigot-Server-Patches/0441-Reduce-memory-footprint-of-NBTTagCompound.patch rename to Spigot-Server-Patches/0442-Reduce-memory-footprint-of-NBTTagCompound.patch diff --git a/Spigot-Server-Patches/0442-Prevent-opening-inventories-when-frozen.patch b/Spigot-Server-Patches/0443-Prevent-opening-inventories-when-frozen.patch similarity index 62% rename from Spigot-Server-Patches/0442-Prevent-opening-inventories-when-frozen.patch rename to Spigot-Server-Patches/0443-Prevent-opening-inventories-when-frozen.patch index 3629089a6f..cbd789508f 100644 --- a/Spigot-Server-Patches/0442-Prevent-opening-inventories-when-frozen.patch +++ b/Spigot-Server-Patches/0443-Prevent-opening-inventories-when-frozen.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Prevent opening inventories when frozen diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 67eaac661a03742051e63551e6f18e1475a19e99..18f50189032b710dbdd4e81b079b57b48db49630 100644 +index 950a16e8aafe71b54b4ba46b61b5d71f8aa3cf94..a417971c0cd6e381078d5ed41508ac102ad2472a 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -428,7 +428,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -431,7 +431,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { containerUpdateDelay = world.paperConfig.containerUpdateTickRate; } // Paper end @@ -17,7 +17,7 @@ index 67eaac661a03742051e63551e6f18e1475a19e99..18f50189032b710dbdd4e81b079b57b4 this.closeInventory(org.bukkit.event.inventory.InventoryCloseEvent.Reason.CANT_USE); // Paper this.activeContainer = this.defaultContainer; } -@@ -1273,7 +1273,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1270,7 +1270,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } else { // CraftBukkit start this.activeContainer = container; @@ -26,7 +26,7 @@ index 67eaac661a03742051e63551e6f18e1475a19e99..18f50189032b710dbdd4e81b079b57b4 // CraftBukkit end container.addSlotListener(this); return OptionalInt.of(this.containerCounter); -@@ -2069,7 +2069,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -2071,7 +2071,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } @Override @@ -36,24 +36,24 @@ index 67eaac661a03742051e63551e6f18e1475a19e99..18f50189032b710dbdd4e81b079b57b4 } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -index 08955d127859785bad49139c7f211f0ce7ea62ed..5f77989ce1e0d2289e63960453b9b28443592103 100644 +index 38c0d54fcb084bb102ee004cc8987c8358b5a2ac..c6564ccfd6580ac5691dd864602eb6fbaf4a34be 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -@@ -318,7 +318,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -322,7 +322,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { + if (adventure$title == null) adventure$title = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(container.getBukkitView().getTitle()); // Paper - String title = container.getBukkitView().getTitle(); - -- player.playerConnection.sendPacket(new PacketPlayOutOpenWindow(container.windowId, windowType, CraftChatMessage.fromString(title)[0])); -+ if (!player.isFrozen()) player.playerConnection.sendPacket(new PacketPlayOutOpenWindow(container.windowId, windowType, CraftChatMessage.fromString(title)[0])); // Paper + //player.playerConnection.sendPacket(new PacketPlayOutOpenWindow(container.windowId, windowType, CraftChatMessage.fromString(title)[0])); // Paper // Paper - comment +- player.playerConnection.sendPacket(new PacketPlayOutOpenWindow(container.windowId, windowType, io.papermc.paper.adventure.PaperAdventure.asVanilla(adventure$title))); // Paper ++ if (!player.isFrozen()) player.playerConnection.sendPacket(new PacketPlayOutOpenWindow(container.windowId, windowType, io.papermc.paper.adventure.PaperAdventure.asVanilla(adventure$title))); // Paper getHandle().activeContainer = container; getHandle().activeContainer.addSlotListener(player); } -@@ -388,7 +388,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { - // Now open the window - Containers windowType = CraftContainer.getNotchInventoryType(inventory.getTopInventory()); - String title = inventory.getTitle(); -- player.playerConnection.sendPacket(new PacketPlayOutOpenWindow(container.windowId, windowType, CraftChatMessage.fromString(title)[0])); -+ if (!player.isFrozen()) player.playerConnection.sendPacket(new PacketPlayOutOpenWindow(container.windowId, windowType, CraftChatMessage.fromString(title)[0])); // Paper +@@ -396,7 +396,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { + net.kyori.adventure.text.Component adventure$title = inventory.title(); // Paper + if (adventure$title == null) adventure$title = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(inventory.getTitle()); // Paper + //player.playerConnection.sendPacket(new PacketPlayOutOpenWindow(container.windowId, windowType, CraftChatMessage.fromString(title)[0])); // Paper - comment +- player.playerConnection.sendPacket(new PacketPlayOutOpenWindow(container.windowId, windowType, io.papermc.paper.adventure.PaperAdventure.asVanilla(adventure$title))); // Paper ++ if (!player.isFrozen()) player.playerConnection.sendPacket(new PacketPlayOutOpenWindow(container.windowId, windowType, io.papermc.paper.adventure.PaperAdventure.asVanilla(adventure$title))); // Paper player.activeContainer = container; player.activeContainer.addSlotListener(player); } diff --git a/Spigot-Server-Patches/0443-Optimise-ArraySetSorted-removeIf.patch b/Spigot-Server-Patches/0444-Optimise-ArraySetSorted-removeIf.patch similarity index 100% rename from Spigot-Server-Patches/0443-Optimise-ArraySetSorted-removeIf.patch rename to Spigot-Server-Patches/0444-Optimise-ArraySetSorted-removeIf.patch diff --git a/Spigot-Server-Patches/0444-Don-t-run-entity-collision-code-if-not-needed.patch b/Spigot-Server-Patches/0445-Don-t-run-entity-collision-code-if-not-needed.patch similarity index 100% rename from Spigot-Server-Patches/0444-Don-t-run-entity-collision-code-if-not-needed.patch rename to Spigot-Server-Patches/0445-Don-t-run-entity-collision-code-if-not-needed.patch diff --git a/Spigot-Server-Patches/0445-Optimize-ChunkProviderServer-s-chunk-level-checking-.patch b/Spigot-Server-Patches/0446-Optimize-ChunkProviderServer-s-chunk-level-checking-.patch similarity index 94% rename from Spigot-Server-Patches/0445-Optimize-ChunkProviderServer-s-chunk-level-checking-.patch rename to Spigot-Server-Patches/0446-Optimize-ChunkProviderServer-s-chunk-level-checking-.patch index f88136b208..4a101e9eaa 100644 --- a/Spigot-Server-Patches/0445-Optimize-ChunkProviderServer-s-chunk-level-checking-.patch +++ b/Spigot-Server-Patches/0446-Optimize-ChunkProviderServer-s-chunk-level-checking-.patch @@ -9,10 +9,10 @@ so inline where possible, and avoid the abstraction of the Either class. diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 1f63cdd9588a8dda1f04154f4d9de21fd8224678..174fc04e8cf5bd481b2f3d4e07031dab9ae66d86 100644 +index cc7691a2ed5eaa30071ad5e385bbd76bec3c3d80..106a0e3b7bf3ee563b45a67db25a07114da2cf42 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -618,21 +618,29 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -610,21 +610,29 @@ public class ChunkProviderServer extends IChunkProvider { public final boolean isInEntityTickingChunk(Entity entity) { return this.a(entity); } // Paper - OBFHELPER @Override public boolean a(Entity entity) { diff --git a/Spigot-Server-Patches/0446-Restrict-vanilla-teleport-command-to-valid-locations.patch b/Spigot-Server-Patches/0447-Restrict-vanilla-teleport-command-to-valid-locations.patch similarity index 100% rename from Spigot-Server-Patches/0446-Restrict-vanilla-teleport-command-to-valid-locations.patch rename to Spigot-Server-Patches/0447-Restrict-vanilla-teleport-command-to-valid-locations.patch diff --git a/Spigot-Server-Patches/0447-Implement-Player-Client-Options-API.patch b/Spigot-Server-Patches/0448-Implement-Player-Client-Options-API.patch similarity index 94% rename from Spigot-Server-Patches/0447-Implement-Player-Client-Options-API.patch rename to Spigot-Server-Patches/0448-Implement-Player-Client-Options-API.patch index 05c24bfc70..03c891b1a2 100644 --- a/Spigot-Server-Patches/0447-Implement-Player-Client-Options-API.patch +++ b/Spigot-Server-Patches/0448-Implement-Player-Client-Options-API.patch @@ -98,7 +98,7 @@ index 5a7475c2ce72f1a77ae757ee5c77ab4983a150f7..59b00c78f8d92bcceca35d0f25e4d94b protected static final DataWatcherObject bk = DataWatcher.a(EntityHuman.class, DataWatcherRegistry.p); protected static final DataWatcherObject bl = DataWatcher.a(EntityHuman.class, DataWatcherRegistry.p); diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 18f50189032b710dbdd4e81b079b57b48db49630..caccc482bb230cc6c64a9ef9cd3e8549e3de3212 100644 +index a417971c0cd6e381078d5ed41508ac102ad2472a..f83a0855b7b26b3a804c15afdd69fc3d76f414c9 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -2,6 +2,7 @@ package net.minecraft.server; @@ -109,7 +109,7 @@ index 18f50189032b710dbdd4e81b079b57b48db49630..caccc482bb230cc6c64a9ef9cd3e8549 import com.mojang.authlib.GameProfile; import com.mojang.datafixers.util.Either; import com.mojang.serialization.DataResult; -@@ -61,7 +62,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -62,7 +63,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { public int lastSentExp = -99999999; public int invulnerableTicks = 60; private EnumChatVisibility bY; @@ -118,9 +118,9 @@ index 18f50189032b710dbdd4e81b079b57b48db49630..caccc482bb230cc6c64a9ef9cd3e8549 private long ca = SystemUtils.getMonotonicMillis(); private Entity spectatedEntity; public boolean worldChangeInvuln; -@@ -1674,6 +1675,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { - - public String locale = null; // CraftBukkit - lowercase // Paper - default to null +@@ -1672,6 +1673,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { + public String locale = null; // CraftBukkit - add, lowercase // Paper - default to null + public java.util.Locale adventure$locale = java.util.Locale.US; // Paper public void a(PacketPlayInSettings packetplayinsettings) { + new PlayerClientOptionsChangeEvent(getBukkitEntity(), packetplayinsettings.locale, packetplayinsettings.viewDistance, com.destroystokyo.paper.ClientOption.ChatVisibility.valueOf(packetplayinsettings.getChatVisibility().name()), packetplayinsettings.hasChatColorsEnabled(), new com.destroystokyo.paper.PaperSkinParts(packetplayinsettings.getSkinParts()), packetplayinsettings.getMainHand() == EnumMainHand.LEFT ? MainHand.LEFT : MainHand.RIGHT).callEvent(); // Paper - settings event // CraftBukkit start @@ -149,7 +149,7 @@ index dbc3552d50c4129e1844c8a379ab5ba396645f52..87ec3987d4b6de836016e91ef90383e3 return this.e; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 687df7dd3ac33d8f331ae141782859b80b08a6ff..6d7e6d7b9df864057030322e25110647dbff56ab 100644 +index 655a8e18ad84b0a1f62cb0f4f740740886fb8cb7..17e3d62ca51f1bb39559fc2293ae6a67b3b8122d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1,5 +1,8 @@ @@ -161,7 +161,7 @@ index 687df7dd3ac33d8f331ae141782859b80b08a6ff..6d7e6d7b9df864057030322e25110647 import com.destroystokyo.paper.Title; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableSet; -@@ -2056,6 +2059,24 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2261,6 +2264,24 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public void setViewDistance(int viewDistance) { throw new NotImplementedException("Per-Player View Distance APIs need further understanding to properly implement (There are per world view distances though!)"); // TODO } diff --git a/Spigot-Server-Patches/0448-Fix-Chunk-Post-Processing-deadlock-risk.patch b/Spigot-Server-Patches/0449-Fix-Chunk-Post-Processing-deadlock-risk.patch similarity index 95% rename from Spigot-Server-Patches/0448-Fix-Chunk-Post-Processing-deadlock-risk.patch rename to Spigot-Server-Patches/0449-Fix-Chunk-Post-Processing-deadlock-risk.patch index 4f7d805a7c..173bccbbbf 100644 --- a/Spigot-Server-Patches/0448-Fix-Chunk-Post-Processing-deadlock-risk.patch +++ b/Spigot-Server-Patches/0449-Fix-Chunk-Post-Processing-deadlock-risk.patch @@ -25,10 +25,10 @@ This successfully fixed a reoccurring and highly reproduceable crash for heightmaps. diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 174fc04e8cf5bd481b2f3d4e07031dab9ae66d86..75500aaae0dc44f0da3b4d5ed94da6fef9f96c38 100644 +index 106a0e3b7bf3ee563b45a67db25a07114da2cf42..f7355ca6d75c783b663b027efc2ccf6c07e6191d 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -994,6 +994,7 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -986,6 +986,7 @@ public class ChunkProviderServer extends IChunkProvider { return super.executeNext() || execChunkTask; // Paper } } finally { diff --git a/Spigot-Server-Patches/0450-Broadcast-join-message-to-console.patch b/Spigot-Server-Patches/0450-Broadcast-join-message-to-console.patch deleted file mode 100644 index ad85eddda0..0000000000 --- a/Spigot-Server-Patches/0450-Broadcast-join-message-to-console.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: AvrooVulcan -Date: Fri, 17 Apr 2020 00:15:23 +0100 -Subject: [PATCH] Broadcast join message to console - - -diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index fbd0ecb7bee67bf5affb6be6a57a8a0a8e2686b3..ad6977db5aefb547a9f9db6258c3b18da8ca509f 100644 ---- a/src/main/java/net/minecraft/server/PlayerList.java -+++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -211,9 +211,9 @@ public abstract class PlayerList { - joinMessage = playerJoinEvent.getJoinMessage(); - - if (joinMessage != null && joinMessage.length() > 0) { -- for (IChatBaseComponent line : org.bukkit.craftbukkit.util.CraftChatMessage.fromString(joinMessage)) { -- server.getPlayerList().sendAll(new PacketPlayOutChat(line, ChatMessageType.SYSTEM, SystemUtils.b)); -- } -+ // Paper start - Removed sendAll for loop and broadcasted to console also -+ server.getPlayerList().sendMessage(CraftChatMessage.fromString(joinMessage)); -+ // Paper end - } - // CraftBukkit end - diff --git a/Spigot-Server-Patches/0449-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch b/Spigot-Server-Patches/0450-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch similarity index 82% rename from Spigot-Server-Patches/0449-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch rename to Spigot-Server-Patches/0450-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch index 7fde62fb0c..e52d3ea2bf 100644 --- a/Spigot-Server-Patches/0449-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch +++ b/Spigot-Server-Patches/0450-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch @@ -7,12 +7,12 @@ Subject: [PATCH] Don't crash if player is attempted to be removed from I suspect it deals with teleporting as it uses players current x/y/z diff --git a/src/main/java/net/minecraft/server/ChunkMapDistance.java b/src/main/java/net/minecraft/server/ChunkMapDistance.java -index 706ef10959df897a4b1889c2e2e7ff41ed924876..52a69edcefb72a3908ecd522ef87e7eb989467a6 100644 +index d15bf949671c9a533573278d573376282bfed8c8..275c2b23b4d1ff09ee2b1823d0780700f773659e 100644 --- a/src/main/java/net/minecraft/server/ChunkMapDistance.java +++ b/src/main/java/net/minecraft/server/ChunkMapDistance.java -@@ -239,8 +239,8 @@ public abstract class ChunkMapDistance { +@@ -238,8 +238,8 @@ public abstract class ChunkMapDistance { + long i = sectionposition.r().pair(); ObjectSet objectset = (ObjectSet) this.c.get(i); - if (objectset == null) return; // CraftBukkit - SPIGOT-6208 - objectset.remove(entityplayer); - if (objectset.isEmpty()) { diff --git a/Spigot-Server-Patches/0451-Broadcast-join-message-to-console.patch b/Spigot-Server-Patches/0451-Broadcast-join-message-to-console.patch new file mode 100644 index 0000000000..40221c6c9a --- /dev/null +++ b/Spigot-Server-Patches/0451-Broadcast-join-message-to-console.patch @@ -0,0 +1,21 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: AvrooVulcan +Date: Fri, 17 Apr 2020 00:15:23 +0100 +Subject: [PATCH] Broadcast join message to console + + +diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java +index a37e0330f95c00cc50b70ebbd6381c4acd671ed6..678c4d112a431148603144ff4210e101b989e4f0 100644 +--- a/src/main/java/net/minecraft/server/PlayerList.java ++++ b/src/main/java/net/minecraft/server/PlayerList.java +@@ -213,7 +213,9 @@ public abstract class PlayerList { + joinMessage = PaperAdventure.asVanilla(playerJoinEvent.joinMessage()); // Paper - Adventure + + if (playerJoinEvent.joinMessage() != net.kyori.adventure.text.Component.empty()) { // Paper - Adventure +- server.getPlayerList().sendAll(new PacketPlayOutChat(joinMessage, ChatMessageType.SYSTEM, SystemUtils.b)); // Paper - Adventure ++ // Paper start - Removed sendAll for loop and broadcasted to console also ++ server.getPlayerList().sendMessage(joinMessage); // Paper - Adventure ++ // Paper end + } + // CraftBukkit end + diff --git a/Spigot-Server-Patches/0451-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch b/Spigot-Server-Patches/0452-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch similarity index 88% rename from Spigot-Server-Patches/0451-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch rename to Spigot-Server-Patches/0452-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch index 780d8df5a6..c813599a4e 100644 --- a/Spigot-Server-Patches/0451-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch +++ b/Spigot-Server-Patches/0452-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch @@ -28,10 +28,10 @@ receives a deterministic result, and should no longer require 1 tick delays anymore. diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index caccc482bb230cc6c64a9ef9cd3e8549e3de3212..c2682a4c654ef788439c6d9fc8bfa841ed61fecf 100644 +index f83a0855b7b26b3a804c15afdd69fc3d76f414c9..03f13cc10de79137c1e186a4207ad6cc7d68c843 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -109,6 +109,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -111,6 +111,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { public double maxHealthCache; public boolean joining = true; public boolean sentListPacket = false; @@ -52,10 +52,10 @@ index 33e0a93917e67860704e08e639cca1dbdf3b2708..de9355914ec1dd4f2e5c3a9d9de881c9 if (!(entity instanceof EntityComplexPart)) { EntityTypes entitytypes = entity.getEntityType(); diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index ad6977db5aefb547a9f9db6258c3b18da8ca509f..791f40552f96fc597342345845bebd86184fa319 100644 +index 678c4d112a431148603144ff4210e101b989e4f0..69c8d2d57270bf4cff2d0678ebf4a4d4bc83ab4c 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -200,6 +200,12 @@ public abstract class PlayerList { +@@ -202,6 +202,12 @@ public abstract class PlayerList { this.j.put(entityplayer.getUniqueID(), entityplayer); // this.sendAll(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER, new EntityPlayer[]{entityplayer})); // CraftBukkit - replaced with loop below @@ -66,9 +66,9 @@ index ad6977db5aefb547a9f9db6258c3b18da8ca509f..791f40552f96fc597342345845bebd86 + mountSavedVehicle(entityplayer, worldserver1, nbttagcompound); + // Paper end // CraftBukkit start - PlayerJoinEvent playerJoinEvent = new PlayerJoinEvent(cserver.getPlayer(entityplayer), joinMessage); + PlayerJoinEvent playerJoinEvent = new org.bukkit.event.player.PlayerJoinEvent(cserver.getPlayer(entityplayer), PaperAdventure.asAdventure(chatmessage)); // Paper - Adventure cserver.getPluginManager().callEvent(playerJoinEvent); -@@ -234,6 +240,8 @@ public abstract class PlayerList { +@@ -236,6 +242,8 @@ public abstract class PlayerList { entityplayer.playerConnection.sendPacket(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER, new EntityPlayer[] { entityplayer1})); } entityplayer.sentListPacket = true; @@ -77,7 +77,7 @@ index ad6977db5aefb547a9f9db6258c3b18da8ca509f..791f40552f96fc597342345845bebd86 // CraftBukkit end entityplayer.playerConnection.sendPacket(new PacketPlayOutEntityMetadata(entityplayer.getId(), entityplayer.datawatcher, true)); // CraftBukkit - BungeeCord#2321, send complete data to self on spawn -@@ -259,6 +267,11 @@ public abstract class PlayerList { +@@ -261,6 +269,11 @@ public abstract class PlayerList { playerconnection.sendPacket(new PacketPlayOutEntityEffect(entityplayer.getId(), mobeffect)); } @@ -89,7 +89,7 @@ index ad6977db5aefb547a9f9db6258c3b18da8ca509f..791f40552f96fc597342345845bebd86 if (nbttagcompound != null && nbttagcompound.hasKeyOfType("RootVehicle", 10)) { NBTTagCompound nbttagcompound1 = nbttagcompound.getCompound("RootVehicle"); // CraftBukkit start -@@ -307,6 +320,10 @@ public abstract class PlayerList { +@@ -309,6 +322,10 @@ public abstract class PlayerList { } } diff --git a/Spigot-Server-Patches/0452-Load-Chunks-for-Login-Asynchronously.patch b/Spigot-Server-Patches/0453-Load-Chunks-for-Login-Asynchronously.patch similarity index 87% rename from Spigot-Server-Patches/0452-Load-Chunks-for-Login-Asynchronously.patch rename to Spigot-Server-Patches/0453-Load-Chunks-for-Login-Asynchronously.patch index ae79e0e186..2371316689 100644 --- a/Spigot-Server-Patches/0452-Load-Chunks-for-Login-Asynchronously.patch +++ b/Spigot-Server-Patches/0453-Load-Chunks-for-Login-Asynchronously.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Load Chunks for Login Asynchronously diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 75500aaae0dc44f0da3b4d5ed94da6fef9f96c38..322d0a7d127878ba49362454808b82172acf1600 100644 +index f7355ca6d75c783b663b027efc2ccf6c07e6191d..6bcca8f1ddfd4886b6795a1856ec196e8aa61299 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -604,7 +604,7 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -596,7 +596,7 @@ public class ChunkProviderServer extends IChunkProvider { return this.serverThreadQueue.executeNext(); } @@ -18,7 +18,7 @@ index 75500aaae0dc44f0da3b4d5ed94da6fef9f96c38..322d0a7d127878ba49362454808b8217 boolean flag1 = this.playerChunkMap.b(); diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 7da08dd7c2396ae1048d857bfae4fee2a9f3b4d9..1ed26fa55b149e3717cf190abde8f865a4c076eb 100644 +index 3dc33c26150af672df19e3f78572e74ce65bdc79..9fa4425dc0e308f3cce06cb8ca5b02a08e505176 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -1283,7 +1283,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -31,10 +31,10 @@ index 7da08dd7c2396ae1048d857bfae4fee2a9f3b4d9..1ed26fa55b149e3717cf190abde8f865 public void d(Vec3D vec3d) { diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index c2682a4c654ef788439c6d9fc8bfa841ed61fecf..8a6f9c8629635fe6015ac65348b54bd37683f46e 100644 +index 03f13cc10de79137c1e186a4207ad6cc7d68c843..e364576955ce033f732bc9348ab653c5db71487f 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -45,6 +45,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -46,6 +46,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { private static final Logger LOGGER = LogManager.getLogger(); public PlayerConnection playerConnection; @@ -42,7 +42,7 @@ index c2682a4c654ef788439c6d9fc8bfa841ed61fecf..8a6f9c8629635fe6015ac65348b54bd3 public final MinecraftServer server; public final PlayerInteractManager playerInteractManager; public final Deque removeQueue = new ArrayDeque<>(); // Paper -@@ -110,6 +111,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -112,6 +113,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { public boolean joining = true; public boolean sentListPacket = false; public boolean supressTrackerForLogin = false; // Paper @@ -51,10 +51,10 @@ index c2682a4c654ef788439c6d9fc8bfa841ed61fecf..8a6f9c8629635fe6015ac65348b54bd3 // CraftBukkit end public PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java -index 0b1baeab3075a741519c6875f7b4847ce6cad8fc..efb59a7409902aa3c4bf95337683346ae82a52fb 100644 +index e5790c2aeaa380a3acc26434f5de78ac746c6d57..bdd4766976902e11411728e6faa93b7e43a7ba22 100644 --- a/src/main/java/net/minecraft/server/LoginListener.java +++ b/src/main/java/net/minecraft/server/LoginListener.java -@@ -67,7 +67,7 @@ public class LoginListener implements PacketLoginInListener { +@@ -68,7 +68,7 @@ public class LoginListener implements PacketLoginInListener { } // Paper end } else if (this.g == LoginListener.EnumProtocolState.DELAY_ACCEPT) { @@ -63,7 +63,7 @@ index 0b1baeab3075a741519c6875f7b4847ce6cad8fc..efb59a7409902aa3c4bf95337683346a if (entityplayer == null) { this.g = LoginListener.EnumProtocolState.READY_TO_ACCEPT; -@@ -166,7 +166,7 @@ public class LoginListener implements PacketLoginInListener { +@@ -167,7 +167,7 @@ public class LoginListener implements PacketLoginInListener { } this.networkManager.sendPacket(new PacketLoginOutSuccess(this.i)); @@ -73,10 +73,10 @@ index 0b1baeab3075a741519c6875f7b4847ce6cad8fc..efb59a7409902aa3c4bf95337683346a if (entityplayer != null) { this.g = LoginListener.EnumProtocolState.DELAY_ACCEPT; diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 46815f388a785009a103e8a726ca85e30a5d55e1..76236c6d0b9decd0b0fa708940443036bfe7af3f 100644 +index 5b42d6ff29dfd7415a8b89b36e8522ab4f5494ca..bce167086d12b8b9b955a885ce86b33efa064a3c 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -74,6 +74,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -76,6 +76,7 @@ public class PlayerConnection implements PacketListenerPlayIn { private static final Logger LOGGER = LogManager.getLogger(); public final NetworkManager networkManager; private final MinecraftServer minecraftServer; @@ -84,7 +84,7 @@ index 46815f388a785009a103e8a726ca85e30a5d55e1..76236c6d0b9decd0b0fa708940443036 public EntityPlayer player; private int e; private long lastKeepAlive = SystemUtils.getMonotonicMillis(); private void setLastPing(long lastPing) { this.lastKeepAlive = lastPing;}; private long getLastPing() { return this.lastKeepAlive;}; // Paper - OBFHELPER -@@ -152,6 +153,15 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -154,6 +155,15 @@ public class PlayerConnection implements PacketListenerPlayIn { // CraftBukkit end public void tick() { @@ -100,7 +100,7 @@ index 46815f388a785009a103e8a726ca85e30a5d55e1..76236c6d0b9decd0b0fa708940443036 this.syncPosition(); this.player.lastX = this.player.locX(); this.player.lastY = this.player.locY(); -@@ -193,7 +203,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -195,7 +205,7 @@ public class PlayerConnection implements PacketListenerPlayIn { this.r = null; this.D = false; this.E = 0; @@ -110,10 +110,10 @@ index 46815f388a785009a103e8a726ca85e30a5d55e1..76236c6d0b9decd0b0fa708940443036 this.minecraftServer.getMethodProfiler().enter("keepAlive"); // Paper Start - give clients a longer time to respond to pings as per pre 1.12.2 timings diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 791f40552f96fc597342345845bebd86184fa319..0f46aac9d021dc115718b1e36b8fbe28cbc820c6 100644 +index 69c8d2d57270bf4cff2d0678ebf4a4d4bc83ab4c..dce3ec8c9cb0ebbf1c2a87cb3225fca95f120314 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -54,11 +54,12 @@ public abstract class PlayerList { +@@ -56,11 +56,12 @@ public abstract class PlayerList { private static final SimpleDateFormat g = new SimpleDateFormat("yyyy-MM-dd 'at' HH:mm:ss z"); private final MinecraftServer server; public final List players = new java.util.concurrent.CopyOnWriteArrayList(); // CraftBukkit - ArrayList -> CopyOnWriteArrayList: Iterator safety @@ -127,7 +127,7 @@ index 791f40552f96fc597342345845bebd86184fa319..0f46aac9d021dc115718b1e36b8fbe28 // CraftBukkit start // private final Map o; // private final Map p; -@@ -97,6 +98,11 @@ public abstract class PlayerList { +@@ -99,6 +100,11 @@ public abstract class PlayerList { } public void a(NetworkManager networkmanager, EntityPlayer entityplayer) { @@ -139,7 +139,7 @@ index 791f40552f96fc597342345845bebd86184fa319..0f46aac9d021dc115718b1e36b8fbe28 entityplayer.loginTime = System.currentTimeMillis(); // Paper GameProfile gameprofile = entityplayer.getProfile(); UserCache usercache = this.server.getUserCache(); -@@ -110,7 +116,7 @@ public abstract class PlayerList { +@@ -112,7 +118,7 @@ public abstract class PlayerList { if (nbttagcompound != null && nbttagcompound.hasKey("bukkit")) { NBTTagCompound bukkit = nbttagcompound.getCompound("bukkit"); s = bukkit.hasKeyOfType("lastKnownName", 8) ? bukkit.getString("lastKnownName") : s; @@ -148,7 +148,7 @@ index 791f40552f96fc597342345845bebd86184fa319..0f46aac9d021dc115718b1e36b8fbe28 // CraftBukkit end if (nbttagcompound != null) { -@@ -183,6 +189,51 @@ public abstract class PlayerList { +@@ -185,6 +191,51 @@ public abstract class PlayerList { entityplayer.getRecipeBook().a(entityplayer); this.sendScoreboard(worldserver1.getScoreboard(), entityplayer); this.server.invalidatePingSample(); @@ -200,7 +200,7 @@ index 791f40552f96fc597342345845bebd86184fa319..0f46aac9d021dc115718b1e36b8fbe28 ChatMessage chatmessage; if (entityplayer.getProfile().getName().equalsIgnoreCase(s)) { -@@ -419,6 +470,7 @@ public abstract class PlayerList { +@@ -421,6 +472,7 @@ public abstract class PlayerList { protected void savePlayerFile(EntityPlayer entityplayer) { if (!entityplayer.getBukkitEntity().isPersistent()) return; // CraftBukkit @@ -208,16 +208,16 @@ index 791f40552f96fc597342345845bebd86184fa319..0f46aac9d021dc115718b1e36b8fbe28 this.playerFileData.save(entityplayer); ServerStatisticManager serverstatisticmanager = (ServerStatisticManager) entityplayer.getStatisticManager(); // CraftBukkit -@@ -446,7 +498,7 @@ public abstract class PlayerList { +@@ -448,7 +500,7 @@ public abstract class PlayerList { } - PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(cserver.getPlayer(entityplayer), "\u00A7e" + entityplayer.getName() + " left the game"); + PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(cserver.getPlayer(entityplayer), net.kyori.adventure.text.Component.translatable("multiplayer.player.left", net.kyori.adventure.text.format.NamedTextColor.YELLOW)); - cserver.getPluginManager().callEvent(playerQuitEvent); + if (entityplayer.didPlayerJoinEvent) cserver.getPluginManager().callEvent(playerQuitEvent); // Paper - if we disconnected before join ever fired, don't fire quit entityplayer.getBukkitEntity().disconnect(playerQuitEvent.getQuitMessage()); if (server.isMainThread()) entityplayer.playerTick(); // SPIGOT-924 // Paper - don't tick during emergency shutdowns (Watchdog) -@@ -499,6 +551,13 @@ public abstract class PlayerList { +@@ -501,6 +553,13 @@ public abstract class PlayerList { // this.p.remove(uuid); // CraftBukkit end } @@ -231,16 +231,16 @@ index 791f40552f96fc597342345845bebd86184fa319..0f46aac9d021dc115718b1e36b8fbe28 // CraftBukkit start // this.sendAll(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.REMOVE_PLAYER, new EntityPlayer[]{entityplayer})); -@@ -516,7 +575,7 @@ public abstract class PlayerList { +@@ -518,7 +577,7 @@ public abstract class PlayerList { cserver.getScoreboardManager().removePlayer(entityplayer.getBukkitEntity()); // CraftBukkit end -- return playerQuitEvent.getQuitMessage(); // CraftBukkit -+ return entityplayer.didPlayerJoinEvent ? playerQuitEvent.getQuitMessage() : null; // CraftBukkit // Paper - don't print quit if we never printed join +- return playerQuitEvent.quitMessage(); // Paper - Adventure ++ return entityplayer.didPlayerJoinEvent ? playerQuitEvent.quitMessage() : null; // CraftBukkit // Paper - Adventure // Paper - don't print quit if we never printed join } // CraftBukkit start - Whole method, SocketAddress to LoginListener, added hostname to signature, return EntityPlayer -@@ -535,6 +594,13 @@ public abstract class PlayerList { +@@ -537,6 +596,13 @@ public abstract class PlayerList { list.add(entityplayer); } } diff --git a/Spigot-Server-Patches/0453-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch b/Spigot-Server-Patches/0454-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch similarity index 93% rename from Spigot-Server-Patches/0453-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch rename to Spigot-Server-Patches/0454-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch index 5e692e08f7..81231cc508 100644 --- a/Spigot-Server-Patches/0453-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch +++ b/Spigot-Server-Patches/0454-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch @@ -7,7 +7,7 @@ The code following this has better support for null worlds to move them back to the world spawn. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 1ed26fa55b149e3717cf190abde8f865a4c076eb..e4422d7cd70410e50ee9e86d3c832f7df65197df 100644 +index 9fa4425dc0e308f3cce06cb8ca5b02a08e505176..d88470e6dc0316d0a5f5a50a9644d71aedadee6e 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -1719,9 +1719,11 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/0454-Add-PlayerAttackEntityCooldownResetEvent.patch b/Spigot-Server-Patches/0455-Add-PlayerAttackEntityCooldownResetEvent.patch similarity index 100% rename from Spigot-Server-Patches/0454-Add-PlayerAttackEntityCooldownResetEvent.patch rename to Spigot-Server-Patches/0455-Add-PlayerAttackEntityCooldownResetEvent.patch diff --git a/Spigot-Server-Patches/0455-Allow-multiple-callbacks-to-schedule-for-Callback-Ex.patch b/Spigot-Server-Patches/0456-Allow-multiple-callbacks-to-schedule-for-Callback-Ex.patch similarity index 100% rename from Spigot-Server-Patches/0455-Allow-multiple-callbacks-to-schedule-for-Callback-Ex.patch rename to Spigot-Server-Patches/0456-Allow-multiple-callbacks-to-schedule-for-Callback-Ex.patch diff --git a/Spigot-Server-Patches/0456-Don-t-fire-BlockFade-on-worldgen-threads.patch b/Spigot-Server-Patches/0457-Don-t-fire-BlockFade-on-worldgen-threads.patch similarity index 100% rename from Spigot-Server-Patches/0456-Don-t-fire-BlockFade-on-worldgen-threads.patch rename to Spigot-Server-Patches/0457-Don-t-fire-BlockFade-on-worldgen-threads.patch diff --git a/Spigot-Server-Patches/0457-Add-phantom-creative-and-insomniac-controls.patch b/Spigot-Server-Patches/0458-Add-phantom-creative-and-insomniac-controls.patch similarity index 100% rename from Spigot-Server-Patches/0457-Add-phantom-creative-and-insomniac-controls.patch rename to Spigot-Server-Patches/0458-Add-phantom-creative-and-insomniac-controls.patch diff --git a/Spigot-Server-Patches/0458-Fix-numerous-item-duplication-issues-and-teleport-is.patch b/Spigot-Server-Patches/0459-Fix-numerous-item-duplication-issues-and-teleport-is.patch similarity index 96% rename from Spigot-Server-Patches/0458-Fix-numerous-item-duplication-issues-and-teleport-is.patch rename to Spigot-Server-Patches/0459-Fix-numerous-item-duplication-issues-and-teleport-is.patch index f0d164f9d2..3ef386eda7 100644 --- a/Spigot-Server-Patches/0458-Fix-numerous-item-duplication-issues-and-teleport-is.patch +++ b/Spigot-Server-Patches/0459-Fix-numerous-item-duplication-issues-and-teleport-is.patch @@ -16,7 +16,7 @@ So even if something NEW comes up, it would be impossible to drop the same item twice because the source was destroyed. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index e4422d7cd70410e50ee9e86d3c832f7df65197df..894ef285638acbae9b340bd6e4511e7143c6999d 100644 +index d88470e6dc0316d0a5f5a50a9644d71aedadee6e..273f9c19768916a86968e02e653754c55317e663 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -1880,11 +1880,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -102,10 +102,10 @@ index cd50fe3616d4b33c7ad76458fb75683541c33ae5..97425f38ac05c24433dc27c5cda74c36 } } diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index a4c80ebc49ba3b9ac244f64e10448ebc90932795..44cf5fe48650790b3372e9ebbb0b5d6c4b997f62 100644 +index 6234baf6abea43cd054630fb029f0cd40350c723..661f66f4ba2273c4c88c38de431543a1e2d7fa0a 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -803,7 +803,8 @@ public class CraftEventFactory { +@@ -809,7 +809,8 @@ public class CraftEventFactory { for (org.bukkit.inventory.ItemStack stack : event.getDrops()) { if (stack == null || stack.getType() == Material.AIR || stack.getAmount() == 0) continue; diff --git a/Spigot-Server-Patches/0459-Implement-Brigadier-Mojang-API.patch b/Spigot-Server-Patches/0460-Implement-Brigadier-Mojang-API.patch similarity index 98% rename from Spigot-Server-Patches/0459-Implement-Brigadier-Mojang-API.patch rename to Spigot-Server-Patches/0460-Implement-Brigadier-Mojang-API.patch index ce9995e281..38197d1dda 100644 --- a/Spigot-Server-Patches/0459-Implement-Brigadier-Mojang-API.patch +++ b/Spigot-Server-Patches/0460-Implement-Brigadier-Mojang-API.patch @@ -69,7 +69,7 @@ index 54a1988341a4a6e80ab40624280b7c92532d5db6..7073d697a5d35b9b72ea05d5608438ac public boolean hasPermission(int i) { // CraftBukkit start diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 76236c6d0b9decd0b0fa708940443036bfe7af3f..cb8230a06b4ff152d284d0bb65f40e4490bd5bfb 100644 +index bce167086d12b8b9b955a885ce86b33efa064a3c..fea5583126144287cfb2abd05208166bc7eeecdd 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -620,8 +620,12 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0460-Villager-Restocks-API.patch b/Spigot-Server-Patches/0461-Villager-Restocks-API.patch similarity index 96% rename from Spigot-Server-Patches/0460-Villager-Restocks-API.patch rename to Spigot-Server-Patches/0461-Villager-Restocks-API.patch index 2adc1a5fad..67acdc5819 100644 --- a/Spigot-Server-Patches/0460-Villager-Restocks-API.patch +++ b/Spigot-Server-Patches/0461-Villager-Restocks-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Villager Restocks API diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java -index 2ed6af09e97a087ffdd5e014564d9b49bda51b77..a5426eabb4c2458213f54ea66edc06714aa30c1f 100644 +index bb096fd5fa20aead7df0188ae294da9c813abace..1322a8f12484700c3d707b3d18ad90c059703530 100644 --- a/src/main/java/net/minecraft/server/EntityVillager.java +++ b/src/main/java/net/minecraft/server/EntityVillager.java @@ -44,7 +44,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation diff --git a/Spigot-Server-Patches/0461-Validate-PickItem-Packet-and-kick-for-invalid.patch b/Spigot-Server-Patches/0462-Validate-PickItem-Packet-and-kick-for-invalid.patch similarity index 94% rename from Spigot-Server-Patches/0461-Validate-PickItem-Packet-and-kick-for-invalid.patch rename to Spigot-Server-Patches/0462-Validate-PickItem-Packet-and-kick-for-invalid.patch index 13f8afff9e..20d8c6b754 100644 --- a/Spigot-Server-Patches/0461-Validate-PickItem-Packet-and-kick-for-invalid.patch +++ b/Spigot-Server-Patches/0462-Validate-PickItem-Packet-and-kick-for-invalid.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Validate PickItem Packet and kick for invalid diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index cb8230a06b4ff152d284d0bb65f40e4490bd5bfb..952aa22b5c35852a8d394cf6814c4ab00c58e599 100644 +index fea5583126144287cfb2abd05208166bc7eeecdd..1570fc9490bfb776cfdfdf594d5b666563a3b342 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -733,7 +733,14 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0462-Expose-game-version.patch b/Spigot-Server-Patches/0463-Expose-game-version.patch similarity index 82% rename from Spigot-Server-Patches/0462-Expose-game-version.patch rename to Spigot-Server-Patches/0463-Expose-game-version.patch index bbc22637b0..a79faac0c9 100644 --- a/Spigot-Server-Patches/0462-Expose-game-version.patch +++ b/Spigot-Server-Patches/0463-Expose-game-version.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Expose game version diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 4f5fe1f10195b1e3b09bf8301750dc75687b318a..0c9d9364e4544107231dc23982bd7cb3cc2f0008 100644 +index 9cb68bc8be2256244e7908cf76183d11f3b1a58b..2d6637b6fc3286516224f8da0d4760433fb61a1b 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -518,6 +518,13 @@ public final class CraftServer implements Server { +@@ -519,6 +519,13 @@ public final class CraftServer implements Server { return bukkitVersion; } diff --git a/Spigot-Server-Patches/0463-Optimize-Voxel-Shape-Merging.patch b/Spigot-Server-Patches/0464-Optimize-Voxel-Shape-Merging.patch similarity index 100% rename from Spigot-Server-Patches/0463-Optimize-Voxel-Shape-Merging.patch rename to Spigot-Server-Patches/0464-Optimize-Voxel-Shape-Merging.patch diff --git a/Spigot-Server-Patches/0464-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch b/Spigot-Server-Patches/0465-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch similarity index 100% rename from Spigot-Server-Patches/0464-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch rename to Spigot-Server-Patches/0465-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch diff --git a/Spigot-Server-Patches/0465-Implement-Mob-Goal-API.patch b/Spigot-Server-Patches/0466-Implement-Mob-Goal-API.patch similarity index 99% rename from Spigot-Server-Patches/0465-Implement-Mob-Goal-API.patch rename to Spigot-Server-Patches/0466-Implement-Mob-Goal-API.patch index 68bcd9f750..392e8a9fea 100644 --- a/Spigot-Server-Patches/0465-Implement-Mob-Goal-API.patch +++ b/Spigot-Server-Patches/0466-Implement-Mob-Goal-API.patch @@ -873,10 +873,10 @@ index 22773eca7561d39cd838338efe6d40ab9421feba..2e56fcc32f914d2b5f4bb9d368f504f4 public PathfinderGoalWrapped(int i, PathfinderGoal pathfindergoal) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 0c9d9364e4544107231dc23982bd7cb3cc2f0008..4e5681a938bcea925a32ab6ec93610d9d64094a4 100644 +index 2d6637b6fc3286516224f8da0d4760433fb61a1b..8e691e594dd0b8fcd5e7fc83cf3562f0d17e18ce 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2327,5 +2327,11 @@ public final class CraftServer implements Server { +@@ -2384,5 +2384,11 @@ public final class CraftServer implements Server { public boolean isStopping() { return net.minecraft.server.MinecraftServer.getServer().hasStopped(); } diff --git a/Spigot-Server-Patches/0466-Use-distance-map-to-optimise-entity-tracker.patch b/Spigot-Server-Patches/0467-Use-distance-map-to-optimise-entity-tracker.patch similarity index 99% rename from Spigot-Server-Patches/0466-Use-distance-map-to-optimise-entity-tracker.patch rename to Spigot-Server-Patches/0467-Use-distance-map-to-optimise-entity-tracker.patch index ca61b3ef56..f8da5d5226 100644 --- a/Spigot-Server-Patches/0466-Use-distance-map-to-optimise-entity-tracker.patch +++ b/Spigot-Server-Patches/0467-Use-distance-map-to-optimise-entity-tracker.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Use distance map to optimise entity tracker Use the distance map to find candidate players for tracking. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 894ef285638acbae9b340bd6e4511e7143c6999d..53be44fad4db829359ee7541a08f438ebcf2bde1 100644 +index 273f9c19768916a86968e02e653754c55317e663..feeb792e3357c14662a2a2dc5c294befd4bdc7c3 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -206,6 +206,21 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/0467-Optimize-isOutsideRange-to-use-distance-maps.patch b/Spigot-Server-Patches/0468-Optimize-isOutsideRange-to-use-distance-maps.patch similarity index 96% rename from Spigot-Server-Patches/0467-Optimize-isOutsideRange-to-use-distance-maps.patch rename to Spigot-Server-Patches/0468-Optimize-isOutsideRange-to-use-distance-maps.patch index 584c955625..dbac4b7b10 100644 --- a/Spigot-Server-Patches/0467-Optimize-isOutsideRange-to-use-distance-maps.patch +++ b/Spigot-Server-Patches/0468-Optimize-isOutsideRange-to-use-distance-maps.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Optimize isOutsideRange to use distance maps Use a distance map to find the players in range quickly diff --git a/src/main/java/net/minecraft/server/ChunkMapDistance.java b/src/main/java/net/minecraft/server/ChunkMapDistance.java -index 52a69edcefb72a3908ecd522ef87e7eb989467a6..126eae36dc99c29b0d15be26bd68f00fe7e563fe 100644 +index 275c2b23b4d1ff09ee2b1823d0780700f773659e..ef61f8e784b7ebd26293d627e8b8e1aef1be6e21 100644 --- a/src/main/java/net/minecraft/server/ChunkMapDistance.java +++ b/src/main/java/net/minecraft/server/ChunkMapDistance.java @@ -31,7 +31,7 @@ public abstract class ChunkMapDistance { @@ -45,7 +45,7 @@ index 52a69edcefb72a3908ecd522ef87e7eb989467a6..126eae36dc99c29b0d15be26bd68f00f this.g.update(i, 0, true); } -@@ -242,7 +244,7 @@ public abstract class ChunkMapDistance { +@@ -241,7 +243,7 @@ public abstract class ChunkMapDistance { if (objectset != null) objectset.remove(entityplayer); // Paper - some state corruption happens here, don't crash, clean up gracefully. if (objectset == null || objectset.isEmpty()) { // Paper this.c.remove(i); @@ -54,7 +54,7 @@ index 52a69edcefb72a3908ecd522ef87e7eb989467a6..126eae36dc99c29b0d15be26bd68f00f this.g.update(i, Integer.MAX_VALUE, false); } -@@ -266,13 +268,17 @@ public abstract class ChunkMapDistance { +@@ -265,13 +267,17 @@ public abstract class ChunkMapDistance { } public int b() { @@ -77,10 +77,10 @@ index 52a69edcefb72a3908ecd522ef87e7eb989467a6..126eae36dc99c29b0d15be26bd68f00f public String c() { diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 322d0a7d127878ba49362454808b82172acf1600..5c092243e3e6f069f9ab6799de56dd60499b3b53 100644 +index 6bcca8f1ddfd4886b6795a1856ec196e8aa61299..dfd85fc1573338e333831e96d3d8845a21d48224 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -728,6 +728,37 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -720,6 +720,37 @@ public class ChunkProviderServer extends IChunkProvider { boolean flag1 = this.world.getGameRules().getBoolean(GameRules.DO_MOB_SPAWNING) && !world.getPlayers().isEmpty(); // CraftBukkit if (!flag) { @@ -118,7 +118,7 @@ index 322d0a7d127878ba49362454808b82172acf1600..5c092243e3e6f069f9ab6799de56dd60 this.world.getMethodProfiler().enter("pollingChunks"); int k = this.world.getGameRules().getInt(GameRules.RANDOM_TICK_SPEED); boolean flag2 = world.ticksPerAnimalSpawns != 0L && worlddata.getTime() % world.ticksPerAnimalSpawns == 0L; // CraftBukkit -@@ -757,15 +788,7 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -749,15 +780,7 @@ public class ChunkProviderServer extends IChunkProvider { this.world.getMethodProfiler().exit(); //List list = Lists.newArrayList(this.playerChunkMap.f()); // Paper //Collections.shuffle(list); // Paper @@ -135,7 +135,7 @@ index 322d0a7d127878ba49362454808b82172acf1600..5c092243e3e6f069f9ab6799de56dd60 final int[] chunksTicked = {0}; this.playerChunkMap.forEachVisibleChunk((playerchunk) -> { // Paper - safe iterator incase chunk loads, also no wrapping Optional optional = ((Either) playerchunk.a().getNow(PlayerChunk.UNLOADED_CHUNK)).left(); -@@ -781,9 +804,9 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -773,9 +796,9 @@ public class ChunkProviderServer extends IChunkProvider { Chunk chunk = (Chunk) optional1.get(); ChunkCoordIntPair chunkcoordintpair = playerchunk.i(); @@ -148,10 +148,10 @@ index 322d0a7d127878ba49362454808b82172acf1600..5c092243e3e6f069f9ab6799de56dd60 } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 8a6f9c8629635fe6015ac65348b54bd37683f46e..39eca5ff11e4070c80a276eff25843bba812cd2b 100644 +index e364576955ce033f732bc9348ab653c5db71487f..ba24a1a98eb6082af337bce77ab72245cfc913be 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -118,6 +118,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -120,6 +120,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting { public final com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet cachedSingleHashSet; // Paper @@ -161,7 +161,7 @@ index 8a6f9c8629635fe6015ac65348b54bd37683f46e..39eca5ff11e4070c80a276eff25843bb super(worldserver, worldserver.getSpawn(), worldserver.v(), gameprofile); this.spawnDimension = World.OVERWORLD; diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java -index 5305da4c7253c7e259d7b08e9722145188adc513..7413e3dbaacc288a29d9499242cb8563b4169fd9 100644 +index 3cdfb6cddf4b998ee48df64fd884a85237004b63..6bf27c8baf82cfc98158550f711414d9c8fb476b 100644 --- a/src/main/java/net/minecraft/server/PlayerChunk.java +++ b/src/main/java/net/minecraft/server/PlayerChunk.java @@ -45,6 +45,18 @@ public class PlayerChunk { diff --git a/Spigot-Server-Patches/0468-Stop-copy-on-write-operations-for-updating-light-dat.patch b/Spigot-Server-Patches/0469-Stop-copy-on-write-operations-for-updating-light-dat.patch similarity index 100% rename from Spigot-Server-Patches/0468-Stop-copy-on-write-operations-for-updating-light-dat.patch rename to Spigot-Server-Patches/0469-Stop-copy-on-write-operations-for-updating-light-dat.patch diff --git a/Spigot-Server-Patches/0469-No-Tick-view-distance-implementation.patch b/Spigot-Server-Patches/0470-No-Tick-view-distance-implementation.patch similarity index 96% rename from Spigot-Server-Patches/0469-No-Tick-view-distance-implementation.patch rename to Spigot-Server-Patches/0470-No-Tick-view-distance-implementation.patch index 944bbbc581..e7e2d7bf87 100644 --- a/Spigot-Server-Patches/0469-No-Tick-view-distance-implementation.patch +++ b/Spigot-Server-Patches/0470-No-Tick-view-distance-implementation.patch @@ -37,7 +37,7 @@ index 46ac6d91422423f1e03b86d3efa3241f2599000d..6463d3e4837d032a35654a035f42b8a8 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 63de4bba14df9bc33ce04fff5bc0baede6fad6f7..0347dca5d2e40ba078d3f256e17f69ee7f0265cc 100644 +index 8e91a0270a7a72f09dfc86331a788765de1f9f5e..544f4a473d1453e029111bea45483543e3bcbabb 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -202,7 +202,51 @@ public class Chunk implements IChunkAccess { @@ -92,7 +92,7 @@ index 63de4bba14df9bc33ce04fff5bc0baede6fad6f7..0347dca5d2e40ba078d3f256e17f69ee } public final boolean isAnyNeighborsLoaded() { -@@ -1091,7 +1135,7 @@ public class Chunk implements IChunkAccess { +@@ -1089,7 +1133,7 @@ public class Chunk implements IChunkAccess { IBlockData iblockdata = this.getType(blockposition); IBlockData iblockdata1 = Block.b(iblockdata, (GeneratorAccess) this.world, blockposition); @@ -102,10 +102,10 @@ index 63de4bba14df9bc33ce04fff5bc0baede6fad6f7..0347dca5d2e40ba078d3f256e17f69ee this.n[i].clear(); diff --git a/src/main/java/net/minecraft/server/ChunkMapDistance.java b/src/main/java/net/minecraft/server/ChunkMapDistance.java -index 126eae36dc99c29b0d15be26bd68f00fe7e563fe..6ebc4a4b5c90d8592a017e7b29dec5ca00827432 100644 +index ef61f8e784b7ebd26293d627e8b8e1aef1be6e21..03b1a67aaf3ed75b7669a3157847affd678f8df4 100644 --- a/src/main/java/net/minecraft/server/ChunkMapDistance.java +++ b/src/main/java/net/minecraft/server/ChunkMapDistance.java -@@ -263,7 +263,7 @@ public abstract class ChunkMapDistance { +@@ -262,7 +262,7 @@ public abstract class ChunkMapDistance { return s; } @@ -114,7 +114,7 @@ index 126eae36dc99c29b0d15be26bd68f00fe7e563fe..6ebc4a4b5c90d8592a017e7b29dec5ca this.g.a(i); } -@@ -382,7 +382,7 @@ public abstract class ChunkMapDistance { +@@ -381,7 +381,7 @@ public abstract class ChunkMapDistance { private void a(long i, int j, boolean flag, boolean flag1) { if (flag != flag1) { @@ -124,10 +124,10 @@ index 126eae36dc99c29b0d15be26bd68f00fe7e563fe..6ebc4a4b5c90d8592a017e7b29dec5ca if (flag1) { ChunkMapDistance.this.j.a(ChunkTaskQueueSorter.a(() -> { diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 39eca5ff11e4070c80a276eff25843bba812cd2b..debb189f7087ce9351ed9055cf1eff911816851b 100644 +index ba24a1a98eb6082af337bce77ab72245cfc913be..cbe088d8fe4cff307c1672bac9be8b1ad3515af3 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -120,6 +120,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -122,6 +122,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting { double lastEntitySpawnRadiusSquared; // Paper - optimise isOutsideRange, this field is in blocks @@ -151,7 +151,7 @@ index df3150072fd36dac28d83309e50342c9cfa326b3..0b5ddff008d151ad03a1f382a8f24494 worldData.addProperty("keep-spawn-loaded-range", world.paperConfig.keepLoadedRange); worldData.addProperty("visible-chunk-count", visibleChunks.size()); diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java -index 7413e3dbaacc288a29d9499242cb8563b4169fd9..825c3c522b0497499b72cb9f2ff3edb39d8fea08 100644 +index 6bf27c8baf82cfc98158550f711414d9c8fb476b..20ee3d33eac121df3a5f85a9a19c21cf75961aa0 100644 --- a/src/main/java/net/minecraft/server/PlayerChunk.java +++ b/src/main/java/net/minecraft/server/PlayerChunk.java @@ -57,6 +57,18 @@ public class PlayerChunk { @@ -173,7 +173,7 @@ index 7413e3dbaacc288a29d9499242cb8563b4169fd9..825c3c522b0497499b72cb9f2ff3edb3 public PlayerChunk(ChunkCoordIntPair chunkcoordintpair, int i, LightEngine lightengine, PlayerChunk.c playerchunk_c, PlayerChunk.d playerchunk_d) { this.statusFutures = new AtomicReferenceArray(PlayerChunk.CHUNK_STATUSES.size()); this.fullChunkFuture = PlayerChunk.UNLOADED_CHUNK_FUTURE; -@@ -216,7 +228,7 @@ public class PlayerChunk { +@@ -212,7 +224,7 @@ public class PlayerChunk { } public void a(BlockPosition blockposition) { @@ -182,7 +182,7 @@ index 7413e3dbaacc288a29d9499242cb8563b4169fd9..825c3c522b0497499b72cb9f2ff3edb3 if (chunk != null) { byte b0 = (byte) SectionPosition.a(blockposition.getY()); -@@ -232,7 +244,7 @@ public class PlayerChunk { +@@ -228,7 +240,7 @@ public class PlayerChunk { } public void a(EnumSkyBlock enumskyblock, int i) { @@ -191,7 +191,7 @@ index 7413e3dbaacc288a29d9499242cb8563b4169fd9..825c3c522b0497499b72cb9f2ff3edb3 if (chunk != null) { chunk.setNeedsSaving(true); -@@ -314,9 +326,48 @@ public class PlayerChunk { +@@ -310,9 +322,48 @@ public class PlayerChunk { } private void a(Packet packet, boolean flag) { @@ -577,10 +577,10 @@ index ebca5620f0bbd4173ca50f023f8333b853ab323a..025a5b24e259df04ee88cb251477c908 } } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 0f46aac9d021dc115718b1e36b8fbe28cbc820c6..b8ab8150b7dfe9e34910d35f565083e806c4fb0c 100644 +index dce3ec8c9cb0ebbf1c2a87cb3225fca95f120314..778ceccf4c0ee6c56ead351ea9d4688d3fc9b041 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -175,7 +175,7 @@ public abstract class PlayerList { +@@ -177,7 +177,7 @@ public abstract class PlayerList { boolean flag1 = gamerules.getBoolean(GameRules.REDUCED_DEBUG_INFO); // Spigot - view distance @@ -589,7 +589,7 @@ index 0f46aac9d021dc115718b1e36b8fbe28cbc820c6..b8ab8150b7dfe9e34910d35f565083e8 entityplayer.getBukkitEntity().sendSupportedChannels(); // CraftBukkit playerconnection.sendPacket(new PacketPlayOutCustomPayload(PacketPlayOutCustomPayload.a, (new PacketDataSerializer(Unpooled.buffer())).a(this.getServer().getServerModName()))); playerconnection.sendPacket(new PacketPlayOutServerDifficulty(worlddata.getDifficulty(), worlddata.isDifficultyLocked())); -@@ -828,7 +828,7 @@ public abstract class PlayerList { +@@ -830,7 +830,7 @@ public abstract class PlayerList { // CraftBukkit start WorldData worlddata = worldserver1.getWorldData(); entityplayer1.playerConnection.sendPacket(new PacketPlayOutRespawn(worldserver1.getDimensionManager(), worldserver1.getDimensionKey(), BiomeManager.a(worldserver1.getSeed()), entityplayer1.playerInteractManager.getGameMode(), entityplayer1.playerInteractManager.c(), worldserver1.isDebugWorld(), worldserver1.isFlatWorld(), flag)); @@ -598,7 +598,7 @@ index 0f46aac9d021dc115718b1e36b8fbe28cbc820c6..b8ab8150b7dfe9e34910d35f565083e8 entityplayer1.spawnIn(worldserver1); entityplayer1.dead = false; entityplayer1.playerConnection.teleport(new Location(worldserver1.getWorld(), entityplayer1.locX(), entityplayer1.locY(), entityplayer1.locZ(), entityplayer1.yaw, entityplayer1.pitch)); -@@ -1295,7 +1295,7 @@ public abstract class PlayerList { +@@ -1298,7 +1298,7 @@ public abstract class PlayerList { public void a(int i) { this.viewDistance = i; @@ -608,7 +608,7 @@ index 0f46aac9d021dc115718b1e36b8fbe28cbc820c6..b8ab8150b7dfe9e34910d35f565083e8 while (iterator.hasNext()) { diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index d26fd68b2abd4907138ce77a6e6bb45c9af4af02..b5127f4b2deaa70b411991d78657f0c9e73d9e43 100644 +index a50b647631eae271380728c890ad3ff67f56bcbe..8198962c05fe83fd2ff0401c35f4976eb6e6680b 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -465,8 +465,13 @@ public abstract class World implements GeneratorAccess, AutoCloseable { @@ -627,10 +627,10 @@ index d26fd68b2abd4907138ce77a6e6bb45c9af4af02..b5127f4b2deaa70b411991d78657f0c9 if ((i & 1) != 0) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 756c675939c5f5835736e6b8c42ae20941712c49..b55523c573d1d44e84a7a63502473dc33eb1538c 100644 +index 8f221c3b4c4cc9b5dea9938d868a2a036854d6e3..48dc8ed1294ac53216d7014b0b3130acb8e5b328 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -2540,10 +2540,39 @@ public class CraftWorld implements World { +@@ -2535,10 +2535,39 @@ public class CraftWorld implements World { // Spigot start @Override public int getViewDistance() { @@ -672,10 +672,10 @@ index 756c675939c5f5835736e6b8c42ae20941712c49..b55523c573d1d44e84a7a63502473dc3 private final Spigot spigot = new Spigot() { diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java -index 5b6604c5c84e9ee716110cd63a148187ff34201a..6ade13fd88c381280f619daaa8d6b241c67dd9d9 100644 +index 9030284ba06dfdcc17c2710f428e84d70afea8d5..0b93635ba59df4eb4456a97c5e9b51ab5aeda53f 100644 --- a/src/main/java/org/spigotmc/ActivationRange.java +++ b/src/main/java/org/spigotmc/ActivationRange.java -@@ -199,7 +199,7 @@ public class ActivationRange +@@ -201,7 +201,7 @@ public class ActivationRange maxRange = Math.max( maxRange, waterActivationRange ); maxRange = Math.max( maxRange, villagerActivationRange ); // Paper end diff --git a/Spigot-Server-Patches/0470-Add-villager-reputation-API.patch b/Spigot-Server-Patches/0471-Add-villager-reputation-API.patch similarity index 100% rename from Spigot-Server-Patches/0470-Add-villager-reputation-API.patch rename to Spigot-Server-Patches/0471-Add-villager-reputation-API.patch diff --git a/Spigot-Server-Patches/0471-Fix-Light-Command.patch b/Spigot-Server-Patches/0472-Fix-Light-Command.patch similarity index 98% rename from Spigot-Server-Patches/0471-Fix-Light-Command.patch rename to Spigot-Server-Patches/0472-Fix-Light-Command.patch index 191e3cb778..ee31926774 100644 --- a/Spigot-Server-Patches/0471-Fix-Light-Command.patch +++ b/Spigot-Server-Patches/0472-Fix-Light-Command.patch @@ -124,10 +124,10 @@ index c80af89b4ad0223577ed9513dcab0a784cc964e4..f60800c3bc06a38493e17b00b815f18c if (!SyncLoadFinder.ENABLED) { sender.sendMessage(ChatColor.RED + "This command requires the server startup flag '-Dpaper.debug-sync-loads=true' to be set."); diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java -index 825c3c522b0497499b72cb9f2ff3edb39d8fea08..f3d5ea4672f950bd5c52b718f2e1e0280175ccb9 100644 +index 20ee3d33eac121df3a5f85a9a19c21cf75961aa0..1536d9661837e76fc23131ecd974f699048cc9ae 100644 --- a/src/main/java/net/minecraft/server/PlayerChunk.java +++ b/src/main/java/net/minecraft/server/PlayerChunk.java -@@ -325,6 +325,7 @@ public class PlayerChunk { +@@ -321,6 +321,7 @@ public class PlayerChunk { } diff --git a/Spigot-Server-Patches/0472-Fix-PotionEffect-ignores-icon-flag.patch b/Spigot-Server-Patches/0473-Fix-PotionEffect-ignores-icon-flag.patch similarity index 100% rename from Spigot-Server-Patches/0472-Fix-PotionEffect-ignores-icon-flag.patch rename to Spigot-Server-Patches/0473-Fix-PotionEffect-ignores-icon-flag.patch diff --git a/Spigot-Server-Patches/0473-Optimize-brigadier-child-sorting-performance.patch b/Spigot-Server-Patches/0474-Optimize-brigadier-child-sorting-performance.patch similarity index 100% rename from Spigot-Server-Patches/0473-Optimize-brigadier-child-sorting-performance.patch rename to Spigot-Server-Patches/0474-Optimize-brigadier-child-sorting-performance.patch diff --git a/Spigot-Server-Patches/0474-Potential-bed-API.patch b/Spigot-Server-Patches/0475-Potential-bed-API.patch similarity index 90% rename from Spigot-Server-Patches/0474-Potential-bed-API.patch rename to Spigot-Server-Patches/0475-Potential-bed-API.patch index f32f9c6470..994ace6167 100644 --- a/Spigot-Server-Patches/0474-Potential-bed-API.patch +++ b/Spigot-Server-Patches/0475-Potential-bed-API.patch @@ -8,10 +8,10 @@ Adds a new method to fetch the location of a player's bed without generating any getPotentialBedLocation - Gets the last known location of a player's bed. This does not preform any check if the bed is still valid and does not load any chunks. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -index 5f77989ce1e0d2289e63960453b9b28443592103..caabe25db61637c5a695daed00bc9692189e1ad0 100644 +index c6564ccfd6580ac5691dd864602eb6fbaf4a34be..f8be287a5c5e273eb71896c16064b1fd085faf7e 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -@@ -126,6 +126,22 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -127,6 +127,22 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { return getHandle().sleepTicks; } diff --git a/Spigot-Server-Patches/0475-Wait-for-Async-Tasks-during-shutdown.patch b/Spigot-Server-Patches/0476-Wait-for-Async-Tasks-during-shutdown.patch similarity index 94% rename from Spigot-Server-Patches/0475-Wait-for-Async-Tasks-during-shutdown.patch rename to Spigot-Server-Patches/0476-Wait-for-Async-Tasks-during-shutdown.patch index d01adf8579..eb4b4c6309 100644 --- a/Spigot-Server-Patches/0475-Wait-for-Async-Tasks-during-shutdown.patch +++ b/Spigot-Server-Patches/0476-Wait-for-Async-Tasks-during-shutdown.patch @@ -22,10 +22,10 @@ index 6fd956cbbb4fddc4294ff03976e66d93c1b086c7..d0ce4b96174f85c545a457fe864c7eba // CraftBukkit end if (this.getServerConnection() != null) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 4e5681a938bcea925a32ab6ec93610d9d64094a4..8c454db0986fe5c23f7b8ece0abdad1f1e36cf08 100644 +index 8e691e594dd0b8fcd5e7fc83cf3562f0d17e18ce..9a2bc062dd0c05adf0de2f3534293fe4e4943ceb 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -939,6 +939,35 @@ public final class CraftServer implements Server { +@@ -943,6 +943,35 @@ public final class CraftServer implements Server { org.spigotmc.WatchdogThread.hasStarted = true; // Paper - Disable watchdog early timeout on reload } diff --git a/Spigot-Server-Patches/0476-Ensure-EntityRaider-respects-game-and-entity-rules-f.patch b/Spigot-Server-Patches/0477-Ensure-EntityRaider-respects-game-and-entity-rules-f.patch similarity index 100% rename from Spigot-Server-Patches/0476-Ensure-EntityRaider-respects-game-and-entity-rules-f.patch rename to Spigot-Server-Patches/0477-Ensure-EntityRaider-respects-game-and-entity-rules-f.patch diff --git a/Spigot-Server-Patches/0477-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch b/Spigot-Server-Patches/0478-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch similarity index 99% rename from Spigot-Server-Patches/0477-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch rename to Spigot-Server-Patches/0478-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch index 1b57f1a077..7518059324 100644 --- a/Spigot-Server-Patches/0477-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch +++ b/Spigot-Server-Patches/0478-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch @@ -157,7 +157,7 @@ index a552cc5bebb1a70db2e679a514769d0ad791ad68..72de544c0782e4daff222a0ca04e5bc8 this.world.getMethodProfiler().enter("explosion_blocks"); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index b5127f4b2deaa70b411991d78657f0c9e73d9e43..f2944dcf6b83b530124d53743a3d58b68ecec6f8 100644 +index 8198962c05fe83fd2ff0401c35f4976eb6e6680b..14dbedbe879c84d8b0e141d1a4e2e7c1256a6f97 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -362,6 +362,10 @@ public abstract class World implements GeneratorAccess, AutoCloseable { diff --git a/Spigot-Server-Patches/0478-Optimize-NibbleArray-to-use-pooled-buffers.patch b/Spigot-Server-Patches/0479-Optimize-NibbleArray-to-use-pooled-buffers.patch similarity index 100% rename from Spigot-Server-Patches/0478-Optimize-NibbleArray-to-use-pooled-buffers.patch rename to Spigot-Server-Patches/0479-Optimize-NibbleArray-to-use-pooled-buffers.patch diff --git a/Spigot-Server-Patches/0479-Reduce-MutableInt-allocations-from-light-engine.patch b/Spigot-Server-Patches/0480-Reduce-MutableInt-allocations-from-light-engine.patch similarity index 100% rename from Spigot-Server-Patches/0479-Reduce-MutableInt-allocations-from-light-engine.patch rename to Spigot-Server-Patches/0480-Reduce-MutableInt-allocations-from-light-engine.patch diff --git a/Spigot-Server-Patches/0480-Reduce-allocation-of-Vec3D-by-entity-tracker.patch b/Spigot-Server-Patches/0481-Reduce-allocation-of-Vec3D-by-entity-tracker.patch similarity index 100% rename from Spigot-Server-Patches/0480-Reduce-allocation-of-Vec3D-by-entity-tracker.patch rename to Spigot-Server-Patches/0481-Reduce-allocation-of-Vec3D-by-entity-tracker.patch diff --git a/Spigot-Server-Patches/0481-Ensure-safe-gateway-teleport.patch b/Spigot-Server-Patches/0482-Ensure-safe-gateway-teleport.patch similarity index 100% rename from Spigot-Server-Patches/0481-Ensure-safe-gateway-teleport.patch rename to Spigot-Server-Patches/0482-Ensure-safe-gateway-teleport.patch diff --git a/Spigot-Server-Patches/0482-Add-option-for-console-having-all-permissions.patch b/Spigot-Server-Patches/0483-Add-option-for-console-having-all-permissions.patch similarity index 84% rename from Spigot-Server-Patches/0482-Add-option-for-console-having-all-permissions.patch rename to Spigot-Server-Patches/0483-Add-option-for-console-having-all-permissions.patch index fbe50a7185..f907561451 100644 --- a/Spigot-Server-Patches/0482-Add-option-for-console-having-all-permissions.patch +++ b/Spigot-Server-Patches/0483-Add-option-for-console-having-all-permissions.patch @@ -19,15 +19,14 @@ index 5b5edd2aed9cf76535104df65783bfd1d5bb7c85..456e6363758c41e1d58e178bf839e96a + } diff --git a/src/main/java/org/bukkit/craftbukkit/command/CraftConsoleCommandSender.java b/src/main/java/org/bukkit/craftbukkit/command/CraftConsoleCommandSender.java -index 089fe4a3458ed3106fa214f89a7004a5d3c6bb95..64d1ebf8db91cbf8c1430c80aa089aac49d6163b 100644 +index 5bb8c38c511ec000476afde8038587ddbc7549cc..b1e95feb2e106627cf935d2894354c2cc28f0d77 100644 --- a/src/main/java/org/bukkit/craftbukkit/command/CraftConsoleCommandSender.java +++ b/src/main/java/org/bukkit/craftbukkit/command/CraftConsoleCommandSender.java -@@ -80,4 +80,16 @@ public class CraftConsoleCommandSender extends ServerCommandSender implements Co - public boolean isConversing() { - return conversationTracker.isConversing(); +@@ -86,5 +86,15 @@ public class CraftConsoleCommandSender extends ServerCommandSender implements Co + public void sendMessage(final net.kyori.adventure.identity.Identity identity, final net.kyori.adventure.text.Component message, final net.kyori.adventure.audience.MessageType type) { + this.sendRawMessage(net.kyori.adventure.text.serializer.plain.PlainComponentSerializer.plain().serialize(message)); } + -+ // Paper start + @Override + public boolean hasPermission(String name) { + return com.destroystokyo.paper.PaperConfig.consoleHasAllPermissions || super.hasPermission(name); @@ -37,7 +36,7 @@ index 089fe4a3458ed3106fa214f89a7004a5d3c6bb95..64d1ebf8db91cbf8c1430c80aa089aac + public boolean hasPermission(org.bukkit.permissions.Permission perm) { + return com.destroystokyo.paper.PaperConfig.consoleHasAllPermissions || super.hasPermission(perm); + } -+ // Paper end + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/command/CraftRemoteConsoleCommandSender.java b/src/main/java/org/bukkit/craftbukkit/command/CraftRemoteConsoleCommandSender.java index 655bdbc37d0b95622206569229d4f4ea9496c69d..5562a7199f9b73d6af539360d4912d1dbde5d6cf 100644 diff --git a/Spigot-Server-Patches/0485-Fix-Non-Full-Status-Chunk-NBT-Memory-Leak.patch b/Spigot-Server-Patches/0484-Fix-Non-Full-Status-Chunk-NBT-Memory-Leak.patch similarity index 100% rename from Spigot-Server-Patches/0485-Fix-Non-Full-Status-Chunk-NBT-Memory-Leak.patch rename to Spigot-Server-Patches/0484-Fix-Non-Full-Status-Chunk-NBT-Memory-Leak.patch diff --git a/Spigot-Server-Patches/0483-Workaround-for-Client-Lag-Spikes-MC-162253.patch b/Spigot-Server-Patches/0485-Workaround-for-Client-Lag-Spikes-MC-162253.patch similarity index 98% rename from Spigot-Server-Patches/0483-Workaround-for-Client-Lag-Spikes-MC-162253.patch rename to Spigot-Server-Patches/0485-Workaround-for-Client-Lag-Spikes-MC-162253.patch index fa817b6d03..f96b55bbb5 100644 --- a/Spigot-Server-Patches/0483-Workaround-for-Client-Lag-Spikes-MC-162253.patch +++ b/Spigot-Server-Patches/0485-Workaround-for-Client-Lag-Spikes-MC-162253.patch @@ -12,7 +12,7 @@ to the client, so that it doesn't attempt to calculate them. This mitigates the frametime impact to a minimum (but it's still there). diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 0347dca5d2e40ba078d3f256e17f69ee7f0265cc..3bcd63a754538ccfc5965207a8fc79faa31925c0 100644 +index 544f4a473d1453e029111bea45483543e3bcbabb..af9d54ef057d5f6977cf77c57cde25b6b0d1f39d 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -234,7 +234,7 @@ public class Chunk implements IChunkAccess { diff --git a/Spigot-Server-Patches/0484-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch b/Spigot-Server-Patches/0486-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch similarity index 96% rename from Spigot-Server-Patches/0484-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch rename to Spigot-Server-Patches/0486-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch index b90d57446f..f8cc477ea1 100644 --- a/Spigot-Server-Patches/0484-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch +++ b/Spigot-Server-Patches/0486-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch @@ -90,7 +90,7 @@ index b12e43ed13a1a9d7d418831b8988c30a242cb5c4..dcaf9f8574a9c913b64ba3a1d8b02220 return new BlockPosition(this.d(), 0, this.e()); } diff --git a/src/main/java/net/minecraft/server/ChunkMapDistance.java b/src/main/java/net/minecraft/server/ChunkMapDistance.java -index 6ebc4a4b5c90d8592a017e7b29dec5ca00827432..d0bdffadefa6ed67bd30d833891256cc39a8f7f0 100644 +index 03b1a67aaf3ed75b7669a3157847affd678f8df4..09fec533d7feebb90e989007dd19c952823550ba 100644 --- a/src/main/java/net/minecraft/server/ChunkMapDistance.java +++ b/src/main/java/net/minecraft/server/ChunkMapDistance.java @@ -23,6 +23,7 @@ import java.util.concurrent.Executor; @@ -307,7 +307,7 @@ index 6ebc4a4b5c90d8592a017e7b29dec5ca00827432..d0bdffadefa6ed67bd30d833891256cc public boolean addTicketAtLevel(TicketType ticketType, ChunkCoordIntPair chunkcoordintpair, int level, T identifier) { return this.addTicket(chunkcoordintpair.pair(), new Ticket<>(ticketType, level, identifier)); // CraftBukkit end -@@ -382,27 +521,50 @@ public abstract class ChunkMapDistance { +@@ -381,27 +520,50 @@ public abstract class ChunkMapDistance { private void a(long i, int j, boolean flag, boolean flag1) { if (flag != flag1) { @@ -364,7 +364,7 @@ index 6ebc4a4b5c90d8592a017e7b29dec5ca00827432..d0bdffadefa6ed67bd30d833891256cc }); }, i, true)); } -@@ -410,6 +572,101 @@ public abstract class ChunkMapDistance { +@@ -409,6 +571,101 @@ public abstract class ChunkMapDistance { } @@ -466,7 +466,7 @@ index 6ebc4a4b5c90d8592a017e7b29dec5ca00827432..d0bdffadefa6ed67bd30d833891256cc @Override public void a() { super.a(); -@@ -441,6 +698,7 @@ public abstract class ChunkMapDistance { +@@ -440,6 +697,7 @@ public abstract class ChunkMapDistance { } @@ -474,7 +474,7 @@ index 6ebc4a4b5c90d8592a017e7b29dec5ca00827432..d0bdffadefa6ed67bd30d833891256cc private boolean c(int i) { return i <= this.e - 2; } -@@ -457,6 +715,7 @@ public abstract class ChunkMapDistance { +@@ -456,6 +714,7 @@ public abstract class ChunkMapDistance { this.a.defaultReturnValue((byte) (i + 2)); } @@ -483,10 +483,10 @@ index 6ebc4a4b5c90d8592a017e7b29dec5ca00827432..d0bdffadefa6ed67bd30d833891256cc protected int c(long i) { return this.a.get(i); diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 5c092243e3e6f069f9ab6799de56dd60499b3b53..29ec0d9c5e10b19e07cf1ba3c848925e541e6311 100644 +index dfd85fc1573338e333831e96d3d8845a21d48224..35ac03c099f525c7cebe0d90ad2c665fc2637194 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -443,6 +443,26 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -435,6 +435,26 @@ public class ChunkProviderServer extends IChunkProvider { public void removeTicketAtLevel(TicketType ticketType, ChunkCoordIntPair chunkPos, int ticketLevel, T identifier) { this.chunkMapDistance.removeTicketAtLevel(ticketType, chunkPos, ticketLevel, identifier); } @@ -513,7 +513,7 @@ index 5c092243e3e6f069f9ab6799de56dd60499b3b53..29ec0d9c5e10b19e07cf1ba3c848925e // Paper end @Nullable -@@ -481,6 +501,8 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -473,6 +493,8 @@ public class ChunkProviderServer extends IChunkProvider { if (!completablefuture.isDone()) { // Paper // Paper start - async chunk io/loading @@ -522,7 +522,7 @@ index 5c092243e3e6f069f9ab6799de56dd60499b3b53..29ec0d9c5e10b19e07cf1ba3c848925e this.world.asyncChunkTaskManager.raisePriority(x, z, com.destroystokyo.paper.io.PrioritizedTaskQueue.HIGHEST_PRIORITY); com.destroystokyo.paper.io.chunk.ChunkTaskManager.pushChunkWait(this.world, x, z); // Paper end -@@ -489,6 +511,8 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -481,6 +503,8 @@ public class ChunkProviderServer extends IChunkProvider { this.serverThreadQueue.awaitTasks(completablefuture::isDone); com.destroystokyo.paper.io.chunk.ChunkTaskManager.popChunkWait(); // Paper - async chunk debug this.world.timings.syncChunkLoad.stopTiming(); // Paper @@ -531,7 +531,7 @@ index 5c092243e3e6f069f9ab6799de56dd60499b3b53..29ec0d9c5e10b19e07cf1ba3c848925e } // Paper ichunkaccess = (IChunkAccess) ((Either) completablefuture.join()).map((ichunkaccess1) -> { return ichunkaccess1; -@@ -541,10 +565,12 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -533,10 +557,12 @@ public class ChunkProviderServer extends IChunkProvider { if (flag && !currentlyUnloading) { // CraftBukkit end this.chunkMapDistance.a(TicketType.UNKNOWN, chunkcoordintpair, l, chunkcoordintpair); @@ -544,7 +544,7 @@ index 5c092243e3e6f069f9ab6799de56dd60499b3b53..29ec0d9c5e10b19e07cf1ba3c848925e this.tickDistanceManager(); playerchunk = this.getChunk(k); gameprofilerfiller.exit(); -@@ -553,8 +579,13 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -545,8 +571,13 @@ public class ChunkProviderServer extends IChunkProvider { } } } @@ -560,7 +560,7 @@ index 5c092243e3e6f069f9ab6799de56dd60499b3b53..29ec0d9c5e10b19e07cf1ba3c848925e } private boolean a(@Nullable PlayerChunk playerchunk, int i) { -@@ -605,6 +636,7 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -597,6 +628,7 @@ public class ChunkProviderServer extends IChunkProvider { } public boolean tickDistanceManager() { // Paper - private -> public @@ -569,10 +569,10 @@ index 5c092243e3e6f069f9ab6799de56dd60499b3b53..29ec0d9c5e10b19e07cf1ba3c848925e boolean flag1 = this.playerChunkMap.b(); diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index debb189f7087ce9351ed9055cf1eff911816851b..804ac31e83e40a532999d546eaac0aae3642ec28 100644 +index cbe088d8fe4cff307c1672bac9be8b1ad3515af3..dbc9cc0728d1f9de89e15ecf5ccd6f8b07cd0788 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -57,6 +57,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -58,6 +58,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting { private int lastArmorScored = Integer.MIN_VALUE; private int lastExpLevelScored = Integer.MIN_VALUE; private int lastExpTotalScored = Integer.MIN_VALUE; @@ -585,7 +585,7 @@ index debb189f7087ce9351ed9055cf1eff911816851b..804ac31e83e40a532999d546eaac0aae private float lastHealthSent = -1.0E8F; private int lastFoodSent = -99999999; private boolean lastSentSaturationZero = true; -@@ -142,6 +148,21 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -145,6 +151,21 @@ public class EntityPlayer extends EntityHuman implements ICrafting { this.maxHealthCache = this.getMaxHealth(); this.cachedSingleMobDistanceMap = new com.destroystokyo.paper.util.PooledHashSets.PooledObjectLinkedOpenHashSet<>(this); // Paper } @@ -607,7 +607,7 @@ index debb189f7087ce9351ed9055cf1eff911816851b..804ac31e83e40a532999d546eaac0aae // Yes, this doesn't match Vanilla, but it's the best we can do for now. // If this is an issue, PRs are welcome -@@ -489,6 +510,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -492,6 +513,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { if (valid && !this.isSpectator() || this.world.isLoaded(this.getChunkCoordinates())) { // Paper - don't tick dead players that are not in the world currently (pending respawn) super.tick(); } @@ -628,7 +628,7 @@ index 0b5ddff008d151ad03a1f382a8f24494356e8701..ff74be14512a947e81b62d53e616131c chunkData.addProperty("queued-for-unload", chunkMap.unloadQueue.contains(playerChunk.location.pair())); chunkData.addProperty("status", status == null ? "unloaded" : status.toString()); diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java -index f3d5ea4672f950bd5c52b718f2e1e0280175ccb9..3d95c7cd5d34166a427b45061bce2ac9569784b4 100644 +index 1536d9661837e76fc23131ecd974f699048cc9ae..371a301f4a295c59ce40fefc6ef07e544414d94b 100644 --- a/src/main/java/net/minecraft/server/PlayerChunk.java +++ b/src/main/java/net/minecraft/server/PlayerChunk.java @@ -1,6 +1,7 @@ @@ -779,7 +779,7 @@ index f3d5ea4672f950bd5c52b718f2e1e0280175ccb9..3d95c7cd5d34166a427b45061bce2ac9 public PlayerChunk(ChunkCoordIntPair chunkcoordintpair, int i, LightEngine lightengine, PlayerChunk.c playerchunk_c, PlayerChunk.d playerchunk_d) { this.statusFutures = new AtomicReferenceArray(PlayerChunk.CHUNK_STATUSES.size()); -@@ -170,6 +286,18 @@ public class PlayerChunk { +@@ -166,6 +282,18 @@ public class PlayerChunk { } return null; } @@ -798,7 +798,7 @@ index f3d5ea4672f950bd5c52b718f2e1e0280175ccb9..3d95c7cd5d34166a427b45061bce2ac9 // Paper end public CompletableFuture> getStatusFutureUnchecked(ChunkStatus chunkstatus) { -@@ -416,6 +544,7 @@ public class PlayerChunk { +@@ -412,6 +540,7 @@ public class PlayerChunk { return this.n; } @@ -806,7 +806,7 @@ index f3d5ea4672f950bd5c52b718f2e1e0280175ccb9..3d95c7cd5d34166a427b45061bce2ac9 private void d(int i) { this.n = i; } -@@ -434,7 +563,7 @@ public class PlayerChunk { +@@ -430,7 +559,7 @@ public class PlayerChunk { // CraftBukkit start // ChunkUnloadEvent: Called before the chunk is unloaded: isChunkLoaded is still true and chunk can still be modified by plugins. if (playerchunk_state.isAtLeast(PlayerChunk.State.BORDER) && !playerchunk_state1.isAtLeast(PlayerChunk.State.BORDER)) { @@ -815,7 +815,7 @@ index f3d5ea4672f950bd5c52b718f2e1e0280175ccb9..3d95c7cd5d34166a427b45061bce2ac9 Chunk chunk = (Chunk)either.left().orElse(null); if (chunk != null) { playerchunkmap.callbackExecutor.execute(() -> { -@@ -499,12 +628,13 @@ public class PlayerChunk { +@@ -495,12 +624,13 @@ public class PlayerChunk { if (!flag2 && flag3) { // Paper start - cache ticking ready status int expectCreateCount = ++this.fullChunkCreateCount; @@ -830,7 +830,7 @@ index f3d5ea4672f950bd5c52b718f2e1e0280175ccb9..3d95c7cd5d34166a427b45061bce2ac9 } -@@ -529,7 +659,7 @@ public class PlayerChunk { +@@ -525,7 +655,7 @@ public class PlayerChunk { if (!flag4 && flag5) { // Paper start - cache ticking ready status @@ -839,7 +839,7 @@ index f3d5ea4672f950bd5c52b718f2e1e0280175ccb9..3d95c7cd5d34166a427b45061bce2ac9 if (either.left().isPresent()) { // note: Here is a very good place to add callbacks to logic waiting on this. Chunk tickingChunk = either.left().get(); -@@ -560,7 +690,7 @@ public class PlayerChunk { +@@ -556,7 +686,7 @@ public class PlayerChunk { } // Paper start - cache ticking ready status @@ -848,7 +848,7 @@ index f3d5ea4672f950bd5c52b718f2e1e0280175ccb9..3d95c7cd5d34166a427b45061bce2ac9 if (either.left().isPresent()) { // note: Here is a very good place to add callbacks to logic waiting on this. Chunk entityTickingChunk = either.left().get(); -@@ -580,12 +710,29 @@ public class PlayerChunk { +@@ -576,12 +706,29 @@ public class PlayerChunk { this.entityTickingFuture = PlayerChunk.UNLOADED_CHUNK_FUTURE; } @@ -880,7 +880,7 @@ index f3d5ea4672f950bd5c52b718f2e1e0280175ccb9..3d95c7cd5d34166a427b45061bce2ac9 Chunk chunk = (Chunk)either.left().orElse(null); if (chunk != null) { playerchunkmap.callbackExecutor.execute(() -> { -@@ -667,6 +814,7 @@ public class PlayerChunk { +@@ -663,6 +810,7 @@ public class PlayerChunk { public interface c { @@ -1146,7 +1146,7 @@ index e38c9a8f4bf017db9f296bffcd029f9603ee82f6..19a31536d40289cba25120d4cc4788e9 } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 952aa22b5c35852a8d394cf6814c4ab00c58e599..257c3489f9add056966cdb8eaaa49fa438369bb6 100644 +index 1570fc9490bfb776cfdfdf594d5b666563a3b342..9fe5c5109775f5d11bce47f88b78c20da971336e 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -1379,6 +1379,7 @@ public class PlayerConnection implements PacketListenerPlayIn { @@ -1158,10 +1158,10 @@ index 952aa22b5c35852a8d394cf6814c4ab00c58e599..257c3489f9add056966cdb8eaaa49fa4 } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index b8ab8150b7dfe9e34910d35f565083e806c4fb0c..0c71059c10dbb840c5b2aca91bc377c8db53bf52 100644 +index 778ceccf4c0ee6c56ead351ea9d4688d3fc9b041..4ff99bbe820948a6f6a04588fa5505edc9932f21 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -196,8 +196,8 @@ public abstract class PlayerList { +@@ -198,8 +198,8 @@ public abstract class PlayerList { final ChunkCoordIntPair pos = new ChunkCoordIntPair(chunkX, chunkZ); PlayerChunkMap playerChunkMap = worldserver1.getChunkProvider().playerChunkMap; playerChunkMap.chunkDistanceManager.addTicketAtLevel(TicketType.LOGIN, pos, 31, pos.pair()); @@ -1172,7 +1172,7 @@ index b8ab8150b7dfe9e34910d35f565083e806c4fb0c..0c71059c10dbb840c5b2aca91bc377c8 PlayerChunk updatingChunk = playerChunkMap.getUpdatingChunk(pos.pair()); if (updatingChunk != null) { return updatingChunk.getEntityTickingFuture(); -@@ -616,6 +616,7 @@ public abstract class PlayerList { +@@ -618,6 +618,7 @@ public abstract class PlayerList { SocketAddress socketaddress = loginlistener.networkManager.getSocketAddress(); EntityPlayer entity = new EntityPlayer(this.server, this.server.getWorldServer(World.OVERWORLD), gameprofile, new PlayerInteractManager(this.server.getWorldServer(World.OVERWORLD))); @@ -1180,7 +1180,7 @@ index b8ab8150b7dfe9e34910d35f565083e806c4fb0c..0c71059c10dbb840c5b2aca91bc377c8 Player player = entity.getBukkitEntity(); PlayerLoginEvent event = new PlayerLoginEvent(player, hostname, ((java.net.InetSocketAddress) socketaddress).getAddress(), ((java.net.InetSocketAddress) loginlistener.networkManager.getRawAddress()).getAddress()); -@@ -822,6 +823,7 @@ public abstract class PlayerList { +@@ -824,6 +825,7 @@ public abstract class PlayerList { // CraftBukkit end worldserver1.getChunkProvider().addTicket(TicketType.POST_TELEPORT, new ChunkCoordIntPair(location.getBlockX() >> 4, location.getBlockZ() >> 4), 1, entityplayer.getId()); // Paper @@ -1222,10 +1222,10 @@ index d7b9d9fd3a3b607278a3d72b0b306b0be2aa30ad..6fd852db6bcfbfbf84ec2acf6d23b08a public static TicketType a(String s, Comparator comparator) { return new TicketType<>(s, comparator, 0L); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index b55523c573d1d44e84a7a63502473dc33eb1538c..925aa6dddb4f572a05e7b5be5a0a201162b7b1eb 100644 +index 48dc8ed1294ac53216d7014b0b3130acb8e5b328..560590c3c772eb91d562c622b627af36bf394609 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -2530,6 +2530,10 @@ public class CraftWorld implements World { +@@ -2525,6 +2525,10 @@ public class CraftWorld implements World { return future; } @@ -1237,10 +1237,10 @@ index b55523c573d1d44e84a7a63502473dc33eb1538c..925aa6dddb4f572a05e7b5be5a0a2011 net.minecraft.server.Chunk chunk = (net.minecraft.server.Chunk) either.left().orElse(null); return CompletableFuture.completedFuture(chunk == null ? null : chunk.getBukkitChunk()); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 6d7e6d7b9df864057030322e25110647dbff56ab..3ca98b422fb0836a08abd1663a940bd22c565eb8 100644 +index 17e3d62ca51f1bb39559fc2293ae6a67b3b8122d..e8448061b34b7f577c89eb5a3186d5c30c8e48d8 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -765,6 +765,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -835,6 +835,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { throw new UnsupportedOperationException("Cannot set rotation of players. Consider teleporting instead."); } diff --git a/Spigot-Server-Patches/0486-Optimize-sending-packets-to-nearby-locations-sounds-.patch b/Spigot-Server-Patches/0487-Optimize-sending-packets-to-nearby-locations-sounds-.patch similarity index 95% rename from Spigot-Server-Patches/0486-Optimize-sending-packets-to-nearby-locations-sounds-.patch rename to Spigot-Server-Patches/0487-Optimize-sending-packets-to-nearby-locations-sounds-.patch index 332a991326..b4af7c9e76 100644 --- a/Spigot-Server-Patches/0486-Optimize-sending-packets-to-nearby-locations-sounds-.patch +++ b/Spigot-Server-Patches/0487-Optimize-sending-packets-to-nearby-locations-sounds-.patch @@ -11,10 +11,10 @@ This will drastically cut down on packet sending cost for worlds with lots of players in them. diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 0c71059c10dbb840c5b2aca91bc377c8db53bf52..82e3ddc25f1b9f3cbf25a457227335df27ae5d0f 100644 +index 4ff99bbe820948a6f6a04588fa5505edc9932f21..e7900a3f5ef54108bfe8397d7ee096563a9f9fa1 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -1073,16 +1073,40 @@ public abstract class PlayerList { +@@ -1075,16 +1075,40 @@ public abstract class PlayerList { } public void sendPacketNearby(@Nullable EntityHuman entityhuman, double d0, double d1, double d2, double d3, ResourceKey resourcekey, Packet packet) { diff --git a/Spigot-Server-Patches/0487-Improve-Chunk-Status-Transition-Speed.patch b/Spigot-Server-Patches/0488-Improve-Chunk-Status-Transition-Speed.patch similarity index 100% rename from Spigot-Server-Patches/0487-Improve-Chunk-Status-Transition-Speed.patch rename to Spigot-Server-Patches/0488-Improve-Chunk-Status-Transition-Speed.patch diff --git a/Spigot-Server-Patches/0488-Fix-villager-trading-demand-MC-163962.patch b/Spigot-Server-Patches/0489-Fix-villager-trading-demand-MC-163962.patch similarity index 100% rename from Spigot-Server-Patches/0488-Fix-villager-trading-demand-MC-163962.patch rename to Spigot-Server-Patches/0489-Fix-villager-trading-demand-MC-163962.patch diff --git a/Spigot-Server-Patches/0489-Maps-shouldn-t-load-chunks.patch b/Spigot-Server-Patches/0490-Maps-shouldn-t-load-chunks.patch similarity index 100% rename from Spigot-Server-Patches/0489-Maps-shouldn-t-load-chunks.patch rename to Spigot-Server-Patches/0490-Maps-shouldn-t-load-chunks.patch diff --git a/Spigot-Server-Patches/0490-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch b/Spigot-Server-Patches/0491-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch similarity index 100% rename from Spigot-Server-Patches/0490-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch rename to Spigot-Server-Patches/0491-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch diff --git a/Spigot-Server-Patches/0491-Optimize-Bit-Operations-by-inlining.patch b/Spigot-Server-Patches/0492-Optimize-Bit-Operations-by-inlining.patch similarity index 100% rename from Spigot-Server-Patches/0491-Optimize-Bit-Operations-by-inlining.patch rename to Spigot-Server-Patches/0492-Optimize-Bit-Operations-by-inlining.patch diff --git a/Spigot-Server-Patches/0492-Optimize-Light-Engine.patch b/Spigot-Server-Patches/0493-Optimize-Light-Engine.patch similarity index 99% rename from Spigot-Server-Patches/0492-Optimize-Light-Engine.patch rename to Spigot-Server-Patches/0493-Optimize-Light-Engine.patch index 1b326599f2..7bb82ae8c6 100644 --- a/Spigot-Server-Patches/0492-Optimize-Light-Engine.patch +++ b/Spigot-Server-Patches/0493-Optimize-Light-Engine.patch @@ -25,10 +25,10 @@ Massive update to light to improve performance and chunk loading/generation. 8) Fix NPE risk that crashes server in getting nibble data diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 29ec0d9c5e10b19e07cf1ba3c848925e541e6311..12e417d2fe8e7f6a2f664ef916c141305ce1b29c 100644 +index 35ac03c099f525c7cebe0d90ad2c665fc2637194..75d25576d68ec95a14372f8530f4916f2bd7c3c5 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -1045,7 +1045,7 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -1037,7 +1037,7 @@ public class ChunkProviderServer extends IChunkProvider { if (ChunkProviderServer.this.tickDistanceManager()) { return true; } else { @@ -1329,10 +1329,10 @@ index ff00830b95a17f66d0c913087492dbf4b066df8a..4085426af03f032cf405bdfd1e40a8e5 private static final int nibbleBucketSizeMultiplier = Integer.getInteger("Paper.nibbleBucketSize", 3072); private static final int maxPoolSize = Integer.getInteger("Paper.maxNibblePoolSize", (int) Math.min(6, Math.max(1, Runtime.getRuntime().maxMemory() / 1024 / 1024 / 1024)) * (nibbleBucketSizeMultiplier * 8)); diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java -index 0799970f90527f97d64eb857a0b07990114c7ab2..afea606641c27e2ea8769455833b96e3f012e78e 100644 +index 025ab54dddbf4ef80ce2253f9b6cabcb8e46bfd2..acb07a2a7a7606470aa938ffc8f6a54fd7b9f5f9 100644 --- a/src/main/java/net/minecraft/server/PlayerChunk.java +++ b/src/main/java/net/minecraft/server/PlayerChunk.java -@@ -728,6 +728,7 @@ public class PlayerChunk { +@@ -724,6 +724,7 @@ public class PlayerChunk { ioPriority = com.destroystokyo.paper.io.PrioritizedTaskQueue.HIGH_PRIORITY; } chunkMap.world.asyncChunkTaskManager.raisePriority(location.x, location.z, ioPriority); @@ -1400,7 +1400,7 @@ index b7af235dc2841dc9c8296805624f6ee763b86dfb..faf4745d368993ccdf0c017937efc5be this.a.a(t0); this.f(); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 1a75e688d7bd6aa0c7d83574b07ab27960fcaf7a..d2edfc8053a3db0a8e27f408bd467b193d8f9d9c 100644 +index bb73dc2cfca633f85aa0aa1c988d3cdd86be8e4e..61eeba3c25fecfdebfeb546b7e18ff4464eedfc2 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -714,6 +714,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { diff --git a/Spigot-Server-Patches/0493-Delay-Chunk-Unloads-based-on-Player-Movement.patch b/Spigot-Server-Patches/0494-Delay-Chunk-Unloads-based-on-Player-Movement.patch similarity index 98% rename from Spigot-Server-Patches/0493-Delay-Chunk-Unloads-based-on-Player-Movement.patch rename to Spigot-Server-Patches/0494-Delay-Chunk-Unloads-based-on-Player-Movement.patch index 303d97155c..d0fee909c9 100644 --- a/Spigot-Server-Patches/0493-Delay-Chunk-Unloads-based-on-Player-Movement.patch +++ b/Spigot-Server-Patches/0494-Delay-Chunk-Unloads-based-on-Player-Movement.patch @@ -35,7 +35,7 @@ index 6463d3e4837d032a35654a035f42b8a805e0e286..1655bca0502e7b871de4addaa163536d + } } diff --git a/src/main/java/net/minecraft/server/ChunkMapDistance.java b/src/main/java/net/minecraft/server/ChunkMapDistance.java -index d0bdffadefa6ed67bd30d833891256cc39a8f7f0..76f9bb728def91744910d0b680b73e753f1a2b26 100644 +index 09fec533d7feebb90e989007dd19c952823550ba..3c7b225edbe23dc1959002293a6f8b816287b5a8 100644 --- a/src/main/java/net/minecraft/server/ChunkMapDistance.java +++ b/src/main/java/net/minecraft/server/ChunkMapDistance.java @@ -176,6 +176,27 @@ public abstract class ChunkMapDistance { diff --git a/Spigot-Server-Patches/0494-Add-Plugin-Tickets-to-API-Chunk-Methods.patch b/Spigot-Server-Patches/0495-Add-Plugin-Tickets-to-API-Chunk-Methods.patch similarity index 94% rename from Spigot-Server-Patches/0494-Add-Plugin-Tickets-to-API-Chunk-Methods.patch rename to Spigot-Server-Patches/0495-Add-Plugin-Tickets-to-API-Chunk-Methods.patch index b921b862db..a8d2e05833 100644 --- a/Spigot-Server-Patches/0494-Add-Plugin-Tickets-to-API-Chunk-Methods.patch +++ b/Spigot-Server-Patches/0495-Add-Plugin-Tickets-to-API-Chunk-Methods.patch @@ -22,10 +22,10 @@ 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 8c454db0986fe5c23f7b8ece0abdad1f1e36cf08..94c91b38ec71a03fc3bc5b1e15f9737cb0e8d1a8 100644 +index 9a2bc062dd0c05adf0de2f3534293fe4e4943ceb..530d337e0d1350294aeab5d6fd043496276067bf 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -346,7 +346,7 @@ public final class CraftServer implements Server { +@@ -347,7 +347,7 @@ public final class CraftServer implements Server { ambientSpawn = configuration.getInt("spawn-limits.ambient"); console.autosavePeriod = configuration.getInt("ticks-per.autosave"); warningState = WarningState.value(configuration.getString("settings.deprecated-verbose")); @@ -34,7 +34,7 @@ index 8c454db0986fe5c23f7b8ece0abdad1f1e36cf08..94c91b38ec71a03fc3bc5b1e15f9737c minimumAPI = configuration.getString("settings.minimum-api"); loadIcon(); } -@@ -834,7 +834,7 @@ public final class CraftServer implements Server { +@@ -838,7 +838,7 @@ public final class CraftServer implements Server { waterAmbientSpawn = configuration.getInt("spawn-limits.water-ambient"); ambientSpawn = configuration.getInt("spawn-limits.ambient"); warningState = WarningState.value(configuration.getString("settings.deprecated-verbose")); @@ -44,7 +44,7 @@ index 8c454db0986fe5c23f7b8ece0abdad1f1e36cf08..94c91b38ec71a03fc3bc5b1e15f9737c printSaveWarning = false; console.autosavePeriod = configuration.getInt("ticks-per.autosave"); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 925aa6dddb4f572a05e7b5be5a0a201162b7b1eb..e32e972b00098bf1851b7974218c24eee55682d9 100644 +index 560590c3c772eb91d562c622b627af36bf394609..10697f8b5208a72bf3d7248c5abd73ddd10420cd 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -407,9 +407,22 @@ public class CraftWorld implements World { @@ -112,7 +112,7 @@ index 925aa6dddb4f572a05e7b5be5a0a201162b7b1eb..e32e972b00098bf1851b7974218c24ee world.getChunkProvider().getChunkAt(x, z, ChunkStatus.FULL, true); return true; // Paper end -@@ -2536,6 +2551,7 @@ public class CraftWorld implements World { +@@ -2531,6 +2546,7 @@ public class CraftWorld implements World { } return this.world.getChunkProvider().getChunkAtAsynchronously(x, z, gen, urgent).thenComposeAsync((either) -> { net.minecraft.server.Chunk chunk = (net.minecraft.server.Chunk) either.left().orElse(null); diff --git a/Spigot-Server-Patches/0495-Fix-missing-chunks-due-to-integer-overflow.patch b/Spigot-Server-Patches/0496-Fix-missing-chunks-due-to-integer-overflow.patch similarity index 100% rename from Spigot-Server-Patches/0495-Fix-missing-chunks-due-to-integer-overflow.patch rename to Spigot-Server-Patches/0496-Fix-missing-chunks-due-to-integer-overflow.patch diff --git a/Spigot-Server-Patches/0496-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch b/Spigot-Server-Patches/0497-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch similarity index 100% rename from Spigot-Server-Patches/0496-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch rename to Spigot-Server-Patches/0497-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch diff --git a/Spigot-Server-Patches/0497-Fix-piston-physics-inconsistency-MC-188840.patch b/Spigot-Server-Patches/0498-Fix-piston-physics-inconsistency-MC-188840.patch similarity index 100% rename from Spigot-Server-Patches/0497-Fix-piston-physics-inconsistency-MC-188840.patch rename to Spigot-Server-Patches/0498-Fix-piston-physics-inconsistency-MC-188840.patch diff --git a/Spigot-Server-Patches/0498-Fix-sand-duping.patch b/Spigot-Server-Patches/0499-Fix-sand-duping.patch similarity index 100% rename from Spigot-Server-Patches/0498-Fix-sand-duping.patch rename to Spigot-Server-Patches/0499-Fix-sand-duping.patch diff --git a/Spigot-Server-Patches/0499-Prevent-position-desync-in-playerconnection-causing-.patch b/Spigot-Server-Patches/0500-Prevent-position-desync-in-playerconnection-causing-.patch similarity index 94% rename from Spigot-Server-Patches/0499-Prevent-position-desync-in-playerconnection-causing-.patch rename to Spigot-Server-Patches/0500-Prevent-position-desync-in-playerconnection-causing-.patch index 08e643ebf1..1b8a612743 100644 --- a/Spigot-Server-Patches/0499-Prevent-position-desync-in-playerconnection-causing-.patch +++ b/Spigot-Server-Patches/0500-Prevent-position-desync-in-playerconnection-causing-.patch @@ -14,7 +14,7 @@ behaviour, we need to move all of this dangerous logic outside of the move call and into an appropriate place in the tick method. diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 257c3489f9add056966cdb8eaaa49fa438369bb6..d47ad31ac47565298bc3e5614a78f7f42d5f4c11 100644 +index 9fe5c5109775f5d11bce47f88b78c20da971336e..cbcfafd0a48e0041340924931e57133cb6380622 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -1176,6 +1176,11 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0500-Fix-enderdragon-exp-dupe.patch b/Spigot-Server-Patches/0501-Fix-enderdragon-exp-dupe.patch similarity index 100% rename from Spigot-Server-Patches/0500-Fix-enderdragon-exp-dupe.patch rename to Spigot-Server-Patches/0501-Fix-enderdragon-exp-dupe.patch diff --git a/Spigot-Server-Patches/0501-Inventory-getHolder-method-without-block-snapshot.patch b/Spigot-Server-Patches/0502-Inventory-getHolder-method-without-block-snapshot.patch similarity index 100% rename from Spigot-Server-Patches/0501-Inventory-getHolder-method-without-block-snapshot.patch rename to Spigot-Server-Patches/0502-Inventory-getHolder-method-without-block-snapshot.patch diff --git a/Spigot-Server-Patches/0502-Expose-Arrow-getItemStack.patch b/Spigot-Server-Patches/0503-Expose-Arrow-getItemStack.patch similarity index 100% rename from Spigot-Server-Patches/0502-Expose-Arrow-getItemStack.patch rename to Spigot-Server-Patches/0503-Expose-Arrow-getItemStack.patch diff --git a/Spigot-Server-Patches/0503-Add-and-implement-PlayerRecipeBookClickEvent.patch b/Spigot-Server-Patches/0504-Add-and-implement-PlayerRecipeBookClickEvent.patch similarity index 92% rename from Spigot-Server-Patches/0503-Add-and-implement-PlayerRecipeBookClickEvent.patch rename to Spigot-Server-Patches/0504-Add-and-implement-PlayerRecipeBookClickEvent.patch index bb6090a5b2..c2a7364543 100644 --- a/Spigot-Server-Patches/0503-Add-and-implement-PlayerRecipeBookClickEvent.patch +++ b/Spigot-Server-Patches/0504-Add-and-implement-PlayerRecipeBookClickEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add and implement PlayerRecipeBookClickEvent diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index d47ad31ac47565298bc3e5614a78f7f42d5f4c11..9e8d28146658782c7a89dca7b12c68ea70e132b2 100644 +index cbcfafd0a48e0041340924931e57133cb6380622..c655fa9840feefdc6bf7156899eadceaa3a6cf21 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -2612,9 +2612,15 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -2615,9 +2615,15 @@ public class PlayerConnection implements PacketListenerPlayIn { PlayerConnectionUtils.ensureMainThread(packetplayinautorecipe, this, this.player.getWorldServer()); this.player.resetIdleTimer(); if (!this.player.isSpectator() && this.player.activeContainer.windowId == packetplayinautorecipe.b() && this.player.activeContainer.c(this.player) && this.player.activeContainer instanceof ContainerRecipeBook) { diff --git a/Spigot-Server-Patches/0504-Hide-sync-chunk-writes-behind-flag.patch b/Spigot-Server-Patches/0505-Hide-sync-chunk-writes-behind-flag.patch similarity index 100% rename from Spigot-Server-Patches/0504-Hide-sync-chunk-writes-behind-flag.patch rename to Spigot-Server-Patches/0505-Hide-sync-chunk-writes-behind-flag.patch diff --git a/Spigot-Server-Patches/0505-Limit-lightning-strike-effect-distance.patch b/Spigot-Server-Patches/0506-Limit-lightning-strike-effect-distance.patch similarity index 100% rename from Spigot-Server-Patches/0505-Limit-lightning-strike-effect-distance.patch rename to Spigot-Server-Patches/0506-Limit-lightning-strike-effect-distance.patch diff --git a/Spigot-Server-Patches/0506-Add-permission-for-command-blocks.patch b/Spigot-Server-Patches/0507-Add-permission-for-command-blocks.patch similarity index 98% rename from Spigot-Server-Patches/0506-Add-permission-for-command-blocks.patch rename to Spigot-Server-Patches/0507-Add-permission-for-command-blocks.patch index 9fb565dfe6..648b243044 100644 --- a/Spigot-Server-Patches/0506-Add-permission-for-command-blocks.patch +++ b/Spigot-Server-Patches/0507-Add-permission-for-command-blocks.patch @@ -31,7 +31,7 @@ index 7e13b1cf6d92c3e0f2dab1ba1d42bd4f250e256c..3820acd65f3cd488dba964e6d9c45885 } else { if (entityhuman.getWorld().isClientSide) { diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 9e8d28146658782c7a89dca7b12c68ea70e132b2..2d2fd9a45bcfd2b1da8b7dd109eb50257ab394c9 100644 +index c655fa9840feefdc6bf7156899eadceaa3a6cf21..7c3e5340d403fb2a1c055dd0ea40d7a7ec335e27 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -648,7 +648,7 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0507-Ensure-Entity-AABB-s-are-never-invalid.patch b/Spigot-Server-Patches/0508-Ensure-Entity-AABB-s-are-never-invalid.patch similarity index 95% rename from Spigot-Server-Patches/0507-Ensure-Entity-AABB-s-are-never-invalid.patch rename to Spigot-Server-Patches/0508-Ensure-Entity-AABB-s-are-never-invalid.patch index 3b2756b721..f34e3ff38e 100644 --- a/Spigot-Server-Patches/0507-Ensure-Entity-AABB-s-are-never-invalid.patch +++ b/Spigot-Server-Patches/0508-Ensure-Entity-AABB-s-are-never-invalid.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Ensure Entity AABB's are never invalid diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 53be44fad4db829359ee7541a08f438ebcf2bde1..1561ba9c1f3b8ccfeb8d799608550db2f5e18cbc 100644 +index feeb792e3357c14662a2a2dc5c294befd4bdc7c3..23e8de6d059a4976646184bc3a141d38291fadd1 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -389,7 +389,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/0508-Optimize-WorldBorder-collision-checks-and-air.patch b/Spigot-Server-Patches/0509-Optimize-WorldBorder-collision-checks-and-air.patch similarity index 97% rename from Spigot-Server-Patches/0508-Optimize-WorldBorder-collision-checks-and-air.patch rename to Spigot-Server-Patches/0509-Optimize-WorldBorder-collision-checks-and-air.patch index 06310a2a36..e622695b3c 100644 --- a/Spigot-Server-Patches/0508-Optimize-WorldBorder-collision-checks-and-air.patch +++ b/Spigot-Server-Patches/0509-Optimize-WorldBorder-collision-checks-and-air.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Optimize WorldBorder collision checks and air diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 1561ba9c1f3b8ccfeb8d799608550db2f5e18cbc..669bb644462bd374c6eb619c3c5c12f2533c0095 100644 +index 23e8de6d059a4976646184bc3a141d38291fadd1..ad5139428e8cc10ed702dce3fa9c091c22eafa15 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -818,7 +818,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/0509-Fix-Per-World-Difficulty-Remembering-Difficulty.patch b/Spigot-Server-Patches/0510-Fix-Per-World-Difficulty-Remembering-Difficulty.patch similarity index 96% rename from Spigot-Server-Patches/0509-Fix-Per-World-Difficulty-Remembering-Difficulty.patch rename to Spigot-Server-Patches/0510-Fix-Per-World-Difficulty-Remembering-Difficulty.patch index a39648beba..0cf3325f0c 100644 --- a/Spigot-Server-Patches/0509-Fix-Per-World-Difficulty-Remembering-Difficulty.patch +++ b/Spigot-Server-Patches/0510-Fix-Per-World-Difficulty-Remembering-Difficulty.patch @@ -61,10 +61,10 @@ index d0ce4b96174f85c545a457fe864c7ebadc727ade..ca417825eb0827caad817f65b5132f1d } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 2d2fd9a45bcfd2b1da8b7dd109eb50257ab394c9..d9911b214e83e4046b4ad82be904600a00955384 100644 +index 7c3e5340d403fb2a1c055dd0ea40d7a7ec335e27..bbfd4db220a4f95c473093ad4fb6cc2072af0082 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -2882,7 +2882,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -2884,7 +2884,7 @@ public class PlayerConnection implements PacketListenerPlayIn { public void a(PacketPlayInDifficultyChange packetplayindifficultychange) { PlayerConnectionUtils.ensureMainThread(packetplayindifficultychange, this, this.player.getWorldServer()); if (this.player.k(2) || this.isExemptPlayer()) { diff --git a/Spigot-Server-Patches/0510-Paper-dumpitem-command.patch b/Spigot-Server-Patches/0511-Paper-dumpitem-command.patch similarity index 100% rename from Spigot-Server-Patches/0510-Paper-dumpitem-command.patch rename to Spigot-Server-Patches/0511-Paper-dumpitem-command.patch diff --git a/Spigot-Server-Patches/0511-Don-t-allow-null-UUID-s-for-chat.patch b/Spigot-Server-Patches/0512-Don-t-allow-null-UUID-s-for-chat.patch similarity index 83% rename from Spigot-Server-Patches/0511-Don-t-allow-null-UUID-s-for-chat.patch rename to Spigot-Server-Patches/0512-Don-t-allow-null-UUID-s-for-chat.patch index 306d2a56f2..d8a641be1c 100644 --- a/Spigot-Server-Patches/0511-Don-t-allow-null-UUID-s-for-chat.patch +++ b/Spigot-Server-Patches/0512-Don-t-allow-null-UUID-s-for-chat.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Don't allow null UUID's for chat diff --git a/src/main/java/net/minecraft/server/PacketPlayOutChat.java b/src/main/java/net/minecraft/server/PacketPlayOutChat.java -index b9b2ddc1acadb96a0c750aeba0c0f6928f74e2fe..87f6ded6e7410702229ed066b2dcdb510853252d 100644 +index 18528c792ae12bd8753e8529f4b73b76407e67dc..f7019e874ae4d654fad115de80c307287ad180f3 100644 --- a/src/main/java/net/minecraft/server/PacketPlayOutChat.java +++ b/src/main/java/net/minecraft/server/PacketPlayOutChat.java -@@ -15,7 +15,7 @@ public class PacketPlayOutChat implements Packet { +@@ -16,7 +16,7 @@ public class PacketPlayOutChat implements Packet { public PacketPlayOutChat(IChatBaseComponent ichatbasecomponent, ChatMessageType chatmessagetype, UUID uuid) { this.a = ichatbasecomponent; this.b = chatmessagetype; diff --git a/Spigot-Server-Patches/0512-Improve-Legacy-Component-serialization-size.patch b/Spigot-Server-Patches/0513-Improve-Legacy-Component-serialization-size.patch similarity index 100% rename from Spigot-Server-Patches/0512-Improve-Legacy-Component-serialization-size.patch rename to Spigot-Server-Patches/0513-Improve-Legacy-Component-serialization-size.patch diff --git a/Spigot-Server-Patches/0513-Support-old-UUID-format-for-NBT.patch b/Spigot-Server-Patches/0514-Support-old-UUID-format-for-NBT.patch similarity index 100% rename from Spigot-Server-Patches/0513-Support-old-UUID-format-for-NBT.patch rename to Spigot-Server-Patches/0514-Support-old-UUID-format-for-NBT.patch diff --git a/Spigot-Server-Patches/0514-Clean-up-duplicated-GameProfile-Properties.patch b/Spigot-Server-Patches/0515-Clean-up-duplicated-GameProfile-Properties.patch similarity index 100% rename from Spigot-Server-Patches/0514-Clean-up-duplicated-GameProfile-Properties.patch rename to Spigot-Server-Patches/0515-Clean-up-duplicated-GameProfile-Properties.patch diff --git a/Spigot-Server-Patches/0515-Convert-legacy-attributes-in-Item-Meta.patch b/Spigot-Server-Patches/0516-Convert-legacy-attributes-in-Item-Meta.patch similarity index 97% rename from Spigot-Server-Patches/0515-Convert-legacy-attributes-in-Item-Meta.patch rename to Spigot-Server-Patches/0516-Convert-legacy-attributes-in-Item-Meta.patch index c0efaee737..1417fefe97 100644 --- a/Spigot-Server-Patches/0515-Convert-legacy-attributes-in-Item-Meta.patch +++ b/Spigot-Server-Patches/0516-Convert-legacy-attributes-in-Item-Meta.patch @@ -30,7 +30,7 @@ index bf3b236b2090fe4dd67e2f87b0b27c8d7186cb48..c5dd25add39298342a6f4b2a05e137de public CraftAttributeMap(AttributeMapBase handle) { this.handle = handle; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index ccf1c5d27f83d6a82a0fdb6ff839b7628538c705..99495722455b27ba90523c6d6dfd874aa2a8b3fe 100644 +index d14e640167e1d00b91ea63038cb434b9c83ce887..541c9f8ae334cc348ada8a65998f5a4b53eab4b3 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -479,7 +479,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { diff --git a/Spigot-Server-Patches/0516-Remove-some-streams-from-structures.patch b/Spigot-Server-Patches/0517-Remove-some-streams-from-structures.patch similarity index 100% rename from Spigot-Server-Patches/0516-Remove-some-streams-from-structures.patch rename to Spigot-Server-Patches/0517-Remove-some-streams-from-structures.patch diff --git a/Spigot-Server-Patches/0517-Remove-streams-from-classes-related-villager-gossip.patch b/Spigot-Server-Patches/0518-Remove-streams-from-classes-related-villager-gossip.patch similarity index 100% rename from Spigot-Server-Patches/0517-Remove-streams-from-classes-related-villager-gossip.patch rename to Spigot-Server-Patches/0518-Remove-streams-from-classes-related-villager-gossip.patch diff --git a/Spigot-Server-Patches/0518-Support-components-in-ItemMeta.patch b/Spigot-Server-Patches/0519-Support-components-in-ItemMeta.patch similarity index 72% rename from Spigot-Server-Patches/0518-Support-components-in-ItemMeta.patch rename to Spigot-Server-Patches/0519-Support-components-in-ItemMeta.patch index 86d4288926..f771188233 100644 --- a/Spigot-Server-Patches/0518-Support-components-in-ItemMeta.patch +++ b/Spigot-Server-Patches/0519-Support-components-in-ItemMeta.patch @@ -4,23 +4,11 @@ Date: Sat, 6 Jun 2020 18:13:42 +0200 Subject: [PATCH] Support components in ItemMeta -diff --git a/src/main/java/net/minecraft/server/IChatBaseComponent.java b/src/main/java/net/minecraft/server/IChatBaseComponent.java -index b8770066a86df25d6ba9ecf74d846c730d228c01..2eb45e8e05b1a2ad6b8fcb204f2d2b06f9861643 100644 ---- a/src/main/java/net/minecraft/server/IChatBaseComponent.java -+++ b/src/main/java/net/minecraft/server/IChatBaseComponent.java -@@ -344,6 +344,7 @@ public interface IChatBaseComponent extends Message, IChatFormatted, Iterable(Lists.transform(this.lore, CraftChatMessage::fromJSONComponent)); } @@ -59,7 +47,7 @@ index 99495722455b27ba90523c6d6dfd874aa2a8b3fe..a11591aa103ea53b505a2b396dcfc0f9 @Override public void setLore(List lore) { if (lore == null || lore.isEmpty()) { -@@ -1010,6 +1030,21 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1034,6 +1054,21 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { } } @@ -81,7 +69,7 @@ index 99495722455b27ba90523c6d6dfd874aa2a8b3fe..a11591aa103ea53b505a2b396dcfc0f9 @Override public boolean hasCustomModelData() { return customModelData != null; -@@ -1471,6 +1506,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1495,6 +1530,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { } for (Object object : addFrom) { diff --git a/Spigot-Server-Patches/0519-Improve-EntityTargetLivingEntityEvent-for-1.16-mobs.patch b/Spigot-Server-Patches/0520-Improve-EntityTargetLivingEntityEvent-for-1.16-mobs.patch similarity index 100% rename from Spigot-Server-Patches/0519-Improve-EntityTargetLivingEntityEvent-for-1.16-mobs.patch rename to Spigot-Server-Patches/0520-Improve-EntityTargetLivingEntityEvent-for-1.16-mobs.patch diff --git a/Spigot-Server-Patches/0520-Add-entity-liquid-API.patch b/Spigot-Server-Patches/0521-Add-entity-liquid-API.patch similarity index 91% rename from Spigot-Server-Patches/0520-Add-entity-liquid-API.patch rename to Spigot-Server-Patches/0521-Add-entity-liquid-API.patch index 6f8fb16cda..4e63f6761f 100644 --- a/Spigot-Server-Patches/0520-Add-entity-liquid-API.patch +++ b/Spigot-Server-Patches/0521-Add-entity-liquid-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add entity liquid API diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 669bb644462bd374c6eb619c3c5c12f2533c0095..5c52a2988b8830e4e5597f8a5b3718d242023cb7 100644 +index ad5139428e8cc10ed702dce3fa9c091c22eafa15..83a469447e39b801442769fcb5979e987e2adae9 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -1075,12 +1075,13 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -40,10 +40,10 @@ index 669bb644462bd374c6eb619c3c5c12f2533c0095..5c52a2988b8830e4e5597f8a5b3718d2 return !this.justCreated && this.M.getDouble(TagsFluid.LAVA) > 0.0D; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index 666876943675a8c299b414f6b5ea359aac186961..c7636ffc952c436d7148e6e5926b0108cc628821 100644 +index 017410819a628c1b373f45ac5a0e9f00dd56639e..dc42bd1b2b89881789481d736a57011936857abf 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -@@ -1120,5 +1120,29 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { +@@ -1134,5 +1134,29 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { public org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason getEntitySpawnReason() { return getHandle().spawnReason; } diff --git a/Spigot-Server-Patches/0521-Update-itemstack-legacy-name-and-lore.patch b/Spigot-Server-Patches/0522-Update-itemstack-legacy-name-and-lore.patch similarity index 84% rename from Spigot-Server-Patches/0521-Update-itemstack-legacy-name-and-lore.patch rename to Spigot-Server-Patches/0522-Update-itemstack-legacy-name-and-lore.patch index 687777151b..07dcdf21e5 100644 --- a/Spigot-Server-Patches/0521-Update-itemstack-legacy-name-and-lore.patch +++ b/Spigot-Server-Patches/0522-Update-itemstack-legacy-name-and-lore.patch @@ -69,15 +69,3 @@ index b6f771ed5032cd18b1bcc086a937f66996a26057..a3d8d8ec0e99435a58ab93a7b1f90d16 @Nullable public NBTTagCompound b(String s) { return this.tag != null && this.tag.hasKeyOfType(s, 10) ? this.tag.getCompound(s) : null; -diff --git a/src/main/java/net/minecraft/server/NBTTagString.java b/src/main/java/net/minecraft/server/NBTTagString.java -index 7ef2378311edd0645472d895cf3756426f25605d..a4747d5dc04ff1e1ec5fd35f927db7d452ea5ae4 100644 ---- a/src/main/java/net/minecraft/server/NBTTagString.java -+++ b/src/main/java/net/minecraft/server/NBTTagString.java -@@ -40,6 +40,7 @@ public class NBTTagString implements NBTBase { - this.data = s; - } - -+ public static NBTTagString create(String s) { return a(s); } // Paper - OBFHELPER - public static NBTTagString a(String s) { - return s.isEmpty() ? NBTTagString.b : new NBTTagString(s); - } diff --git a/Spigot-Server-Patches/0522-Spawn-player-in-correct-world-on-login.patch b/Spigot-Server-Patches/0523-Spawn-player-in-correct-world-on-login.patch similarity index 90% rename from Spigot-Server-Patches/0522-Spawn-player-in-correct-world-on-login.patch rename to Spigot-Server-Patches/0523-Spawn-player-in-correct-world-on-login.patch index bc68f3dca1..aa460a2063 100644 --- a/Spigot-Server-Patches/0522-Spawn-player-in-correct-world-on-login.patch +++ b/Spigot-Server-Patches/0523-Spawn-player-in-correct-world-on-login.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Spawn player in correct world on login diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 82e3ddc25f1b9f3cbf25a457227335df27ae5d0f..4bbf55379a02ab21b8caac96f894dc920a083635 100644 +index e7900a3f5ef54108bfe8397d7ee096563a9f9fa1..1da28f6eb3cf7d31e0b491238ec234236afc5b5a 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -119,7 +119,18 @@ public abstract class PlayerList { +@@ -121,7 +121,18 @@ public abstract class PlayerList { }String lastKnownName = s; // Paper // CraftBukkit end diff --git a/Spigot-Server-Patches/0523-Add-PrepareResultEvent.patch b/Spigot-Server-Patches/0524-Add-PrepareResultEvent.patch similarity index 98% rename from Spigot-Server-Patches/0523-Add-PrepareResultEvent.patch rename to Spigot-Server-Patches/0524-Add-PrepareResultEvent.patch index 9d968573d6..3b45055649 100644 --- a/Spigot-Server-Patches/0523-Add-PrepareResultEvent.patch +++ b/Spigot-Server-Patches/0524-Add-PrepareResultEvent.patch @@ -106,10 +106,10 @@ index ba3db09763d94d730c3fe8662e4dbb24e0636786..3506473f9b9f4c747f7b737d9bd02bef private void a(IInventory iinventory, ItemStack itemstack) { diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 44cf5fe48650790b3372e9ebbb0b5d6c4b997f62..fe36039b7dbfeebc1e01a9cefc5f8f391087fee6 100644 +index 661f66f4ba2273c4c88c38de431543a1e2d7fa0a..91832e76f22742f85a6de7e1d4f79a9406f98839 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1509,19 +1509,44 @@ public class CraftEventFactory { +@@ -1515,19 +1515,44 @@ public class CraftEventFactory { return event; } diff --git a/Spigot-Server-Patches/0524-Allow-delegation-to-vanilla-chunk-gen.patch b/Spigot-Server-Patches/0525-Allow-delegation-to-vanilla-chunk-gen.patch similarity index 94% rename from Spigot-Server-Patches/0524-Allow-delegation-to-vanilla-chunk-gen.patch rename to Spigot-Server-Patches/0525-Allow-delegation-to-vanilla-chunk-gen.patch index 500efd469d..676bf7aabf 100644 --- a/Spigot-Server-Patches/0524-Allow-delegation-to-vanilla-chunk-gen.patch +++ b/Spigot-Server-Patches/0525-Allow-delegation-to-vanilla-chunk-gen.patch @@ -27,10 +27,10 @@ index b51613040e4583ff056060b47b1f97a86ebcde51..5366314e5f889b5b8d7740bbd0f024d9 for (int l = 0; l < k; ++l) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 94c91b38ec71a03fc3bc5b1e15f9737cb0e8d1a8..ea347aee98408e2af87ebbd8c57967dc743a8a19 100644 +index 530d337e0d1350294aeab5d6fd043496276067bf..5de62da91bc31aae1dff9fedcce11631a6c6ddc7 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1979,6 +1979,32 @@ public final class CraftServer implements Server { +@@ -2028,6 +2028,32 @@ public final class CraftServer implements Server { return new CraftChunkData(world); } @@ -90,10 +90,10 @@ index bb18740ebdf4a14ced9944efa82103b350b32ba5..948a59217cca0f8dfa9d3befb61e679a return tiles; } diff --git a/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java b/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java -index 69429e267fbe3f7c31634f98e6fbbbd988d4451e..bd7985cf2dd932ffcca2be61ddba97ee3a8927d0 100644 +index c8bce32eac7437a791c7088072b603f634b6036f..41ac4e6415c3ca2fe6b5ffb2c0dde55a21b7033b 100644 --- a/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java +++ b/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java -@@ -33,7 +33,7 @@ import org.bukkit.generator.ChunkGenerator.ChunkData; +@@ -40,7 +40,7 @@ import org.bukkit.generator.ChunkGenerator.ChunkData; public class CustomChunkGenerator extends InternalChunkGenerator { diff --git a/Spigot-Server-Patches/0525-Don-t-check-chunk-for-portal-on-world-gen-entity-add.patch b/Spigot-Server-Patches/0526-Don-t-check-chunk-for-portal-on-world-gen-entity-add.patch similarity index 100% rename from Spigot-Server-Patches/0525-Don-t-check-chunk-for-portal-on-world-gen-entity-add.patch rename to Spigot-Server-Patches/0526-Don-t-check-chunk-for-portal-on-world-gen-entity-add.patch diff --git a/Spigot-Server-Patches/0526-Optimize-NetworkManager-Exception-Handling.patch b/Spigot-Server-Patches/0527-Optimize-NetworkManager-Exception-Handling.patch similarity index 97% rename from Spigot-Server-Patches/0526-Optimize-NetworkManager-Exception-Handling.patch rename to Spigot-Server-Patches/0527-Optimize-NetworkManager-Exception-Handling.patch index 2c6ec15d51..e0061a881a 100644 --- a/Spigot-Server-Patches/0526-Optimize-NetworkManager-Exception-Handling.patch +++ b/Spigot-Server-Patches/0527-Optimize-NetworkManager-Exception-Handling.patch @@ -44,7 +44,7 @@ index cdaa8be90d16b0e9e2f92a3e2ed120b856feab54..2aaa8770edfd8acc6861c23176e40586 for (int i = 0; i < abyte.length; ++i) { if (!bytebuf.isReadable()) { diff --git a/src/main/java/net/minecraft/server/PlayerConnectionUtils.java b/src/main/java/net/minecraft/server/PlayerConnectionUtils.java -index 9c810b5aa21ca714ccf355d5648b7612f99b6884..8c7080777b370f97e1291dfedde5b419290f39cc 100644 +index eb3269e0ea3ce33d08e9eee3bca7cf434921e991..7ea293f38dedd6066601d94adbe175a31c502e1f 100644 --- a/src/main/java/net/minecraft/server/PlayerConnectionUtils.java +++ b/src/main/java/net/minecraft/server/PlayerConnectionUtils.java @@ -22,6 +22,21 @@ public class PlayerConnectionUtils { diff --git a/Spigot-Server-Patches/0527-Fix-Concurrency-issue-in-WeightedList.patch b/Spigot-Server-Patches/0528-Fix-Concurrency-issue-in-WeightedList.patch similarity index 100% rename from Spigot-Server-Patches/0527-Fix-Concurrency-issue-in-WeightedList.patch rename to Spigot-Server-Patches/0528-Fix-Concurrency-issue-in-WeightedList.patch diff --git a/Spigot-Server-Patches/0528-Optimize-the-advancement-data-player-iteration-to-be.patch b/Spigot-Server-Patches/0529-Optimize-the-advancement-data-player-iteration-to-be.patch similarity index 100% rename from Spigot-Server-Patches/0528-Optimize-the-advancement-data-player-iteration-to-be.patch rename to Spigot-Server-Patches/0529-Optimize-the-advancement-data-player-iteration-to-be.patch diff --git a/Spigot-Server-Patches/0529-Fix-arrows-never-despawning-MC-125757.patch b/Spigot-Server-Patches/0530-Fix-arrows-never-despawning-MC-125757.patch similarity index 100% rename from Spigot-Server-Patches/0529-Fix-arrows-never-despawning-MC-125757.patch rename to Spigot-Server-Patches/0530-Fix-arrows-never-despawning-MC-125757.patch diff --git a/Spigot-Server-Patches/0530-Thread-Safe-Vanilla-Command-permission-checking.patch b/Spigot-Server-Patches/0531-Thread-Safe-Vanilla-Command-permission-checking.patch similarity index 100% rename from Spigot-Server-Patches/0530-Thread-Safe-Vanilla-Command-permission-checking.patch rename to Spigot-Server-Patches/0531-Thread-Safe-Vanilla-Command-permission-checking.patch diff --git a/Spigot-Server-Patches/0531-Move-range-check-for-block-placing-up.patch b/Spigot-Server-Patches/0532-Move-range-check-for-block-placing-up.patch similarity index 96% rename from Spigot-Server-Patches/0531-Move-range-check-for-block-placing-up.patch rename to Spigot-Server-Patches/0532-Move-range-check-for-block-placing-up.patch index 71078ed629..ce2e4b0b17 100644 --- a/Spigot-Server-Patches/0531-Move-range-check-for-block-placing-up.patch +++ b/Spigot-Server-Patches/0532-Move-range-check-for-block-placing-up.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Move range check for block placing up diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index d9911b214e83e4046b4ad82be904600a00955384..601a6fdf52ac0002f130ea27d4dd3e6f64acc381 100644 +index bbfd4db220a4f95c473093ad4fb6cc2072af0082..c7543b0f4172384210dde152b56908414e68ddda 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -1512,15 +1512,19 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0532-Fix-SPIGOT-5989.patch b/Spigot-Server-Patches/0533-Fix-SPIGOT-5989.patch similarity index 90% rename from Spigot-Server-Patches/0532-Fix-SPIGOT-5989.patch rename to Spigot-Server-Patches/0533-Fix-SPIGOT-5989.patch index 226d42d65b..e7077f950a 100644 --- a/Spigot-Server-Patches/0532-Fix-SPIGOT-5989.patch +++ b/Spigot-Server-Patches/0533-Fix-SPIGOT-5989.patch @@ -10,10 +10,10 @@ This fixes that by checking if the modified spawn location is still at a respawn anchor. diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 4bbf55379a02ab21b8caac96f894dc920a083635..1f7ded35ee0586c27d8cceabcb20ccb2369e8c02 100644 +index 1da28f6eb3cf7d31e0b491238ec234236afc5b5a..4e2892f36fbc0176cbd6a250c0d23248f693972c 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -770,6 +770,7 @@ public abstract class PlayerList { +@@ -772,6 +772,7 @@ public abstract class PlayerList { // Paper start boolean isBedSpawn = false; boolean isRespawn = false; @@ -21,7 +21,7 @@ index 4bbf55379a02ab21b8caac96f894dc920a083635..1f7ded35ee0586c27d8cceabcb20ccb2 // Paper end // CraftBukkit start - fire PlayerRespawnEvent -@@ -780,7 +781,7 @@ public abstract class PlayerList { +@@ -782,7 +783,7 @@ public abstract class PlayerList { Optional optional; if (blockposition != null) { @@ -30,7 +30,7 @@ index 4bbf55379a02ab21b8caac96f894dc920a083635..1f7ded35ee0586c27d8cceabcb20ccb2 } else { optional = Optional.empty(); } -@@ -823,7 +824,12 @@ public abstract class PlayerList { +@@ -825,7 +826,12 @@ public abstract class PlayerList { } // Spigot End @@ -44,7 +44,7 @@ index 4bbf55379a02ab21b8caac96f894dc920a083635..1f7ded35ee0586c27d8cceabcb20ccb2 if (!flag) entityplayer.reset(); // SPIGOT-4785 isRespawn = true; // Paper } else { -@@ -861,8 +867,12 @@ public abstract class PlayerList { +@@ -863,8 +869,12 @@ public abstract class PlayerList { } // entityplayer1.syncInventory(); entityplayer1.setHealth(entityplayer1.getHealth()); diff --git a/Spigot-Server-Patches/0533-Fix-SPIGOT-5824-Bukkit-world-container-is-not-used.patch b/Spigot-Server-Patches/0534-Fix-SPIGOT-5824-Bukkit-world-container-is-not-used.patch similarity index 100% rename from Spigot-Server-Patches/0533-Fix-SPIGOT-5824-Bukkit-world-container-is-not-used.patch rename to Spigot-Server-Patches/0534-Fix-SPIGOT-5824-Bukkit-world-container-is-not-used.patch diff --git a/Spigot-Server-Patches/0534-Fix-SPIGOT-5885-Unable-to-disable-advancements.patch b/Spigot-Server-Patches/0535-Fix-SPIGOT-5885-Unable-to-disable-advancements.patch similarity index 100% rename from Spigot-Server-Patches/0534-Fix-SPIGOT-5885-Unable-to-disable-advancements.patch rename to Spigot-Server-Patches/0535-Fix-SPIGOT-5885-Unable-to-disable-advancements.patch diff --git a/Spigot-Server-Patches/0535-Fix-AdvancementDataPlayer-leak-due-from-quitting-ear.patch b/Spigot-Server-Patches/0536-Fix-AdvancementDataPlayer-leak-due-from-quitting-ear.patch similarity index 100% rename from Spigot-Server-Patches/0535-Fix-AdvancementDataPlayer-leak-due-from-quitting-ear.patch rename to Spigot-Server-Patches/0536-Fix-AdvancementDataPlayer-leak-due-from-quitting-ear.patch diff --git a/Spigot-Server-Patches/0536-Add-missing-strikeLighting-call-to-World-spigot-stri.patch b/Spigot-Server-Patches/0537-Add-missing-strikeLighting-call-to-World-spigot-stri.patch similarity index 83% rename from Spigot-Server-Patches/0536-Add-missing-strikeLighting-call-to-World-spigot-stri.patch rename to Spigot-Server-Patches/0537-Add-missing-strikeLighting-call-to-World-spigot-stri.patch index c9713cbe10..61be8b9226 100644 --- a/Spigot-Server-Patches/0536-Add-missing-strikeLighting-call-to-World-spigot-stri.patch +++ b/Spigot-Server-Patches/0537-Add-missing-strikeLighting-call-to-World-spigot-stri.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add missing strikeLighting call to diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index e32e972b00098bf1851b7974218c24eee55682d9..ed55a1e6943fb9cdc763d1b7340e3ec53a46106e 100644 +index 10697f8b5208a72bf3d7248c5abd73ddd10420cd..f3aab5be1722651a27bb48a33618650b807d4e07 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -2614,6 +2614,7 @@ public class CraftWorld implements World { +@@ -2609,6 +2609,7 @@ public class CraftWorld implements World { lightning.teleportAndSync( loc.getX(), loc.getY(), loc.getZ() ); lightning.isEffect = true; lightning.isSilent = isSilent; diff --git a/Spigot-Server-Patches/0537-Fix-some-rails-connecting-improperly.patch b/Spigot-Server-Patches/0538-Fix-some-rails-connecting-improperly.patch similarity index 100% rename from Spigot-Server-Patches/0537-Fix-some-rails-connecting-improperly.patch rename to Spigot-Server-Patches/0538-Fix-some-rails-connecting-improperly.patch diff --git a/Spigot-Server-Patches/0538-Optimize-Pathfinder-Remove-Streams-Optimized-collect.patch b/Spigot-Server-Patches/0539-Optimize-Pathfinder-Remove-Streams-Optimized-collect.patch similarity index 100% rename from Spigot-Server-Patches/0538-Optimize-Pathfinder-Remove-Streams-Optimized-collect.patch rename to Spigot-Server-Patches/0539-Optimize-Pathfinder-Remove-Streams-Optimized-collect.patch diff --git a/Spigot-Server-Patches/0539-Incremental-player-saving.patch b/Spigot-Server-Patches/0540-Incremental-player-saving.patch similarity index 93% rename from Spigot-Server-Patches/0539-Incremental-player-saving.patch rename to Spigot-Server-Patches/0540-Incremental-player-saving.patch index 90a5aaa5d9..9ae84a5f9f 100644 --- a/Spigot-Server-Patches/0539-Incremental-player-saving.patch +++ b/Spigot-Server-Patches/0540-Incremental-player-saving.patch @@ -25,10 +25,10 @@ index fd3b4a01c84da110d41b7224ebb38ae78b389f79..deb77934dcba8c9209c942a6521dd848 + } } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 804ac31e83e40a532999d546eaac0aae3642ec28..f09c1367f375dc6930fb95ec8f216c6c421a34ea 100644 +index dbc9cc0728d1f9de89e15ecf5ccd6f8b07cd0788..7e5e4acb3c892a5d366e0fbfb76b97884345ec24 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -44,6 +44,7 @@ import org.bukkit.inventory.MainHand; +@@ -45,6 +45,7 @@ import org.bukkit.inventory.MainHand; public class EntityPlayer extends EntityHuman implements ICrafting { private static final Logger LOGGER = LogManager.getLogger(); @@ -59,10 +59,10 @@ index ca417825eb0827caad817f65b5132f1de37e3679..69fcfff3f21168f334fd526cb65e63e0 // Paper start for (WorldServer world : getWorlds()) { diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 1f7ded35ee0586c27d8cceabcb20ccb2369e8c02..ad6207dfb9b524b6d85bf8d904527db04672661d 100644 +index 4e2892f36fbc0176cbd6a250c0d23248f693972c..0592ee3511d5532440944af45fe5428077c88d7f 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -482,6 +482,7 @@ public abstract class PlayerList { +@@ -484,6 +484,7 @@ public abstract class PlayerList { protected void savePlayerFile(EntityPlayer entityplayer) { if (!entityplayer.getBukkitEntity().isPersistent()) return; // CraftBukkit if (!entityplayer.didPlayerJoinEvent) return; // Paper - If we never fired PJE, we disconnected during login. Data has not changed, and additionally, our saved vehicle is not loaded! If we save now, we will lose our vehicle (CraftBukkit bug) @@ -70,7 +70,7 @@ index 1f7ded35ee0586c27d8cceabcb20ccb2369e8c02..ad6207dfb9b524b6d85bf8d904527db0 this.playerFileData.save(entityplayer); ServerStatisticManager serverstatisticmanager = (ServerStatisticManager) entityplayer.getStatisticManager(); // CraftBukkit -@@ -1141,10 +1142,21 @@ public abstract class PlayerList { +@@ -1143,10 +1144,21 @@ public abstract class PlayerList { } public void savePlayers() { diff --git a/Spigot-Server-Patches/0540-Import-fastutil-classes.patch b/Spigot-Server-Patches/0541-Import-fastutil-classes.patch similarity index 100% rename from Spigot-Server-Patches/0540-Import-fastutil-classes.patch rename to Spigot-Server-Patches/0541-Import-fastutil-classes.patch diff --git a/Spigot-Server-Patches/0541-Don-t-mark-null-chunk-sections-for-block-updates.patch b/Spigot-Server-Patches/0542-Don-t-mark-null-chunk-sections-for-block-updates.patch similarity index 88% rename from Spigot-Server-Patches/0541-Don-t-mark-null-chunk-sections-for-block-updates.patch rename to Spigot-Server-Patches/0542-Don-t-mark-null-chunk-sections-for-block-updates.patch index 39d5b13619..bdcec6e3fc 100644 --- a/Spigot-Server-Patches/0541-Don-t-mark-null-chunk-sections-for-block-updates.patch +++ b/Spigot-Server-Patches/0542-Don-t-mark-null-chunk-sections-for-block-updates.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Don't mark null chunk sections for block updates diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java -index afea606641c27e2ea8769455833b96e3f012e78e..b374ea7d4a1a2ed3149a2c945e009d5558e1ab4c 100644 +index acb07a2a7a7606470aa938ffc8f6a54fd7b9f5f9..014c0249b22eb4703d2d6b430afb402689a54e2a 100644 --- a/src/main/java/net/minecraft/server/PlayerChunk.java +++ b/src/main/java/net/minecraft/server/PlayerChunk.java -@@ -424,6 +424,7 @@ public class PlayerChunk { +@@ -420,6 +420,7 @@ public class PlayerChunk { this.a(world, blockposition, iblockdata); } else { ChunkSection chunksection = chunk.getSections()[sectionposition.getY()]; diff --git a/Spigot-Server-Patches/0542-Remove-armour-stand-double-add-to-world.patch b/Spigot-Server-Patches/0543-Remove-armour-stand-double-add-to-world.patch similarity index 100% rename from Spigot-Server-Patches/0542-Remove-armour-stand-double-add-to-world.patch rename to Spigot-Server-Patches/0543-Remove-armour-stand-double-add-to-world.patch diff --git a/Spigot-Server-Patches/0543-Fix-MC-187716-Use-configured-height.patch b/Spigot-Server-Patches/0544-Fix-MC-187716-Use-configured-height.patch similarity index 100% rename from Spigot-Server-Patches/0543-Fix-MC-187716-Use-configured-height.patch rename to Spigot-Server-Patches/0544-Fix-MC-187716-Use-configured-height.patch diff --git a/Spigot-Server-Patches/0544-Fix-regex-mistake-in-CB-NBT-int-deserialization.patch b/Spigot-Server-Patches/0545-Fix-regex-mistake-in-CB-NBT-int-deserialization.patch similarity index 100% rename from Spigot-Server-Patches/0544-Fix-regex-mistake-in-CB-NBT-int-deserialization.patch rename to Spigot-Server-Patches/0545-Fix-regex-mistake-in-CB-NBT-int-deserialization.patch diff --git a/Spigot-Server-Patches/0545-Do-not-let-the-server-load-chunks-from-newer-version.patch b/Spigot-Server-Patches/0546-Do-not-let-the-server-load-chunks-from-newer-version.patch similarity index 100% rename from Spigot-Server-Patches/0545-Do-not-let-the-server-load-chunks-from-newer-version.patch rename to Spigot-Server-Patches/0546-Do-not-let-the-server-load-chunks-from-newer-version.patch diff --git a/Spigot-Server-Patches/0546-Brand-support.patch b/Spigot-Server-Patches/0547-Brand-support.patch similarity index 87% rename from Spigot-Server-Patches/0546-Brand-support.patch rename to Spigot-Server-Patches/0547-Brand-support.patch index b4ea10f63a..3281d5b048 100644 --- a/Spigot-Server-Patches/0546-Brand-support.patch +++ b/Spigot-Server-Patches/0547-Brand-support.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Brand support diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 601a6fdf52ac0002f130ea27d4dd3e6f64acc381..f1e3c764fc8d5b6acb2ae94276e31fe37af817b6 100644 +index c7543b0f4172384210dde152b56908414e68ddda..d140832157bb502c0792993a2d9415c50e78a05b 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -5,6 +5,7 @@ import com.google.common.primitives.Doubles; @@ -16,7 +16,7 @@ index 601a6fdf52ac0002f130ea27d4dd3e6f64acc381..f1e3c764fc8d5b6acb2ae94276e31fe3 import io.netty.util.concurrent.Future; import io.netty.util.concurrent.GenericFutureListener; import it.unimi.dsi.fastutil.ints.Int2ShortMap; -@@ -112,6 +113,8 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -114,6 +115,8 @@ public class PlayerConnection implements PacketListenerPlayIn { private static final int MAX_SIGN_LINE_LENGTH = Integer.getInteger("Paper.maxSignLength", 80); private static final long KEEPALIVE_LIMIT = Long.getLong("paper.playerconnection.keepalive", 30) * 1000; // Paper - provide property to set keepalive limit @@ -25,7 +25,7 @@ index 601a6fdf52ac0002f130ea27d4dd3e6f64acc381..f1e3c764fc8d5b6acb2ae94276e31fe3 public PlayerConnection(MinecraftServer minecraftserver, NetworkManager networkmanager, EntityPlayer entityplayer) { this.minecraftServer = minecraftserver; this.networkManager = networkmanager; -@@ -2841,6 +2844,8 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -2843,6 +2846,8 @@ public class PlayerConnection implements PacketListenerPlayIn { private static final MinecraftKey CUSTOM_REGISTER = new MinecraftKey("register"); private static final MinecraftKey CUSTOM_UNREGISTER = new MinecraftKey("unregister"); @@ -34,7 +34,7 @@ index 601a6fdf52ac0002f130ea27d4dd3e6f64acc381..f1e3c764fc8d5b6acb2ae94276e31fe3 @Override public void a(PacketPlayInCustomPayload packetplayincustompayload) { PlayerConnectionUtils.ensureMainThread(packetplayincustompayload, this, this.player.getWorldServer()); -@@ -2868,6 +2873,16 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -2870,6 +2875,16 @@ public class PlayerConnection implements PacketListenerPlayIn { try { byte[] data = new byte[packetplayincustompayload.data.readableBytes()]; packetplayincustompayload.data.readBytes(data); @@ -51,7 +51,7 @@ index 601a6fdf52ac0002f130ea27d4dd3e6f64acc381..f1e3c764fc8d5b6acb2ae94276e31fe3 server.getMessenger().dispatchIncomingMessage(player.getBukkitEntity(), packetplayincustompayload.tag.toString(), data); } catch (Exception ex) { PlayerConnection.LOGGER.error("Couldn\'t dispatch custom payload", ex); -@@ -2877,6 +2892,12 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -2879,6 +2894,12 @@ public class PlayerConnection implements PacketListenerPlayIn { } @@ -65,10 +65,10 @@ index 601a6fdf52ac0002f130ea27d4dd3e6f64acc381..f1e3c764fc8d5b6acb2ae94276e31fe3 return (!this.player.joining && !this.networkManager.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 3ca98b422fb0836a08abd1663a940bd22c565eb8..fb871480a55d73681f2a45f6f14b984807d51ba3 100644 +index e8448061b34b7f577c89eb5a3186d5c30c8e48d8..3846e926e2442bc15dff41c70c5f2176f1c678be 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -2189,6 +2189,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2394,6 +2394,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { // Paper end }; diff --git a/Spigot-Server-Patches/0547-Fix-MC-99259-Wither-Boss-Bar-doesn-t-update-until-in.patch b/Spigot-Server-Patches/0548-Fix-MC-99259-Wither-Boss-Bar-doesn-t-update-until-in.patch similarity index 100% rename from Spigot-Server-Patches/0547-Fix-MC-99259-Wither-Boss-Bar-doesn-t-update-until-in.patch rename to Spigot-Server-Patches/0548-Fix-MC-99259-Wither-Boss-Bar-doesn-t-update-until-in.patch diff --git a/Spigot-Server-Patches/0548-Fix-MC-197271.patch b/Spigot-Server-Patches/0549-Fix-MC-197271.patch similarity index 100% rename from Spigot-Server-Patches/0548-Fix-MC-197271.patch rename to Spigot-Server-Patches/0549-Fix-MC-197271.patch diff --git a/Spigot-Server-Patches/0549-MC-197883-Bandaid-decode-issue.patch b/Spigot-Server-Patches/0550-MC-197883-Bandaid-decode-issue.patch similarity index 100% rename from Spigot-Server-Patches/0549-MC-197883-Bandaid-decode-issue.patch rename to Spigot-Server-Patches/0550-MC-197883-Bandaid-decode-issue.patch diff --git a/Spigot-Server-Patches/0550-Add-setMaxPlayers-API.patch b/Spigot-Server-Patches/0551-Add-setMaxPlayers-API.patch similarity index 82% rename from Spigot-Server-Patches/0550-Add-setMaxPlayers-API.patch rename to Spigot-Server-Patches/0551-Add-setMaxPlayers-API.patch index 2366baa118..2cf2e2e44e 100644 --- a/Spigot-Server-Patches/0550-Add-setMaxPlayers-API.patch +++ b/Spigot-Server-Patches/0551-Add-setMaxPlayers-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add #setMaxPlayers API diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index ad6207dfb9b524b6d85bf8d904527db04672661d..dc3df171a6eb11f13272303951fb59a14d7df202 100644 +index 0592ee3511d5532440944af45fe5428077c88d7f..9080f28d8c8ce20ea9934384bd14932145c64de0 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -67,7 +67,7 @@ public abstract class PlayerList { +@@ -69,7 +69,7 @@ public abstract class PlayerList { public final WorldNBTStorage playerFileData; private boolean hasWhitelist; private final IRegistryCustom.Dimension s; @@ -18,10 +18,10 @@ index ad6207dfb9b524b6d85bf8d904527db04672661d..dc3df171a6eb11f13272303951fb59a1 private EnumGamemode u; private boolean v; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index ea347aee98408e2af87ebbd8c57967dc743a8a19..69b1add508a96df71a37289da28ed1b8c17ef395 100644 +index 5de62da91bc31aae1dff9fedcce11631a6c6ddc7..c87124e4d4933a0aac643b6c84f445faf182294d 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -615,6 +615,13 @@ public final class CraftServer implements Server { +@@ -619,6 +619,13 @@ public final class CraftServer implements Server { return playerList.getMaxPlayers(); } diff --git a/Spigot-Server-Patches/0551-Add-playPickupItemAnimation-to-LivingEntity.patch b/Spigot-Server-Patches/0552-Add-playPickupItemAnimation-to-LivingEntity.patch similarity index 100% rename from Spigot-Server-Patches/0551-Add-playPickupItemAnimation-to-LivingEntity.patch rename to Spigot-Server-Patches/0552-Add-playPickupItemAnimation-to-LivingEntity.patch diff --git a/Spigot-Server-Patches/0552-Don-t-require-FACING-data.patch b/Spigot-Server-Patches/0553-Don-t-require-FACING-data.patch similarity index 100% rename from Spigot-Server-Patches/0552-Don-t-require-FACING-data.patch rename to Spigot-Server-Patches/0553-Don-t-require-FACING-data.patch diff --git a/Spigot-Server-Patches/0553-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch b/Spigot-Server-Patches/0554-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch similarity index 90% rename from Spigot-Server-Patches/0553-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch rename to Spigot-Server-Patches/0554-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch index 9efb32290b..8cac7a4a73 100644 --- a/Spigot-Server-Patches/0553-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch +++ b/Spigot-Server-Patches/0554-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix SpawnChangeEvent not firing for all use-cases diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index d2edfc8053a3db0a8e27f408bd467b193d8f9d9c..dbba898b226d72d3b88695d62c711256d7e3aee2 100644 +index 61eeba3c25fecfdebfeb546b7e18ff4464eedfc2..705ce638416e98166a5c659f425be90af1a9a59b 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1875,12 +1875,14 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1864,12 +1864,14 @@ public class WorldServer extends World implements GeneratorAccessSeed { } // Paper end @@ -24,7 +24,7 @@ index d2edfc8053a3db0a8e27f408bd467b193d8f9d9c..dbba898b226d72d3b88695d62c711256 // if this keepSpawnInMemory is false a plugin has already removed our tickets, do not re-add this.removeTicketsForSpawn(this.paperConfig.keepLoadedRange, prevSpawn); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index ed55a1e6943fb9cdc763d1b7340e3ec53a46106e..616732de1b9860b2f9ad990ae1b9c627db369752 100644 +index f3aab5be1722651a27bb48a33618650b807d4e07..257d3d9fe97122b5d123509d54916e0c1b16788d 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -388,11 +388,13 @@ public class CraftWorld implements World { diff --git a/Spigot-Server-Patches/0554-Add-moon-phase-API.patch b/Spigot-Server-Patches/0555-Add-moon-phase-API.patch similarity index 89% rename from Spigot-Server-Patches/0554-Add-moon-phase-API.patch rename to Spigot-Server-Patches/0555-Add-moon-phase-API.patch index 5ecc069545..661ac5dbfb 100644 --- a/Spigot-Server-Patches/0554-Add-moon-phase-API.patch +++ b/Spigot-Server-Patches/0555-Add-moon-phase-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add moon phase API diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 616732de1b9860b2f9ad990ae1b9c627db369752..13614705328e5ae4432b585fe94d04f87b147dae 100644 +index 257d3d9fe97122b5d123509d54916e0c1b16788d..1162bf553ff6e5c5faf688b080a202dc55650ced 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -327,6 +327,11 @@ public class CraftWorld implements World { diff --git a/Spigot-Server-Patches/0555-Prevent-headless-pistons-from-being-created.patch b/Spigot-Server-Patches/0556-Prevent-headless-pistons-from-being-created.patch similarity index 100% rename from Spigot-Server-Patches/0555-Prevent-headless-pistons-from-being-created.patch rename to Spigot-Server-Patches/0556-Prevent-headless-pistons-from-being-created.patch diff --git a/Spigot-Server-Patches/0556-Brand-support.patch b/Spigot-Server-Patches/0557-Brand-support.patch similarity index 77% rename from Spigot-Server-Patches/0556-Brand-support.patch rename to Spigot-Server-Patches/0557-Brand-support.patch index 3062af10e4..755a0146ea 100644 --- a/Spigot-Server-Patches/0556-Brand-support.patch +++ b/Spigot-Server-Patches/0557-Brand-support.patch @@ -3,12 +3,13 @@ From: DigitalRegent Date: Sat, 11 Apr 2020 13:10:58 +0200 Subject: [PATCH] Brand support +TODO(Proximyst): Fixup this into the other brand support patch diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index fb871480a55d73681f2a45f6f14b984807d51ba3..3f63f83b21d84a4fa1cfda217afb22c4cf7fd2ad 100644 +index 3846e926e2442bc15dff41c70c5f2176f1c678be..7c8768765346b9349d0110ecf67be0bc8b00254a 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -2192,7 +2192,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2397,7 +2397,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { // Paper start - brand support @Override public String getClientBrandName() { diff --git a/Spigot-Server-Patches/0557-Add-BellRingEvent.patch b/Spigot-Server-Patches/0558-Add-BellRingEvent.patch similarity index 100% rename from Spigot-Server-Patches/0557-Add-BellRingEvent.patch rename to Spigot-Server-Patches/0558-Add-BellRingEvent.patch diff --git a/Spigot-Server-Patches/0558-Add-zombie-targets-turtle-egg-config.patch b/Spigot-Server-Patches/0559-Add-zombie-targets-turtle-egg-config.patch similarity index 94% rename from Spigot-Server-Patches/0558-Add-zombie-targets-turtle-egg-config.patch rename to Spigot-Server-Patches/0559-Add-zombie-targets-turtle-egg-config.patch index 5ed39517b0..4c34c141c9 100644 --- a/Spigot-Server-Patches/0558-Add-zombie-targets-turtle-egg-config.patch +++ b/Spigot-Server-Patches/0559-Add-zombie-targets-turtle-egg-config.patch @@ -19,7 +19,7 @@ index 978062774c1db286bfb9b0ffdef19d880b1f249b..36ecdfce84141ac731b827e469ac842f + } } diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java -index 360f14a3128f9a4c31fadb5a6f245d15845c8ae0..59bfb9c269aa95d66e7b9f107f6798f7f86fd245 100644 +index f390abf65d648e1e0697e2d802f3195a0241116e..e3606722cb1b3f6a11d34e1cdef7210280dba677 100644 --- a/src/main/java/net/minecraft/server/EntityZombie.java +++ b/src/main/java/net/minecraft/server/EntityZombie.java @@ -46,7 +46,7 @@ public class EntityZombie extends EntityMonster { diff --git a/Spigot-Server-Patches/0559-Buffer-joins-to-world.patch b/Spigot-Server-Patches/0560-Buffer-joins-to-world.patch similarity index 100% rename from Spigot-Server-Patches/0559-Buffer-joins-to-world.patch rename to Spigot-Server-Patches/0560-Buffer-joins-to-world.patch diff --git a/Spigot-Server-Patches/0560-Optimize-redstone-algorithm.patch b/Spigot-Server-Patches/0561-Optimize-redstone-algorithm.patch similarity index 99% rename from Spigot-Server-Patches/0560-Optimize-redstone-algorithm.patch rename to Spigot-Server-Patches/0561-Optimize-redstone-algorithm.patch index f3f1f5c334..b2bbf3d62b 100644 --- a/Spigot-Server-Patches/0560-Optimize-redstone-algorithm.patch +++ b/Spigot-Server-Patches/0561-Optimize-redstone-algorithm.patch @@ -1138,7 +1138,7 @@ index 7b3ccded0451f7b6634aeca0bdc1b5cc94f52b96..7f9ca45d403000d26d84198d8f88cd48 c(iblockdata, world, blockposition); world.a(blockposition, false); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index f2944dcf6b83b530124d53743a3d58b68ecec6f8..b91f1a4623a7d2d49bdd4265df3b1cfcdcb0ef88 100644 +index 14dbedbe879c84d8b0e141d1a4e2e7c1256a6f97..a9a853f176613fae6c1f5937a724f580ce60db2c 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -599,6 +599,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { @@ -1149,7 +1149,7 @@ index f2944dcf6b83b530124d53743a3d58b68ecec6f8..b91f1a4623a7d2d49bdd4265df3b1cfc public void a(BlockPosition blockposition, Block block, BlockPosition blockposition1) { if (!this.isClientSide) { IBlockData iblockdata = this.getType(blockposition); -@@ -1227,6 +1228,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -1228,6 +1229,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { return this.getBlockFacePower(blockposition.down(), EnumDirection.DOWN) > 0 ? true : (this.getBlockFacePower(blockposition.up(), EnumDirection.UP) > 0 ? true : (this.getBlockFacePower(blockposition.north(), EnumDirection.NORTH) > 0 ? true : (this.getBlockFacePower(blockposition.south(), EnumDirection.SOUTH) > 0 ? true : (this.getBlockFacePower(blockposition.west(), EnumDirection.WEST) > 0 ? true : this.getBlockFacePower(blockposition.east(), EnumDirection.EAST) > 0)))); } diff --git a/Spigot-Server-Patches/0561-Fix-hex-colors-not-working-in-some-kick-messages.patch b/Spigot-Server-Patches/0562-Fix-hex-colors-not-working-in-some-kick-messages.patch similarity index 96% rename from Spigot-Server-Patches/0561-Fix-hex-colors-not-working-in-some-kick-messages.patch rename to Spigot-Server-Patches/0562-Fix-hex-colors-not-working-in-some-kick-messages.patch index 50834a6919..85a401b542 100644 --- a/Spigot-Server-Patches/0561-Fix-hex-colors-not-working-in-some-kick-messages.patch +++ b/Spigot-Server-Patches/0562-Fix-hex-colors-not-working-in-some-kick-messages.patch @@ -43,10 +43,10 @@ index 471826ee4b32fe73d3c39755005e3287f9673c3c..79f726ef43e70b8882890007146df199 this.getNetworkManager().close(chatmessage); return; diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java -index efb59a7409902aa3c4bf95337683346ae82a52fb..c61cd50df0c81f7ab12bd0c955fd6f07f2b02e64 100644 +index bdd4766976902e11411728e6faa93b7e43a7ba22..6be12b7ae8501c22a7c544638c44fc6faedd5b07 100644 --- a/src/main/java/net/minecraft/server/LoginListener.java +++ b/src/main/java/net/minecraft/server/LoginListener.java -@@ -85,14 +85,7 @@ public class LoginListener implements PacketLoginInListener { +@@ -86,14 +86,7 @@ public class LoginListener implements PacketLoginInListener { // CraftBukkit start @Deprecated public void disconnect(String s) { diff --git a/Spigot-Server-Patches/0562-PortalCreateEvent-needs-to-know-its-entity.patch b/Spigot-Server-Patches/0563-PortalCreateEvent-needs-to-know-its-entity.patch similarity index 100% rename from Spigot-Server-Patches/0562-PortalCreateEvent-needs-to-know-its-entity.patch rename to Spigot-Server-Patches/0563-PortalCreateEvent-needs-to-know-its-entity.patch diff --git a/Spigot-Server-Patches/0563-Fix-CraftTeam-null-check.patch b/Spigot-Server-Patches/0564-Fix-CraftTeam-null-check.patch similarity index 83% rename from Spigot-Server-Patches/0563-Fix-CraftTeam-null-check.patch rename to Spigot-Server-Patches/0564-Fix-CraftTeam-null-check.patch index ea5ea993a1..c282e7b356 100644 --- a/Spigot-Server-Patches/0563-Fix-CraftTeam-null-check.patch +++ b/Spigot-Server-Patches/0564-Fix-CraftTeam-null-check.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix CraftTeam null check diff --git a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java -index 0fba3d2a8d3bd7ec615d137e4625a7f357729d8d..0315ea5ad8dcccf067e5419e2387e497b29bccb1 100644 +index b900aaf66f25e41956e7a4370b887fd4ed530570..4d9b5d7cd080f8b2e9d85f2805660c76d7131e66 100644 --- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java +++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java -@@ -203,7 +203,7 @@ final class CraftTeam extends CraftScoreboardComponent implements Team { +@@ -252,7 +252,7 @@ final class CraftTeam extends CraftScoreboardComponent implements Team { @Override public boolean hasEntry(String entry) throws IllegalArgumentException, IllegalStateException { diff --git a/Spigot-Server-Patches/0564-Add-more-Evoker-API.patch b/Spigot-Server-Patches/0565-Add-more-Evoker-API.patch similarity index 100% rename from Spigot-Server-Patches/0564-Add-more-Evoker-API.patch rename to Spigot-Server-Patches/0565-Add-more-Evoker-API.patch diff --git a/Spigot-Server-Patches/0565-Add-a-way-to-get-translation-keys-for-blocks-entitie.patch b/Spigot-Server-Patches/0566-Add-a-way-to-get-translation-keys-for-blocks-entitie.patch similarity index 100% rename from Spigot-Server-Patches/0565-Add-a-way-to-get-translation-keys-for-blocks-entitie.patch rename to Spigot-Server-Patches/0566-Add-a-way-to-get-translation-keys-for-blocks-entitie.patch diff --git a/Spigot-Server-Patches/0566-Create-HoverEvent-from-ItemStack-Entity.patch b/Spigot-Server-Patches/0567-Create-HoverEvent-from-ItemStack-Entity.patch similarity index 94% rename from Spigot-Server-Patches/0566-Create-HoverEvent-from-ItemStack-Entity.patch rename to Spigot-Server-Patches/0567-Create-HoverEvent-from-ItemStack-Entity.patch index cd8bb51188..04b657407a 100644 --- a/Spigot-Server-Patches/0566-Create-HoverEvent-from-ItemStack-Entity.patch +++ b/Spigot-Server-Patches/0567-Create-HoverEvent-from-ItemStack-Entity.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Create HoverEvent from ItemStack Entity diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -index 1c3e6e0c9abe681bf9e7305a74a68c1506ad8d0c..af84813c703813ec3a6ca89ff437d89e31a9100f 100644 +index bf8a8cad248583c900eacfaf54e30f0a60e1dc54..c79623339cfe8fb8484bcc2a8c3eb119b9e83093 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -@@ -352,5 +352,40 @@ public final class CraftItemFactory implements ItemFactory { +@@ -360,5 +360,40 @@ public final class CraftItemFactory implements ItemFactory { return nms != null ? net.minecraft.server.LocaleLanguage.getInstance().translateKey(nms.getItem().getName()) : null; } diff --git a/Spigot-Server-Patches/0567-Cache-block-data-strings.patch b/Spigot-Server-Patches/0568-Cache-block-data-strings.patch similarity index 100% rename from Spigot-Server-Patches/0567-Cache-block-data-strings.patch rename to Spigot-Server-Patches/0568-Cache-block-data-strings.patch diff --git a/Spigot-Server-Patches/0568-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch b/Spigot-Server-Patches/0569-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch similarity index 92% rename from Spigot-Server-Patches/0568-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch rename to Spigot-Server-Patches/0569-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch index e55c402280..a1c20429d1 100644 --- a/Spigot-Server-Patches/0568-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch +++ b/Spigot-Server-Patches/0569-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch @@ -9,7 +9,7 @@ as this is how Vanilla teleports entities. Cancel any pending motion when teleported. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 5c52a2988b8830e4e5597f8a5b3718d242023cb7..a7b225249f7ffafa2c6e1fc60657067229e02960 100644 +index 83a469447e39b801442769fcb5979e987e2adae9..e65cb9c72e46d50b871d1c7b5789a1855622d934 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -54,6 +54,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -35,7 +35,7 @@ index 5c52a2988b8830e4e5597f8a5b3718d242023cb7..a7b225249f7ffafa2c6e1fc606570672 this.yaw = f; this.pitch = f1; diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index f1e3c764fc8d5b6acb2ae94276e31fe37af817b6..5af38d36f64020d1df492ad57fafd2baf867536a 100644 +index d140832157bb502c0792993a2d9415c50e78a05b..c98287032082923f9c733b949cf4d76185e3001d 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -542,7 +542,7 @@ public class PlayerConnection implements PacketListenerPlayIn { @@ -57,10 +57,10 @@ index f1e3c764fc8d5b6acb2ae94276e31fe37af817b6..5af38d36f64020d1df492ad57fafd2ba this.player.playerConnection.sendPacket(new PacketPlayOutPosition(d0 - d3, d1 - d4, d2 - d5, f - f2, f1 - f3, set, this.teleportAwait)); } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index c7636ffc952c436d7148e6e5926b0108cc628821..582ed13a9ba1748444ce4d624d83a4d7be7006f2 100644 +index dc42bd1b2b89881789481d736a57011936857abf..c519b46c94792082c62acc05cdbec0734776edf5 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -@@ -554,7 +554,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { +@@ -555,7 +555,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { } // entity.setLocation() throws no event, and so cannot be cancelled diff --git a/Spigot-Server-Patches/0569-Add-additional-open-container-api-to-HumanEntity.patch b/Spigot-Server-Patches/0570-Add-additional-open-container-api-to-HumanEntity.patch similarity index 95% rename from Spigot-Server-Patches/0569-Add-additional-open-container-api-to-HumanEntity.patch rename to Spigot-Server-Patches/0570-Add-additional-open-container-api-to-HumanEntity.patch index 231f9958d5..2072933ed1 100644 --- a/Spigot-Server-Patches/0569-Add-additional-open-container-api-to-HumanEntity.patch +++ b/Spigot-Server-Patches/0570-Add-additional-open-container-api-to-HumanEntity.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add additional open container api to HumanEntity diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -index caabe25db61637c5a695daed00bc9692189e1ad0..2318d19b21514effe28b4d21c0196c8f778d22db 100644 +index f8be287a5c5e273eb71896c16064b1fd085faf7e..fcc1d87f293e2117f0e559805188733454ca211e 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -@@ -449,6 +449,70 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -457,6 +457,70 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { return this.getHandle().activeContainer.getBukkitView(); } diff --git a/Spigot-Server-Patches/0570-Cache-DataFixerUpper-Rewrite-Rules-on-demand.patch b/Spigot-Server-Patches/0571-Cache-DataFixerUpper-Rewrite-Rules-on-demand.patch similarity index 100% rename from Spigot-Server-Patches/0570-Cache-DataFixerUpper-Rewrite-Rules-on-demand.patch rename to Spigot-Server-Patches/0571-Cache-DataFixerUpper-Rewrite-Rules-on-demand.patch diff --git a/Spigot-Server-Patches/0571-Extend-block-drop-capture-to-capture-all-items-added.patch b/Spigot-Server-Patches/0572-Extend-block-drop-capture-to-capture-all-items-added.patch similarity index 100% rename from Spigot-Server-Patches/0571-Extend-block-drop-capture-to-capture-all-items-added.patch rename to Spigot-Server-Patches/0572-Extend-block-drop-capture-to-capture-all-items-added.patch diff --git a/Spigot-Server-Patches/0572-Don-t-mark-dirty-in-invalid-locations-SPIGOT-6086.patch b/Spigot-Server-Patches/0573-Don-t-mark-dirty-in-invalid-locations-SPIGOT-6086.patch similarity index 84% rename from Spigot-Server-Patches/0572-Don-t-mark-dirty-in-invalid-locations-SPIGOT-6086.patch rename to Spigot-Server-Patches/0573-Don-t-mark-dirty-in-invalid-locations-SPIGOT-6086.patch index 4a1db649f9..f56a06c90f 100644 --- a/Spigot-Server-Patches/0572-Don-t-mark-dirty-in-invalid-locations-SPIGOT-6086.patch +++ b/Spigot-Server-Patches/0573-Don-t-mark-dirty-in-invalid-locations-SPIGOT-6086.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Don't mark dirty in invalid locations (SPIGOT-6086) diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java -index b374ea7d4a1a2ed3149a2c945e009d5558e1ab4c..904c6a7d0a36b57bb4f693fc4fd0dd5b17adcbac 100644 +index 014c0249b22eb4703d2d6b430afb402689a54e2a..42b12ad5ba68bdf8f76704ddd970715770183de0 100644 --- a/src/main/java/net/minecraft/server/PlayerChunk.java +++ b/src/main/java/net/minecraft/server/PlayerChunk.java -@@ -363,6 +363,7 @@ public class PlayerChunk { +@@ -359,6 +359,7 @@ public class PlayerChunk { } public void a(BlockPosition blockposition) { diff --git a/Spigot-Server-Patches/0573-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch b/Spigot-Server-Patches/0574-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch similarity index 94% rename from Spigot-Server-Patches/0573-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch rename to Spigot-Server-Patches/0574-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch index fe3da280c4..4509ab74a2 100644 --- a/Spigot-Server-Patches/0573-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch +++ b/Spigot-Server-Patches/0574-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Expose the Entity Counter to allow plugins to use valid and diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index a7b225249f7ffafa2c6e1fc60657067229e02960..fcb5cf78d1deff3c2593c7470f5501be8fed567b 100644 +index e65cb9c72e46d50b871d1c7b5789a1855622d934..9415588d7df27fb6907381cff802fd8ad983663f 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -3382,4 +3382,10 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/0574-Lazily-track-plugin-scoreboards-by-default.patch b/Spigot-Server-Patches/0575-Lazily-track-plugin-scoreboards-by-default.patch similarity index 92% rename from Spigot-Server-Patches/0574-Lazily-track-plugin-scoreboards-by-default.patch rename to Spigot-Server-Patches/0575-Lazily-track-plugin-scoreboards-by-default.patch index 07960166e8..1698d0702d 100644 --- a/Spigot-Server-Patches/0574-Lazily-track-plugin-scoreboards-by-default.patch +++ b/Spigot-Server-Patches/0575-Lazily-track-plugin-scoreboards-by-default.patch @@ -28,7 +28,7 @@ index 110cee7228b17a2378523883a1a83cc97da7608d..da48ad0e4725d9a9fcb2d60f82249be9 + } } diff --git a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboard.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboard.java -index e3036fe23fa2be100044332c432d1ad5b4872823..b298fbd66b66c83e2ede6871025eaeecb409f28b 100644 +index d05959c7884d7ba19ff1a507c7d07c52bec038f6..aa76c1cdc2105d409076ef436782359b8bc32547 100644 --- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboard.java +++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboard.java @@ -19,6 +19,7 @@ import org.bukkit.scoreboard.Team; @@ -39,7 +39,7 @@ index e3036fe23fa2be100044332c432d1ad5b4872823..b298fbd66b66c83e2ede6871025eaeec CraftScoreboard(Scoreboard board) { this.board = board; -@@ -45,6 +46,12 @@ public final class CraftScoreboard implements org.bukkit.scoreboard.Scoreboard { +@@ -66,6 +67,12 @@ public final class CraftScoreboard implements org.bukkit.scoreboard.Scoreboard { Validate.isTrue(board.getObjective(name) == null, "An objective of name '" + name + "' already exists"); CraftCriteria craftCriteria = CraftCriteria.getFromBukkit(criteria); @@ -50,8 +50,8 @@ index e3036fe23fa2be100044332c432d1ad5b4872823..b298fbd66b66c83e2ede6871025eaeec + } + // Paper end ScoreboardObjective objective = board.registerObjective(name, craftCriteria.criteria, CraftChatMessage.fromStringOrNull(displayName), CraftScoreboardTranslations.fromBukkitRender(renderType)); - return new CraftObjective(this, objective); - } + return new CraftObjective(this, objective);*/ // Paper + return registerNewObjective(name, criteria, net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(displayName)); // Paper diff --git a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardManager.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardManager.java index ca2be30609159e6ca98b363d75cbc3ac550bca31..6fa2e271f7f01cd0bf247e2071fa33bd8c5c6cbe 100644 --- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardManager.java diff --git a/Spigot-Server-Patches/0575-Entity-isTicking.patch b/Spigot-Server-Patches/0576-Entity-isTicking.patch similarity index 83% rename from Spigot-Server-Patches/0575-Entity-isTicking.patch rename to Spigot-Server-Patches/0576-Entity-isTicking.patch index 1d90103ea5..630cf5f713 100644 --- a/Spigot-Server-Patches/0575-Entity-isTicking.patch +++ b/Spigot-Server-Patches/0576-Entity-isTicking.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Entity#isTicking diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index fcb5cf78d1deff3c2593c7470f5501be8fed567b..22f3721ac351acb11ba8475cc7e2d35dc2e78259 100644 +index 9415588d7df27fb6907381cff802fd8ad983663f..1840d64d1bbb1165981f79dd3deeb19816e6a230 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -3387,5 +3387,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -19,10 +19,10 @@ index fcb5cf78d1deff3c2593c7470f5501be8fed567b..22f3721ac351acb11ba8475cc7e2d35d // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index 582ed13a9ba1748444ce4d624d83a4d7be7006f2..475dc1aa2cba77c13033938e719a66707f358914 100644 +index c519b46c94792082c62acc05cdbec0734776edf5..bb474fbdf44dbc61b4fa0bced4d15bc2d1fb548f 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -@@ -1144,5 +1144,9 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { +@@ -1158,5 +1158,9 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { public boolean isInLava() { return getHandle().isInLava(); } diff --git a/Spigot-Server-Patches/0576-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch b/Spigot-Server-Patches/0577-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch similarity index 100% rename from Spigot-Server-Patches/0576-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch rename to Spigot-Server-Patches/0577-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch diff --git a/Spigot-Server-Patches/0577-Fix-Not-a-string-Map-Conversion-spam.patch b/Spigot-Server-Patches/0578-Fix-Not-a-string-Map-Conversion-spam.patch similarity index 92% rename from Spigot-Server-Patches/0577-Fix-Not-a-string-Map-Conversion-spam.patch rename to Spigot-Server-Patches/0578-Fix-Not-a-string-Map-Conversion-spam.patch index 433f468902..564d600b67 100644 --- a/Spigot-Server-Patches/0577-Fix-Not-a-string-Map-Conversion-spam.patch +++ b/Spigot-Server-Patches/0578-Fix-Not-a-string-Map-Conversion-spam.patch @@ -10,10 +10,10 @@ This stops the spam by converting the old format to new before requesting the world. diff --git a/src/main/java/net/minecraft/server/WorldMap.java b/src/main/java/net/minecraft/server/WorldMap.java -index 225353e072033d1e5aaf5604b8db255d9a154dc8..7ca4d279b9f13336ca425e413ff532f03bc0de0a 100644 +index 7251793423e5413dacc1e031ed75d41fc35cd32e..f24741ab831b620c3b3d306596a58fda7abea0d3 100644 --- a/src/main/java/net/minecraft/server/WorldMap.java +++ b/src/main/java/net/minecraft/server/WorldMap.java -@@ -73,7 +73,26 @@ public class WorldMap extends PersistentBase { +@@ -74,7 +74,26 @@ public class WorldMap extends PersistentBase { @Override public void a(NBTTagCompound nbttagcompound) { diff --git a/Spigot-Server-Patches/0578-Fix-CME-on-adding-a-passenger-in-CreatureSpawnEvent.patch b/Spigot-Server-Patches/0579-Fix-CME-on-adding-a-passenger-in-CreatureSpawnEvent.patch similarity index 90% rename from Spigot-Server-Patches/0578-Fix-CME-on-adding-a-passenger-in-CreatureSpawnEvent.patch rename to Spigot-Server-Patches/0579-Fix-CME-on-adding-a-passenger-in-CreatureSpawnEvent.patch index 4785396fe1..e9274625d3 100644 --- a/Spigot-Server-Patches/0578-Fix-CME-on-adding-a-passenger-in-CreatureSpawnEvent.patch +++ b/Spigot-Server-Patches/0579-Fix-CME-on-adding-a-passenger-in-CreatureSpawnEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix CME on adding a passenger in CreatureSpawnEvent diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 22f3721ac351acb11ba8475cc7e2d35dc2e78259..aa1807502131893f29be5918b533aabe83f87514 100644 +index 1840d64d1bbb1165981f79dd3deeb19816e6a230..e39be18fe6b45a1a53cb484c656872dda00fa274 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -3085,7 +3085,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/0579-MC-147729-Drop-items-that-are-extra-from-a-crafting-.patch b/Spigot-Server-Patches/0580-MC-147729-Drop-items-that-are-extra-from-a-crafting-.patch similarity index 100% rename from Spigot-Server-Patches/0579-MC-147729-Drop-items-that-are-extra-from-a-crafting-.patch rename to Spigot-Server-Patches/0580-MC-147729-Drop-items-that-are-extra-from-a-crafting-.patch diff --git a/Spigot-Server-Patches/0580-Reset-Ender-Crystals-on-Dragon-Spawn.patch b/Spigot-Server-Patches/0581-Reset-Ender-Crystals-on-Dragon-Spawn.patch similarity index 100% rename from Spigot-Server-Patches/0580-Reset-Ender-Crystals-on-Dragon-Spawn.patch rename to Spigot-Server-Patches/0581-Reset-Ender-Crystals-on-Dragon-Spawn.patch diff --git a/Spigot-Server-Patches/0581-Fix-for-large-move-vectors-crashing-server.patch b/Spigot-Server-Patches/0582-Fix-for-large-move-vectors-crashing-server.patch similarity index 97% rename from Spigot-Server-Patches/0581-Fix-for-large-move-vectors-crashing-server.patch rename to Spigot-Server-Patches/0582-Fix-for-large-move-vectors-crashing-server.patch index 5c81770046..2885e0f856 100644 --- a/Spigot-Server-Patches/0581-Fix-for-large-move-vectors-crashing-server.patch +++ b/Spigot-Server-Patches/0582-Fix-for-large-move-vectors-crashing-server.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Fix for large move vectors crashing server Check movement distance also based on current position. diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 5af38d36f64020d1df492ad57fafd2baf867536a..9fd9d81b1d875c4f465f8fb509b35da49695d4c8 100644 +index c98287032082923f9c733b949cf4d76185e3001d..0f27428757b1827a625a25ea8f6435882f7b5f8a 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -367,19 +367,24 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0582-Optimise-getType-calls.patch b/Spigot-Server-Patches/0583-Optimise-getType-calls.patch similarity index 100% rename from Spigot-Server-Patches/0582-Optimise-getType-calls.patch rename to Spigot-Server-Patches/0583-Optimise-getType-calls.patch diff --git a/Spigot-Server-Patches/0583-Villager-resetOffers.patch b/Spigot-Server-Patches/0584-Villager-resetOffers.patch similarity index 100% rename from Spigot-Server-Patches/0583-Villager-resetOffers.patch rename to Spigot-Server-Patches/0584-Villager-resetOffers.patch diff --git a/Spigot-Server-Patches/0584-Improve-inlinig-for-some-hot-IBlockData-methods.patch b/Spigot-Server-Patches/0585-Improve-inlinig-for-some-hot-IBlockData-methods.patch similarity index 100% rename from Spigot-Server-Patches/0584-Improve-inlinig-for-some-hot-IBlockData-methods.patch rename to Spigot-Server-Patches/0585-Improve-inlinig-for-some-hot-IBlockData-methods.patch diff --git a/Spigot-Server-Patches/0585-Retain-block-place-order-when-capturing-blockstates.patch b/Spigot-Server-Patches/0586-Retain-block-place-order-when-capturing-blockstates.patch similarity index 93% rename from Spigot-Server-Patches/0585-Retain-block-place-order-when-capturing-blockstates.patch rename to Spigot-Server-Patches/0586-Retain-block-place-order-when-capturing-blockstates.patch index 0b934d17f3..9b3c98828d 100644 --- a/Spigot-Server-Patches/0585-Retain-block-place-order-when-capturing-blockstates.patch +++ b/Spigot-Server-Patches/0586-Retain-block-place-order-when-capturing-blockstates.patch @@ -10,7 +10,7 @@ In general, look at making this logic more robust (i.e properly handling cases where a captured entry is overriden) - but for now this will do. diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index b91f1a4623a7d2d49bdd4265df3b1cfcdcb0ef88..23e5ad868f1acfb99ec313fbda9bb83a138ccf0b 100644 +index a9a853f176613fae6c1f5937a724f580ce60db2c..16c3ef27e8f77942401568727ea78230147dba29 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -75,7 +75,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { diff --git a/Spigot-Server-Patches/0586-Reduce-blockpos-allocation-from-pathfinding.patch b/Spigot-Server-Patches/0587-Reduce-blockpos-allocation-from-pathfinding.patch similarity index 100% rename from Spigot-Server-Patches/0586-Reduce-blockpos-allocation-from-pathfinding.patch rename to Spigot-Server-Patches/0587-Reduce-blockpos-allocation-from-pathfinding.patch diff --git a/Spigot-Server-Patches/0587-Fix-item-locations-dropped-from-campfires.patch b/Spigot-Server-Patches/0588-Fix-item-locations-dropped-from-campfires.patch similarity index 100% rename from Spigot-Server-Patches/0587-Fix-item-locations-dropped-from-campfires.patch rename to Spigot-Server-Patches/0588-Fix-item-locations-dropped-from-campfires.patch diff --git a/Spigot-Server-Patches/0588-Player-elytra-boost-API.patch b/Spigot-Server-Patches/0589-Player-elytra-boost-API.patch similarity index 89% rename from Spigot-Server-Patches/0588-Player-elytra-boost-API.patch rename to Spigot-Server-Patches/0589-Player-elytra-boost-API.patch index 9d2bcc1c27..eb5f19e7a9 100644 --- a/Spigot-Server-Patches/0588-Player-elytra-boost-API.patch +++ b/Spigot-Server-Patches/0589-Player-elytra-boost-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Player elytra boost API diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 3f63f83b21d84a4fa1cfda217afb22c4cf7fd2ad..129f1941d65d11e614f5efefd7f4e4cc2fd55a76 100644 +index 7c8768765346b9349d0110ecf67be0bc8b00254a..5056f96635502b0b93082495871a55a171ce44c1 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -2085,6 +2085,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2290,6 +2290,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } throw new RuntimeException("Unknown settings type"); } diff --git a/Spigot-Server-Patches/0589-Fixed-TileEntityBell-memory-leak.patch b/Spigot-Server-Patches/0590-Fixed-TileEntityBell-memory-leak.patch similarity index 100% rename from Spigot-Server-Patches/0589-Fixed-TileEntityBell-memory-leak.patch rename to Spigot-Server-Patches/0590-Fixed-TileEntityBell-memory-leak.patch diff --git a/Spigot-Server-Patches/0590-Avoid-error-bubbling-up-when-item-stack-is-empty-in-.patch b/Spigot-Server-Patches/0591-Avoid-error-bubbling-up-when-item-stack-is-empty-in-.patch similarity index 100% rename from Spigot-Server-Patches/0590-Avoid-error-bubbling-up-when-item-stack-is-empty-in-.patch rename to Spigot-Server-Patches/0591-Avoid-error-bubbling-up-when-item-stack-is-empty-in-.patch diff --git a/Spigot-Server-Patches/0591-Add-getOfflinePlayerIfCached-String.patch b/Spigot-Server-Patches/0592-Add-getOfflinePlayerIfCached-String.patch similarity index 88% rename from Spigot-Server-Patches/0591-Add-getOfflinePlayerIfCached-String.patch rename to Spigot-Server-Patches/0592-Add-getOfflinePlayerIfCached-String.patch index d13ce8b938..c27e9a2bdc 100644 --- a/Spigot-Server-Patches/0591-Add-getOfflinePlayerIfCached-String.patch +++ b/Spigot-Server-Patches/0592-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 69b1add508a96df71a37289da28ed1b8c17ef395..3138ebd9a4fbf50f5aae74c280a8a916500dcb23 100644 +index c87124e4d4933a0aac643b6c84f445faf182294d..1b6c79f8c3038cbcae93eb7880cf16e0a77c83e8 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1588,6 +1588,28 @@ public final class CraftServer implements Server { +@@ -1608,6 +1608,28 @@ public final class CraftServer implements Server { return result; } diff --git a/Spigot-Server-Patches/0592-Add-ignore-discounts-API.patch b/Spigot-Server-Patches/0593-Add-ignore-discounts-API.patch similarity index 98% rename from Spigot-Server-Patches/0592-Add-ignore-discounts-API.patch rename to Spigot-Server-Patches/0593-Add-ignore-discounts-API.patch index ed687ba116..8fcf3673d7 100644 --- a/Spigot-Server-Patches/0592-Add-ignore-discounts-API.patch +++ b/Spigot-Server-Patches/0593-Add-ignore-discounts-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add ignore discounts API diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java -index 039d5cc20a6de46b0812b428e2f6526905ece2bf..0388d1099f2a6d436a5a5e58bbbdae3ddab969e7 100644 +index eaa84fde9cfa8e2d31e7f85b976393d576545670..b343ce9df323ebd95d387b35025d8970ae733c44 100644 --- a/src/main/java/net/minecraft/server/EntityVillager.java +++ b/src/main/java/net/minecraft/server/EntityVillager.java @@ -391,6 +391,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation diff --git a/Spigot-Server-Patches/0593-Toggle-for-removing-existing-dragon.patch b/Spigot-Server-Patches/0594-Toggle-for-removing-existing-dragon.patch similarity index 100% rename from Spigot-Server-Patches/0593-Toggle-for-removing-existing-dragon.patch rename to Spigot-Server-Patches/0594-Toggle-for-removing-existing-dragon.patch diff --git a/Spigot-Server-Patches/0594-Fix-client-lag-on-advancement-loading.patch b/Spigot-Server-Patches/0595-Fix-client-lag-on-advancement-loading.patch similarity index 100% rename from Spigot-Server-Patches/0594-Fix-client-lag-on-advancement-loading.patch rename to Spigot-Server-Patches/0595-Fix-client-lag-on-advancement-loading.patch diff --git a/Spigot-Server-Patches/0595-Item-no-age-no-player-pickup.patch b/Spigot-Server-Patches/0596-Item-no-age-no-player-pickup.patch similarity index 100% rename from Spigot-Server-Patches/0595-Item-no-age-no-player-pickup.patch rename to Spigot-Server-Patches/0596-Item-no-age-no-player-pickup.patch diff --git a/Spigot-Server-Patches/0596-Beacon-API-custom-effect-ranges.patch b/Spigot-Server-Patches/0597-Beacon-API-custom-effect-ranges.patch similarity index 95% rename from Spigot-Server-Patches/0596-Beacon-API-custom-effect-ranges.patch rename to Spigot-Server-Patches/0597-Beacon-API-custom-effect-ranges.patch index 9857d88879..05b425de21 100644 --- a/Spigot-Server-Patches/0596-Beacon-API-custom-effect-ranges.patch +++ b/Spigot-Server-Patches/0597-Beacon-API-custom-effect-ranges.patch @@ -65,10 +65,10 @@ index c6b7bc3dc1445269c1562c308b386ce480d70ef3..f97b27a4751d1fc3287de8dba384ab56 this.chestLock.a(nbttagcompound); return nbttagcompound; diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBeacon.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBeacon.java -index 21ebceafbf27125761aa08cfe0785f6f05c77592..51efea5262b80b7cee917b1bdaf22e4b741d5e03 100644 +index 252b03e287cbe9212c7ec80be049647c4c77d37a..939782a75258b2228a5566648ce5a4ec2cc3e76e 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBeacon.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBeacon.java -@@ -95,4 +95,19 @@ public class CraftBeacon extends CraftBlockEntityState impleme +@@ -108,4 +108,19 @@ public class CraftBeacon extends CraftBlockEntityState impleme public void setLock(String key) { this.getSnapshot().chestLock = (key == null) ? ChestLock.a : new ChestLock(key); } diff --git a/Spigot-Server-Patches/0597-Add-API-for-quit-reason.patch b/Spigot-Server-Patches/0598-Add-API-for-quit-reason.patch similarity index 81% rename from Spigot-Server-Patches/0597-Add-API-for-quit-reason.patch rename to Spigot-Server-Patches/0598-Add-API-for-quit-reason.patch index a3039f6c92..5a4e9e7984 100644 --- a/Spigot-Server-Patches/0597-Add-API-for-quit-reason.patch +++ b/Spigot-Server-Patches/0598-Add-API-for-quit-reason.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add API for quit reason diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index f09c1367f375dc6930fb95ec8f216c6c421a34ea..7b0cbeaf9974da60c0f93ea779cc6f2301754d48 100644 +index 7e5e4acb3c892a5d366e0fbfb76b97884345ec24..d58abb47c1a543eaf238569f27bf189322c22a93 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -128,6 +128,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -130,6 +130,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { double lastEntitySpawnRadiusSquared; // Paper - optimise isOutsideRange, this field is in blocks boolean needsChunkCenterUpdate; // Paper - no-tick view distance @@ -37,11 +37,11 @@ index fc4ad72ffaed5e747cfecc71e9ac8ee2b556ce31..fb1e3c705b8abee13695762cdfd0e9f1 NetworkManager.LOGGER.debug("Failed to sent packet", throwable); this.sendPacket(new PacketPlayOutKickDisconnect(chatmessage), (future) -> { diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 9fd9d81b1d875c4f465f8fb509b35da49695d4c8..4bff738485fc828db147d57e8b6247bced46cc4b 100644 +index 0f27428757b1827a625a25ea8f6435882f7b5f8a..54b109777c4383cfb4bef8f8ea8e4a9f1cbc9c7c 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -298,6 +298,7 @@ public class PlayerConnection implements PacketListenerPlayIn { - final IChatBaseComponent ichatbasecomponent = CraftChatMessage.fromString(s, true)[0]; + final IChatBaseComponent ichatbasecomponent = PaperAdventure.asVanilla(event.reason()); // Paper - Adventure // CraftBukkit end + this.player.quitReason = org.bukkit.event.player.PlayerQuitEvent.QuitReason.KICKED; // Paper @@ -49,15 +49,15 @@ index 9fd9d81b1d875c4f465f8fb509b35da49695d4c8..4bff738485fc828db147d57e8b6247bc this.networkManager.close(ichatbasecomponent); }); diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index dc3df171a6eb11f13272303951fb59a14d7df202..a86a4467a0d0ff44f19d62b436aee469cc7b1e0e 100644 +index 9080f28d8c8ce20ea9934384bd14932145c64de0..c074f0b451b5bbaab977a7512045a6da9399ed32 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -509,7 +509,7 @@ public abstract class PlayerList { +@@ -511,7 +511,7 @@ public abstract class PlayerList { entityplayer.closeInventory(org.bukkit.event.inventory.InventoryCloseEvent.Reason.DISCONNECT); // Paper } -- PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(cserver.getPlayer(entityplayer), "\u00A7e" + entityplayer.getName() + " left the game"); -+ PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(cserver.getPlayer(entityplayer), "\u00A7e" + entityplayer.getName() + " left the game", entityplayer.quitReason); // Paper - quit reason +- PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(cserver.getPlayer(entityplayer), net.kyori.adventure.text.Component.translatable("multiplayer.player.left", net.kyori.adventure.text.format.NamedTextColor.YELLOW)); ++ PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(cserver.getPlayer(entityplayer), net.kyori.adventure.text.Component.translatable("multiplayer.player.left", net.kyori.adventure.text.format.NamedTextColor.YELLOW), entityplayer.quitReason); // Paper - quit reason if (entityplayer.didPlayerJoinEvent) cserver.getPluginManager().callEvent(playerQuitEvent); // Paper - if we disconnected before join ever fired, don't fire quit entityplayer.getBukkitEntity().disconnect(playerQuitEvent.getQuitMessage()); diff --git a/Spigot-Server-Patches/0598-Seed-based-feature-search.patch b/Spigot-Server-Patches/0599-Seed-based-feature-search.patch similarity index 97% rename from Spigot-Server-Patches/0598-Seed-based-feature-search.patch rename to Spigot-Server-Patches/0599-Seed-based-feature-search.patch index 9ebde8b0d3..e34e1feb5a 100644 --- a/Spigot-Server-Patches/0598-Seed-based-feature-search.patch +++ b/Spigot-Server-Patches/0599-Seed-based-feature-search.patch @@ -81,10 +81,10 @@ index c3bd58069d8dbdf36f70f1dafd7c24000f31708b..a62c87bceab2c9700a7b3925f208b0ff StructureStart structurestart = structuremanager.a(SectionPosition.a(ichunkaccess.getPos(), 0), this, ichunkaccess); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 23e5ad868f1acfb99ec313fbda9bb83a138ccf0b..179915312cd35845216a196018726345324614de 100644 +index 16c3ef27e8f77942401568727ea78230147dba29..1c0bfeef83c3669651d9b727c4c746441f6b793c 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -1451,8 +1451,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -1452,8 +1452,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable { return this.methodProfiler; } diff --git a/Spigot-Server-Patches/0599-Add-Wandering-Trader-spawn-rate-config-options.patch b/Spigot-Server-Patches/0600-Add-Wandering-Trader-spawn-rate-config-options.patch similarity index 100% rename from Spigot-Server-Patches/0599-Add-Wandering-Trader-spawn-rate-config-options.patch rename to Spigot-Server-Patches/0600-Add-Wandering-Trader-spawn-rate-config-options.patch diff --git a/Spigot-Server-Patches/0600-Significantly-improve-performance-of-the-end-generat.patch b/Spigot-Server-Patches/0601-Significantly-improve-performance-of-the-end-generat.patch similarity index 100% rename from Spigot-Server-Patches/0600-Significantly-improve-performance-of-the-end-generat.patch rename to Spigot-Server-Patches/0601-Significantly-improve-performance-of-the-end-generat.patch diff --git a/Spigot-Server-Patches/0601-Expose-world-spawn-angle.patch b/Spigot-Server-Patches/0602-Expose-world-spawn-angle.patch similarity index 90% rename from Spigot-Server-Patches/0601-Expose-world-spawn-angle.patch rename to Spigot-Server-Patches/0602-Expose-world-spawn-angle.patch index 930beb6edf..4d697748a5 100644 --- a/Spigot-Server-Patches/0601-Expose-world-spawn-angle.patch +++ b/Spigot-Server-Patches/0602-Expose-world-spawn-angle.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Expose world spawn angle diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index a86a4467a0d0ff44f19d62b436aee469cc7b1e0e..70f702680f8221cb262023814a7bae21b0074da6 100644 +index c074f0b451b5bbaab977a7512045a6da9399ed32..43176569a34a4c6af7a3fe7acf0c00da2f6fc91c 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -813,7 +813,7 @@ public abstract class PlayerList { +@@ -815,7 +815,7 @@ public abstract class PlayerList { if (location == null) { worldserver1 = this.server.getWorldServer(World.OVERWORLD); blockposition = entityplayer1.getSpawnPoint(worldserver1); @@ -30,7 +30,7 @@ index faf931785ea35df4525d4a429bdb2363e26e491b..14e1762bf8669ef9e8444f5a73952daa long getTime(); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 13614705328e5ae4432b585fe94d04f87b147dae..fe21b612f9bd2cf85670eeffa25998130b543339 100644 +index 1162bf553ff6e5c5faf688b080a202dc55650ced..597d7a36d7d0b19502d92cf13da53d96c6ede58a 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -379,7 +379,7 @@ public class CraftWorld implements World { diff --git a/Spigot-Server-Patches/0602-Add-Destroy-Speed-API.patch b/Spigot-Server-Patches/0603-Add-Destroy-Speed-API.patch similarity index 100% rename from Spigot-Server-Patches/0602-Add-Destroy-Speed-API.patch rename to Spigot-Server-Patches/0603-Add-Destroy-Speed-API.patch diff --git a/Spigot-Server-Patches/0603-Fix-Player-spawnParticle-x-y-z-precision-loss.patch b/Spigot-Server-Patches/0604-Fix-Player-spawnParticle-x-y-z-precision-loss.patch similarity index 89% rename from Spigot-Server-Patches/0603-Fix-Player-spawnParticle-x-y-z-precision-loss.patch rename to Spigot-Server-Patches/0604-Fix-Player-spawnParticle-x-y-z-precision-loss.patch index f283bcb051..2d05e60702 100644 --- a/Spigot-Server-Patches/0603-Fix-Player-spawnParticle-x-y-z-precision-loss.patch +++ b/Spigot-Server-Patches/0604-Fix-Player-spawnParticle-x-y-z-precision-loss.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix Player spawnParticle x/y/z precision loss diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 129f1941d65d11e614f5efefd7f4e4cc2fd55a76..68b95bc17eaa40f11ec3babebbca57d9fb64c9dc 100644 +index 5056f96635502b0b93082495871a55a171ce44c1..ee3e4bb122439f96ec35105521285d2c5be317e2 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1952,7 +1952,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2022,7 +2022,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { if (data != null && !particle.getDataType().isInstance(data)) { throw new IllegalArgumentException("data should be " + particle.getDataType() + " got " + data.getClass()); } diff --git a/Spigot-Server-Patches/0604-Add-LivingEntity-clearActiveItem.patch b/Spigot-Server-Patches/0605-Add-LivingEntity-clearActiveItem.patch similarity index 100% rename from Spigot-Server-Patches/0604-Add-LivingEntity-clearActiveItem.patch rename to Spigot-Server-Patches/0605-Add-LivingEntity-clearActiveItem.patch diff --git a/Spigot-Server-Patches/0605-Add-PlayerItemCooldownEvent.patch b/Spigot-Server-Patches/0606-Add-PlayerItemCooldownEvent.patch similarity index 100% rename from Spigot-Server-Patches/0605-Add-PlayerItemCooldownEvent.patch rename to Spigot-Server-Patches/0606-Add-PlayerItemCooldownEvent.patch diff --git a/Spigot-Server-Patches/0606-More-lightning-API.patch b/Spigot-Server-Patches/0607-More-lightning-API.patch similarity index 100% rename from Spigot-Server-Patches/0606-More-lightning-API.patch rename to Spigot-Server-Patches/0607-More-lightning-API.patch diff --git a/Spigot-Server-Patches/0607-Climbing-should-not-bypass-cramming-gamerule.patch b/Spigot-Server-Patches/0608-Climbing-should-not-bypass-cramming-gamerule.patch similarity index 98% rename from Spigot-Server-Patches/0607-Climbing-should-not-bypass-cramming-gamerule.patch rename to Spigot-Server-Patches/0608-Climbing-should-not-bypass-cramming-gamerule.patch index 966d5d5ed2..d6f8d84ca9 100644 --- a/Spigot-Server-Patches/0607-Climbing-should-not-bypass-cramming-gamerule.patch +++ b/Spigot-Server-Patches/0608-Climbing-should-not-bypass-cramming-gamerule.patch @@ -19,7 +19,7 @@ index b4d76494851601d61a69e2f060727a68f4461267..6262246c4018c660705fbad028f297fc + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index aa1807502131893f29be5918b533aabe83f87514..8e71f7a8b62d89f2d770b03b4730d3d030717bfd 100644 +index e39be18fe6b45a1a53cb484c656872dda00fa274..f9d7419e376268b00db2eb98a3db4116bdb72bd8 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -1483,6 +1483,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/0608-Added-missing-default-perms-for-commands.patch b/Spigot-Server-Patches/0609-Added-missing-default-perms-for-commands.patch similarity index 100% rename from Spigot-Server-Patches/0608-Added-missing-default-perms-for-commands.patch rename to Spigot-Server-Patches/0609-Added-missing-default-perms-for-commands.patch diff --git a/Spigot-Server-Patches/0609-Add-PlayerShearBlockEvent.patch b/Spigot-Server-Patches/0610-Add-PlayerShearBlockEvent.patch similarity index 100% rename from Spigot-Server-Patches/0609-Add-PlayerShearBlockEvent.patch rename to Spigot-Server-Patches/0610-Add-PlayerShearBlockEvent.patch diff --git a/Spigot-Server-Patches/0610-Add-warning-for-servers-not-running-on-Java-11.patch b/Spigot-Server-Patches/0611-Add-warning-for-servers-not-running-on-Java-11.patch similarity index 100% rename from Spigot-Server-Patches/0610-Add-warning-for-servers-not-running-on-Java-11.patch rename to Spigot-Server-Patches/0611-Add-warning-for-servers-not-running-on-Java-11.patch diff --git a/Spigot-Server-Patches/0611-Set-spigots-verbose-world-setting-to-false-by-def.patch b/Spigot-Server-Patches/0612-Set-spigots-verbose-world-setting-to-false-by-def.patch similarity index 89% rename from Spigot-Server-Patches/0611-Set-spigots-verbose-world-setting-to-false-by-def.patch rename to Spigot-Server-Patches/0612-Set-spigots-verbose-world-setting-to-false-by-def.patch index 95be56a7de..dda892e52b 100644 --- a/Spigot-Server-Patches/0611-Set-spigots-verbose-world-setting-to-false-by-def.patch +++ b/Spigot-Server-Patches/0612-Set-spigots-verbose-world-setting-to-false-by-def.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Set spigots verbose world setting to false by def diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index 6b015c1f26facb4e82d75b252164dec05731ca6c..094a934c168d232b0550c3efe722f2ebfbdf8e24 100644 +index 9859e0c964e4d1e7dc7689cb97f40643a8e5cdd7..61ad08b09cd2fe25471bb6c838b8bb3d8102e693 100644 --- a/src/main/java/org/spigotmc/SpigotWorldConfig.java +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java @@ -20,7 +20,7 @@ public class SpigotWorldConfig diff --git a/Spigot-Server-Patches/0612-Fix-curing-zombie-villager-discount-exploit.patch b/Spigot-Server-Patches/0613-Fix-curing-zombie-villager-discount-exploit.patch similarity index 100% rename from Spigot-Server-Patches/0612-Fix-curing-zombie-villager-discount-exploit.patch rename to Spigot-Server-Patches/0613-Fix-curing-zombie-villager-discount-exploit.patch diff --git a/Spigot-Server-Patches/0613-Fix-curing-villager-makes-equipment-disappear.patch b/Spigot-Server-Patches/0614-Fix-curing-villager-makes-equipment-disappear.patch similarity index 100% rename from Spigot-Server-Patches/0613-Fix-curing-villager-makes-equipment-disappear.patch rename to Spigot-Server-Patches/0614-Fix-curing-villager-makes-equipment-disappear.patch diff --git a/Spigot-Server-Patches/0614-Limit-recipe-packets.patch b/Spigot-Server-Patches/0615-Limit-recipe-packets.patch similarity index 90% rename from Spigot-Server-Patches/0614-Limit-recipe-packets.patch rename to Spigot-Server-Patches/0615-Limit-recipe-packets.patch index 49af97abe7..eab66b49a7 100644 --- a/Spigot-Server-Patches/0614-Limit-recipe-packets.patch +++ b/Spigot-Server-Patches/0615-Limit-recipe-packets.patch @@ -23,7 +23,7 @@ index da48ad0e4725d9a9fcb2d60f82249be97be29033..6a9f41eafcd48ff029f027eeebfc0dc9 public static boolean velocityOnlineMode; public static byte[] velocitySecretKey; diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 4bff738485fc828db147d57e8b6247bced46cc4b..73241af66256ef386790027fd6c7e0ca984524b4 100644 +index 54b109777c4383cfb4bef8f8ea8e4a9f1cbc9c7c..8b69cdf0619e4b76e98e4170db58198e89faf0f3 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -1,5 +1,6 @@ @@ -42,8 +42,8 @@ index 4bff738485fc828db147d57e8b6247bced46cc4b..73241af66256ef386790027fd6c7e0ca import org.apache.commons.lang3.StringUtils; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -@@ -29,6 +30,8 @@ import org.apache.logging.log4j.Logger; - // CraftBukkit start +@@ -31,6 +32,8 @@ import io.papermc.paper.adventure.PaperAdventure; // Paper + import io.papermc.paper.adventure.VanillaChatMessageLogic; // Paper import java.util.concurrent.ExecutionException; import java.util.concurrent.atomic.AtomicIntegerFieldUpdater; + @@ -51,7 +51,7 @@ index 4bff738485fc828db147d57e8b6247bced46cc4b..73241af66256ef386790027fd6c7e0ca import org.bukkit.Location; import org.bukkit.craftbukkit.entity.CraftPlayer; import org.bukkit.craftbukkit.event.CraftEventFactory; -@@ -85,6 +88,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -87,6 +90,7 @@ public class PlayerConnection implements PacketListenerPlayIn { private volatile int chatThrottle; private static final AtomicIntegerFieldUpdater chatSpamField = AtomicIntegerFieldUpdater.newUpdater(PlayerConnection.class, "chatThrottle"); private final java.util.concurrent.atomic.AtomicInteger tabSpamLimiter = new java.util.concurrent.atomic.AtomicInteger(); // Paper - configurable tab spam limits @@ -59,7 +59,7 @@ index 4bff738485fc828db147d57e8b6247bced46cc4b..73241af66256ef386790027fd6c7e0ca // CraftBukkit end private int j; private final Int2ShortMap k = new Int2ShortOpenHashMap(); -@@ -233,6 +237,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -235,6 +239,7 @@ public class PlayerConnection implements PacketListenerPlayIn { // CraftBukkit start for (int spam; (spam = this.chatThrottle) > 0 && !chatSpamField.compareAndSet(this, spam, spam - 1); ) ; if (tabSpamLimiter.get() > 0) tabSpamLimiter.getAndDecrement(); // Paper - split to seperate variable @@ -67,7 +67,7 @@ index 4bff738485fc828db147d57e8b6247bced46cc4b..73241af66256ef386790027fd6c7e0ca /* Use thread-safe field access instead if (this.chatThrottle > 0) { --this.chatThrottle; -@@ -2627,6 +2632,14 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -2630,6 +2635,14 @@ public class PlayerConnection implements PacketListenerPlayIn { @Override public void a(PacketPlayInAutoRecipe packetplayinautorecipe) { diff --git a/Spigot-Server-Patches/0615-Fix-CraftSound-backwards-compatibility.patch b/Spigot-Server-Patches/0616-Fix-CraftSound-backwards-compatibility.patch similarity index 100% rename from Spigot-Server-Patches/0615-Fix-CraftSound-backwards-compatibility.patch rename to Spigot-Server-Patches/0616-Fix-CraftSound-backwards-compatibility.patch diff --git a/Spigot-Server-Patches/0616-MC-4-Fix-item-position-desync.patch b/Spigot-Server-Patches/0617-MC-4-Fix-item-position-desync.patch similarity index 100% rename from Spigot-Server-Patches/0616-MC-4-Fix-item-position-desync.patch rename to Spigot-Server-Patches/0617-MC-4-Fix-item-position-desync.patch diff --git a/Spigot-Server-Patches/0617-Player-Chunk-Load-Unload-Events.patch b/Spigot-Server-Patches/0618-Player-Chunk-Load-Unload-Events.patch similarity index 92% rename from Spigot-Server-Patches/0617-Player-Chunk-Load-Unload-Events.patch rename to Spigot-Server-Patches/0618-Player-Chunk-Load-Unload-Events.patch index 3e79427172..4f386ef568 100644 --- a/Spigot-Server-Patches/0617-Player-Chunk-Load-Unload-Events.patch +++ b/Spigot-Server-Patches/0618-Player-Chunk-Load-Unload-Events.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Player Chunk Load/Unload Events diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 7b0cbeaf9974da60c0f93ea779cc6f2301754d48..07808a111047934d8ca10c45b7e702f7a7115788 100644 +index d58abb47c1a543eaf238569f27bf189322c22a93..3f480b6a419403536d87194525a82c5d3745963a 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -16,6 +16,8 @@ import java.util.OptionalInt; @@ -17,7 +17,7 @@ index 7b0cbeaf9974da60c0f93ea779cc6f2301754d48..07808a111047934d8ca10c45b7e702f7 import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -@@ -1956,11 +1958,21 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1958,11 +1960,21 @@ public class EntityPlayer extends EntityHuman implements ICrafting { public void a(ChunkCoordIntPair chunkcoordintpair, Packet packet, Packet packet1) { this.playerConnection.sendPacket(packet1); this.playerConnection.sendPacket(packet); diff --git a/Spigot-Server-Patches/0618-Optimize-Dynamic-get-Missing-Keys.patch b/Spigot-Server-Patches/0619-Optimize-Dynamic-get-Missing-Keys.patch similarity index 100% rename from Spigot-Server-Patches/0618-Optimize-Dynamic-get-Missing-Keys.patch rename to Spigot-Server-Patches/0619-Optimize-Dynamic-get-Missing-Keys.patch diff --git a/Spigot-Server-Patches/0619-Expose-LivingEntity-hurt-direction.patch b/Spigot-Server-Patches/0620-Expose-LivingEntity-hurt-direction.patch similarity index 100% rename from Spigot-Server-Patches/0619-Expose-LivingEntity-hurt-direction.patch rename to Spigot-Server-Patches/0620-Expose-LivingEntity-hurt-direction.patch diff --git a/Spigot-Server-Patches/0620-Add-OBSTRUCTED-reason-to-BedEnterResult.patch b/Spigot-Server-Patches/0621-Add-OBSTRUCTED-reason-to-BedEnterResult.patch similarity index 86% rename from Spigot-Server-Patches/0620-Add-OBSTRUCTED-reason-to-BedEnterResult.patch rename to Spigot-Server-Patches/0621-Add-OBSTRUCTED-reason-to-BedEnterResult.patch index 84a3ce4bd7..47dc271106 100644 --- a/Spigot-Server-Patches/0620-Add-OBSTRUCTED-reason-to-BedEnterResult.patch +++ b/Spigot-Server-Patches/0621-Add-OBSTRUCTED-reason-to-BedEnterResult.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add OBSTRUCTED reason to BedEnterResult diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index fe36039b7dbfeebc1e01a9cefc5f8f391087fee6..30dd99ea12b940d92b4ebba1f74b737dfa0b0ef3 100644 +index 91832e76f22742f85a6de7e1d4f79a9406f98839..22edad7e7faa29155dac1abe9f21781ab1390da6 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -261,6 +261,10 @@ public class CraftEventFactory { +@@ -267,6 +267,10 @@ public class CraftEventFactory { return BedEnterResult.TOO_FAR_AWAY; case NOT_SAFE: return BedEnterResult.NOT_SAFE; diff --git a/Spigot-Server-Patches/0621-Do-not-crash-from-invalid-ingredient-lists-in-Villag.patch b/Spigot-Server-Patches/0622-Do-not-crash-from-invalid-ingredient-lists-in-Villag.patch similarity index 100% rename from Spigot-Server-Patches/0621-Do-not-crash-from-invalid-ingredient-lists-in-Villag.patch rename to Spigot-Server-Patches/0622-Do-not-crash-from-invalid-ingredient-lists-in-Villag.patch diff --git a/Spigot-Server-Patches/0622-added-PlayerTradeEvent.patch b/Spigot-Server-Patches/0623-added-PlayerTradeEvent.patch similarity index 100% rename from Spigot-Server-Patches/0622-added-PlayerTradeEvent.patch rename to Spigot-Server-Patches/0623-added-PlayerTradeEvent.patch diff --git a/Spigot-Server-Patches/0623-Implement-TargetHitEvent.patch b/Spigot-Server-Patches/0624-Implement-TargetHitEvent.patch similarity index 100% rename from Spigot-Server-Patches/0623-Implement-TargetHitEvent.patch rename to Spigot-Server-Patches/0624-Implement-TargetHitEvent.patch diff --git a/Spigot-Server-Patches/0624-Additional-Block-Material-API-s.patch b/Spigot-Server-Patches/0625-Additional-Block-Material-API-s.patch similarity index 100% rename from Spigot-Server-Patches/0624-Additional-Block-Material-API-s.patch rename to Spigot-Server-Patches/0625-Additional-Block-Material-API-s.patch diff --git a/Spigot-Server-Patches/0625-Fix-harming-potion-dupe.patch b/Spigot-Server-Patches/0626-Fix-harming-potion-dupe.patch similarity index 100% rename from Spigot-Server-Patches/0625-Fix-harming-potion-dupe.patch rename to Spigot-Server-Patches/0626-Fix-harming-potion-dupe.patch diff --git a/Spigot-Server-Patches/0626-Implement-API-to-get-Material-from-Boats-and-Minecar.patch b/Spigot-Server-Patches/0627-Implement-API-to-get-Material-from-Boats-and-Minecar.patch similarity index 100% rename from Spigot-Server-Patches/0626-Implement-API-to-get-Material-from-Boats-and-Minecar.patch rename to Spigot-Server-Patches/0627-Implement-API-to-get-Material-from-Boats-and-Minecar.patch diff --git a/Spigot-Server-Patches/0627-Optimized-tick-ready-check.patch b/Spigot-Server-Patches/0628-Optimized-tick-ready-check.patch similarity index 93% rename from Spigot-Server-Patches/0627-Optimized-tick-ready-check.patch rename to Spigot-Server-Patches/0628-Optimized-tick-ready-check.patch index 5fb3151791..71aa1e7446 100644 --- a/Spigot-Server-Patches/0627-Optimized-tick-ready-check.patch +++ b/Spigot-Server-Patches/0628-Optimized-tick-ready-check.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Optimized tick ready check diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 179915312cd35845216a196018726345324614de..f5ab99156ce5429e63976183cbf115d5340a83a1 100644 +index 1c0bfeef83c3669651d9b727c4c746441f6b793c..02303f00e243748b9d1c4a37719fcf5c8d271ed9 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -794,13 +794,13 @@ public abstract class World implements GeneratorAccess, AutoCloseable { @@ -24,7 +24,7 @@ index 179915312cd35845216a196018726345324614de..f5ab99156ce5429e63976183cbf115d5 ((ITickable) tileentity).tick(); } else { tileentity.w(); -@@ -833,9 +833,11 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -834,9 +834,11 @@ public abstract class World implements GeneratorAccess, AutoCloseable { this.tileEntityListTick.remove(tileTickPosition--); // Spigot end //this.tileEntityList.remove(tileentity); // Paper - remove unused list @@ -38,7 +38,7 @@ index 179915312cd35845216a196018726345324614de..f5ab99156ce5429e63976183cbf115d5 } } -@@ -854,8 +856,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -855,8 +857,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable { } // CraftBukkit end */ diff --git a/Spigot-Server-Patches/0628-Cache-burn-durations.patch b/Spigot-Server-Patches/0629-Cache-burn-durations.patch similarity index 100% rename from Spigot-Server-Patches/0628-Cache-burn-durations.patch rename to Spigot-Server-Patches/0629-Cache-burn-durations.patch diff --git a/Spigot-Server-Patches/0629-Allow-disabling-mob-spawner-spawn-egg-transformation.patch b/Spigot-Server-Patches/0630-Allow-disabling-mob-spawner-spawn-egg-transformation.patch similarity index 100% rename from Spigot-Server-Patches/0629-Allow-disabling-mob-spawner-spawn-egg-transformation.patch rename to Spigot-Server-Patches/0630-Allow-disabling-mob-spawner-spawn-egg-transformation.patch diff --git a/Spigot-Server-Patches/0630-Implement-PlayerFlowerPotManipulateEvent.patch b/Spigot-Server-Patches/0631-Implement-PlayerFlowerPotManipulateEvent.patch similarity index 100% rename from Spigot-Server-Patches/0630-Implement-PlayerFlowerPotManipulateEvent.patch rename to Spigot-Server-Patches/0631-Implement-PlayerFlowerPotManipulateEvent.patch diff --git a/Spigot-Server-Patches/0631-Fix-interact-event-not-being-called-in-adventure.patch b/Spigot-Server-Patches/0632-Fix-interact-event-not-being-called-in-adventure.patch similarity index 89% rename from Spigot-Server-Patches/0631-Fix-interact-event-not-being-called-in-adventure.patch rename to Spigot-Server-Patches/0632-Fix-interact-event-not-being-called-in-adventure.patch index 9b9efde7ad..b0d97a705d 100644 --- a/Spigot-Server-Patches/0631-Fix-interact-event-not-being-called-in-adventure.patch +++ b/Spigot-Server-Patches/0632-Fix-interact-event-not-being-called-in-adventure.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Fix interact event not being called in adventure Call PlayerInteractEvent when left-clicking on a block in adventure mode diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 73241af66256ef386790027fd6c7e0ca984524b4..87b1ff21957d5d708209257e569785aeaf191181 100644 +index 8b69cdf0619e4b76e98e4170db58198e89faf0f3..4e3aa45856015d55bd87d43738533e8d7b01beda 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -2055,7 +2055,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -2058,7 +2058,7 @@ public class PlayerConnection implements PacketListenerPlayIn { Vec3D vec3d1 = vec3d.add((double) f7 * d3, (double) f6 * d3, (double) f8 * d3); MovingObjectPosition movingobjectposition = this.player.world.rayTrace(new RayTrace(vec3d, vec3d1, RayTrace.BlockCollisionOption.OUTLINE, RayTrace.FluidCollisionOption.NONE, player)); diff --git a/Spigot-Server-Patches/0632-Zombie-API-breaking-doors.patch b/Spigot-Server-Patches/0633-Zombie-API-breaking-doors.patch similarity index 95% rename from Spigot-Server-Patches/0632-Zombie-API-breaking-doors.patch rename to Spigot-Server-Patches/0633-Zombie-API-breaking-doors.patch index 06762d7654..08073e65fd 100644 --- a/Spigot-Server-Patches/0632-Zombie-API-breaking-doors.patch +++ b/Spigot-Server-Patches/0633-Zombie-API-breaking-doors.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Zombie API - breaking doors diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java -index 59bfb9c269aa95d66e7b9f107f6798f7f86fd245..2aaa6aa323e805423a8fd2bd32cc6a1e48edc817 100644 +index e3606722cb1b3f6a11d34e1cdef7210280dba677..096c345da09b273c9e3e30e93759f5901c5e6fb4 100644 --- a/src/main/java/net/minecraft/server/EntityZombie.java +++ b/src/main/java/net/minecraft/server/EntityZombie.java @@ -79,10 +79,12 @@ public class EntityZombie extends EntityMonster { diff --git a/Spigot-Server-Patches/0633-Fix-nerfed-slime-when-splitting.patch b/Spigot-Server-Patches/0634-Fix-nerfed-slime-when-splitting.patch similarity index 100% rename from Spigot-Server-Patches/0633-Fix-nerfed-slime-when-splitting.patch rename to Spigot-Server-Patches/0634-Fix-nerfed-slime-when-splitting.patch diff --git a/Spigot-Server-Patches/0634-Add-EntityLoadCrossbowEvent.patch b/Spigot-Server-Patches/0635-Add-EntityLoadCrossbowEvent.patch similarity index 96% rename from Spigot-Server-Patches/0634-Add-EntityLoadCrossbowEvent.patch rename to Spigot-Server-Patches/0635-Add-EntityLoadCrossbowEvent.patch index 4f6c5eb776..82f277001b 100644 --- a/Spigot-Server-Patches/0634-Add-EntityLoadCrossbowEvent.patch +++ b/Spigot-Server-Patches/0635-Add-EntityLoadCrossbowEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add EntityLoadCrossbowEvent diff --git a/src/main/java/net/minecraft/server/ItemCrossbow.java b/src/main/java/net/minecraft/server/ItemCrossbow.java -index 658b5ca36d951f2f58d91613b89a328109606fd6..10b1f219fb41bffa09aeeedd4eeb4d432d35ed38 100644 +index 14c0e7382292b3d39858d4d957df8016c301c712..ac60163117a52ea97b710fc93552dd1699e8a092 100644 --- a/src/main/java/net/minecraft/server/ItemCrossbow.java +++ b/src/main/java/net/minecraft/server/ItemCrossbow.java @@ -1,6 +1,10 @@ diff --git a/Spigot-Server-Patches/0635-Guardian-beam-workaround.patch b/Spigot-Server-Patches/0636-Guardian-beam-workaround.patch similarity index 100% rename from Spigot-Server-Patches/0635-Guardian-beam-workaround.patch rename to Spigot-Server-Patches/0636-Guardian-beam-workaround.patch diff --git a/Spigot-Server-Patches/0636-Added-WorldGameRuleChangeEvent.patch b/Spigot-Server-Patches/0637-Added-WorldGameRuleChangeEvent.patch similarity index 96% rename from Spigot-Server-Patches/0636-Added-WorldGameRuleChangeEvent.patch rename to Spigot-Server-Patches/0637-Added-WorldGameRuleChangeEvent.patch index a9ea2650bf..5014da1a10 100644 --- a/Spigot-Server-Patches/0636-Added-WorldGameRuleChangeEvent.patch +++ b/Spigot-Server-Patches/0637-Added-WorldGameRuleChangeEvent.patch @@ -74,10 +74,10 @@ index b245428604e2a432fa3bab4836a5ca1fb35c3f64..53b40f8947c9380ef57ecc7edca203c5 } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index fe21b612f9bd2cf85670eeffa25998130b543339..22eba9372d334c65d009721e808c958dfc271308 100644 +index 597d7a36d7d0b19502d92cf13da53d96c6ede58a..d86c25593db7cc0a73db1c37af94ae4e41bb4e93 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -2350,8 +2350,13 @@ public class CraftWorld implements World { +@@ -2345,8 +2345,13 @@ public class CraftWorld implements World { if (!isGameRule(rule)) return false; @@ -92,7 +92,7 @@ index fe21b612f9bd2cf85670eeffa25998130b543339..22eba9372d334c65d009721e808c958d handle.onChange(getHandle().getMinecraftServer()); return true; } -@@ -2386,8 +2391,12 @@ public class CraftWorld implements World { +@@ -2381,8 +2386,12 @@ public class CraftWorld implements World { if (!isGameRule(rule.getName())) return false; diff --git a/Spigot-Server-Patches/0637-Added-ServerResourcesReloadedEvent.patch b/Spigot-Server-Patches/0638-Added-ServerResourcesReloadedEvent.patch similarity index 100% rename from Spigot-Server-Patches/0637-Added-ServerResourcesReloadedEvent.patch rename to Spigot-Server-Patches/0638-Added-ServerResourcesReloadedEvent.patch diff --git a/Spigot-Server-Patches/0638-Added-world-settings-for-mobs-picking-up-loot.patch b/Spigot-Server-Patches/0639-Added-world-settings-for-mobs-picking-up-loot.patch similarity index 95% rename from Spigot-Server-Patches/0638-Added-world-settings-for-mobs-picking-up-loot.patch rename to Spigot-Server-Patches/0639-Added-world-settings-for-mobs-picking-up-loot.patch index bbd7d53a7b..934ee522ac 100644 --- a/Spigot-Server-Patches/0638-Added-world-settings-for-mobs-picking-up-loot.patch +++ b/Spigot-Server-Patches/0639-Added-world-settings-for-mobs-picking-up-loot.patch @@ -37,10 +37,10 @@ index ced89af70ca791bfe42c4e2d21604997a0cf3e0f..f73304240a626f3f7d9355e6e5f2963a LocalDate localdate = LocalDate.now(); int i = localdate.get(ChronoField.DAY_OF_MONTH); diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java -index 2aaa6aa323e805423a8fd2bd32cc6a1e48edc817..cab4226166c43f11f77be262e0ced1b223764b7d 100644 +index 096c345da09b273c9e3e30e93759f5901c5e6fb4..62d202ff871cf3f3deea69931fbee84131bdda8b 100644 --- a/src/main/java/net/minecraft/server/EntityZombie.java +++ b/src/main/java/net/minecraft/server/EntityZombie.java -@@ -436,7 +436,7 @@ public class EntityZombie extends EntityMonster { +@@ -433,7 +433,7 @@ public class EntityZombie extends EntityMonster { Object object = super.prepare(worldaccess, difficultydamagescaler, enummobspawn, groupdataentity, nbttagcompound); float f = difficultydamagescaler.d(); diff --git a/Spigot-Server-Patches/0639-Implemented-BlockFailedDispenseEvent.patch b/Spigot-Server-Patches/0640-Implemented-BlockFailedDispenseEvent.patch similarity index 59% rename from Spigot-Server-Patches/0639-Implemented-BlockFailedDispenseEvent.patch rename to Spigot-Server-Patches/0640-Implemented-BlockFailedDispenseEvent.patch index 6253d9c902..c43fd103c5 100644 --- a/Spigot-Server-Patches/0639-Implemented-BlockFailedDispenseEvent.patch +++ b/Spigot-Server-Patches/0640-Implemented-BlockFailedDispenseEvent.patch @@ -29,7 +29,7 @@ index 65c212690d8ba7c8ea55d4d3b6af1ba3d9f4a7f6..22ab5a861920e1902c64301c3b06cf95 } else { ItemStack itemstack = tileentitydispenser.getItem(i); diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 30dd99ea12b940d92b4ebba1f74b737dfa0b0ef3..636f2c0a83a6651dae99b39fd96c0c9f065b29b5 100644 +index 22edad7e7faa29155dac1abe9f21781ab1390da6..7721b3ca951054d73b2fbf28c01a7c02b5416451 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -4,6 +4,7 @@ import com.google.common.base.Function; @@ -40,7 +40,35 @@ index 30dd99ea12b940d92b4ebba1f74b737dfa0b0ef3..636f2c0a83a6651dae99b39fd96c0c9f import java.net.InetAddress; import java.util.ArrayList; import java.util.Collections; -@@ -117,7 +118,6 @@ import org.bukkit.entity.ThrownPotion; +@@ -22,7 +23,6 @@ import net.minecraft.server.EntityAnimal; + import net.minecraft.server.EntityAreaEffectCloud; + import net.minecraft.server.EntityDamageSource; + import net.minecraft.server.EntityDamageSourceIndirect; +-import net.minecraft.server.EntityEnderCrystal; + import net.minecraft.server.EntityEnderDragon; + import net.minecraft.server.EntityExperienceOrb; + import net.minecraft.server.EntityFireworks; +@@ -44,11 +44,9 @@ import net.minecraft.server.EntityVillager; + import net.minecraft.server.EntityWaterAnimal; + import net.minecraft.server.EnumDirection; + import net.minecraft.server.EnumHand; +-import net.minecraft.server.EnumItemSlot; + import net.minecraft.server.Explosion; + import net.minecraft.server.GeneratorAccess; + import net.minecraft.server.IBlockData; +-import net.minecraft.server.IChatBaseComponent; + import net.minecraft.server.IInventory; + import net.minecraft.server.IProjectile; + import net.minecraft.server.ItemActionContext; +@@ -69,7 +67,6 @@ import net.minecraft.server.Unit; + import net.minecraft.server.World; + import net.minecraft.server.WorldServer; + import org.bukkit.Bukkit; +-import org.bukkit.Location; + import org.bukkit.Material; + import org.bukkit.NamespacedKey; + import org.bukkit.Server; +@@ -121,7 +118,6 @@ import org.bukkit.entity.ThrownPotion; import org.bukkit.entity.Vehicle; import org.bukkit.entity.Villager; import org.bukkit.entity.Villager.Profession; @@ -48,7 +76,23 @@ index 30dd99ea12b940d92b4ebba1f74b737dfa0b0ef3..636f2c0a83a6651dae99b39fd96c0c9f import org.bukkit.event.Cancellable; import org.bukkit.event.Event; import org.bukkit.event.Event.Result; -@@ -1752,4 +1752,12 @@ public class CraftEventFactory { +@@ -162,7 +158,6 @@ import org.bukkit.event.entity.EntityDeathEvent; + import org.bukkit.event.entity.EntityEnterLoveModeEvent; + import org.bukkit.event.entity.EntityPickupItemEvent; + import org.bukkit.event.entity.EntityPlaceEvent; +-import org.bukkit.event.entity.EntityPortalEvent; + import org.bukkit.event.entity.EntityPotionEffectEvent; + import org.bukkit.event.entity.EntityShootBowEvent; + import org.bukkit.event.entity.EntitySpawnEvent; +@@ -221,7 +216,6 @@ import org.bukkit.inventory.EquipmentSlot; + import org.bukkit.inventory.InventoryView; + import org.bukkit.inventory.meta.BookMeta; + import org.bukkit.potion.PotionEffect; +-import org.bukkit.projectiles.ProjectileSource; + + import org.bukkit.event.entity.SpawnerSpawnEvent; // Spigot + +@@ -1758,4 +1752,12 @@ public class CraftEventFactory { return event; } diff --git a/Spigot-Server-Patches/0640-Added-PlayerLecternPageChangeEvent.patch b/Spigot-Server-Patches/0641-Added-PlayerLecternPageChangeEvent.patch similarity index 100% rename from Spigot-Server-Patches/0640-Added-PlayerLecternPageChangeEvent.patch rename to Spigot-Server-Patches/0641-Added-PlayerLecternPageChangeEvent.patch diff --git a/Spigot-Server-Patches/0641-Fire-event-on-GS4-query.patch b/Spigot-Server-Patches/0642-Fire-event-on-GS4-query.patch similarity index 100% rename from Spigot-Server-Patches/0641-Fire-event-on-GS4-query.patch rename to Spigot-Server-Patches/0642-Fire-event-on-GS4-query.patch diff --git a/Spigot-Server-Patches/0642-Added-PlayerLoomPatternSelectEvent.patch b/Spigot-Server-Patches/0643-Added-PlayerLoomPatternSelectEvent.patch similarity index 100% rename from Spigot-Server-Patches/0642-Added-PlayerLoomPatternSelectEvent.patch rename to Spigot-Server-Patches/0643-Added-PlayerLoomPatternSelectEvent.patch diff --git a/Spigot-Server-Patches/0643-Configurable-door-breaking-difficulty.patch b/Spigot-Server-Patches/0644-Configurable-door-breaking-difficulty.patch similarity index 98% rename from Spigot-Server-Patches/0643-Configurable-door-breaking-difficulty.patch rename to Spigot-Server-Patches/0644-Configurable-door-breaking-difficulty.patch index a97b0bde38..e1944ebfb6 100644 --- a/Spigot-Server-Patches/0643-Configurable-door-breaking-difficulty.patch +++ b/Spigot-Server-Patches/0644-Configurable-door-breaking-difficulty.patch @@ -79,7 +79,7 @@ index c0d26aa9dcd02c44d744b10e18609857ada95889..4761ddfedeed54e79788a6f60f06a805 } diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java -index cab4226166c43f11f77be262e0ced1b223764b7d..4078f5dd68d0ca49886911d1bf58731129d731be 100644 +index 62d202ff871cf3f3deea69931fbee84131bdda8b..752e39ad94ea9e8254853a3fda846be2bd436918 100644 --- a/src/main/java/net/minecraft/server/EntityZombie.java +++ b/src/main/java/net/minecraft/server/EntityZombie.java @@ -25,6 +25,7 @@ public class EntityZombie extends EntityMonster { diff --git a/Spigot-Server-Patches/0644-Empty-commands-shall-not-be-dispatched.patch b/Spigot-Server-Patches/0645-Empty-commands-shall-not-be-dispatched.patch similarity index 100% rename from Spigot-Server-Patches/0644-Empty-commands-shall-not-be-dispatched.patch rename to Spigot-Server-Patches/0645-Empty-commands-shall-not-be-dispatched.patch diff --git a/Spigot-Server-Patches/0645-Implement-API-to-expose-exact-interaction-point.patch b/Spigot-Server-Patches/0646-Implement-API-to-expose-exact-interaction-point.patch similarity index 97% rename from Spigot-Server-Patches/0645-Implement-API-to-expose-exact-interaction-point.patch rename to Spigot-Server-Patches/0646-Implement-API-to-expose-exact-interaction-point.patch index 5edff01a84..02fbd0dadd 100644 --- a/Spigot-Server-Patches/0645-Implement-API-to-expose-exact-interaction-point.patch +++ b/Spigot-Server-Patches/0646-Implement-API-to-expose-exact-interaction-point.patch @@ -18,7 +18,7 @@ index 485b609bb5387b0f8a46c1201177cdc6d183ad91..114e986e5132e5e4bb42d0f08a067429 interactResult = event.useItemInHand() == Event.Result.DENY; interactPosition = blockposition.immutableCopy(); diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 636f2c0a83a6651dae99b39fd96c0c9f065b29b5..d543e9ff0622c8fcab9c8ec24648a8038f080a5f 100644 +index 7721b3ca951054d73b2fbf28c01a7c02b5416451..c25f18d9bf851df8cfb90f065c2d9a857d77f229 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -64,9 +64,11 @@ import net.minecraft.server.NPC; diff --git a/Spigot-Server-Patches/0646-Remove-stale-POIs.patch b/Spigot-Server-Patches/0647-Remove-stale-POIs.patch similarity index 93% rename from Spigot-Server-Patches/0646-Remove-stale-POIs.patch rename to Spigot-Server-Patches/0647-Remove-stale-POIs.patch index ea2328f775..6494c68c6c 100644 --- a/Spigot-Server-Patches/0646-Remove-stale-POIs.patch +++ b/Spigot-Server-Patches/0647-Remove-stale-POIs.patch @@ -25,10 +25,10 @@ index b926cebd053bef829517c9d9bbf1c609c23ca04a..6a0f07b13eef5560dfc7c7b39618c0b8 return (Boolean) this.d(SectionPosition.a(blockposition).s()).map((villageplacesection) -> { return villageplacesection.a(blockposition, predicate); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 493e3cd8a3dbc77f73dd1e026c9e580896995675..53d3e1561ea33c38de5dc5dde181439153fa2775 100644 +index 91d759fee68e8b285f912406fb338750c286f6a0..fbe7f43f6c1010e7a34114f8afb0e64934744335 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1953,8 +1953,16 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1942,8 +1942,16 @@ public class WorldServer extends World implements GeneratorAccessSeed { Optional optional = VillagePlaceType.b(iblockdata); Optional optional1 = VillagePlaceType.b(iblockdata1); @@ -46,7 +46,7 @@ index 493e3cd8a3dbc77f73dd1e026c9e580896995675..53d3e1561ea33c38de5dc5dde1814391 optional.ifPresent((villageplacetype) -> { this.getMinecraftServer().execute(() -> { -@@ -1971,6 +1979,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1960,6 +1968,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { } } diff --git a/Spigot-Server-Patches/0647-Fix-villager-boat-exploit.patch b/Spigot-Server-Patches/0648-Fix-villager-boat-exploit.patch similarity index 88% rename from Spigot-Server-Patches/0647-Fix-villager-boat-exploit.patch rename to Spigot-Server-Patches/0648-Fix-villager-boat-exploit.patch index c486c90205..a7bba2a929 100644 --- a/Spigot-Server-Patches/0647-Fix-villager-boat-exploit.patch +++ b/Spigot-Server-Patches/0648-Fix-villager-boat-exploit.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix villager boat exploit diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 70f702680f8221cb262023814a7bae21b0074da6..4bc9b3b08b42becfd66f39cb0d639bdcae18d45c 100644 +index 43176569a34a4c6af7a3fe7acf0c00da2f6fc91c..ab1c23c12619aaea67cf3a484af3046a3e7c4872 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -540,6 +540,15 @@ public abstract class PlayerList { +@@ -542,6 +542,15 @@ public abstract class PlayerList { for (Iterator iterator = entity.getAllPassengers().iterator(); iterator.hasNext(); entity1.dead = true) { entity1 = (Entity) iterator.next(); diff --git a/Spigot-Server-Patches/0648-Entity-load-save-limit-per-chunk.patch b/Spigot-Server-Patches/0649-Entity-load-save-limit-per-chunk.patch similarity index 100% rename from Spigot-Server-Patches/0648-Entity-load-save-limit-per-chunk.patch rename to Spigot-Server-Patches/0649-Entity-load-save-limit-per-chunk.patch diff --git a/Spigot-Server-Patches/0649-Add-sendOpLevel-API.patch b/Spigot-Server-Patches/0650-Add-sendOpLevel-API.patch similarity index 83% rename from Spigot-Server-Patches/0649-Add-sendOpLevel-API.patch rename to Spigot-Server-Patches/0650-Add-sendOpLevel-API.patch index 9c644be1d2..acab1a094c 100644 --- a/Spigot-Server-Patches/0649-Add-sendOpLevel-API.patch +++ b/Spigot-Server-Patches/0650-Add-sendOpLevel-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add sendOpLevel API diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 4bc9b3b08b42becfd66f39cb0d639bdcae18d45c..1eb44877e7384ae0a028a12b832684126b8d50ec 100644 +index ab1c23c12619aaea67cf3a484af3046a3e7c4872..e1ab296811081a0d1449d48d16de065c070fde23 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -1056,6 +1056,11 @@ public abstract class PlayerList { +@@ -1058,6 +1058,11 @@ public abstract class PlayerList { } private void a(EntityPlayer entityplayer, int i) { @@ -20,7 +20,7 @@ index 4bc9b3b08b42becfd66f39cb0d639bdcae18d45c..1eb44877e7384ae0a028a12b83268412 if (entityplayer.playerConnection != null) { byte b0; -@@ -1070,8 +1075,10 @@ public abstract class PlayerList { +@@ -1072,8 +1077,10 @@ public abstract class PlayerList { entityplayer.playerConnection.sendPacket(new PacketPlayOutEntityStatus(entityplayer, b0)); } @@ -32,10 +32,10 @@ index 4bc9b3b08b42becfd66f39cb0d639bdcae18d45c..1eb44877e7384ae0a028a12b83268412 // Paper start diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 68b95bc17eaa40f11ec3babebbca57d9fb64c9dc..ed7b91bf703c7e7d5cbe323d9ab1c299c33ebad1 100644 +index ee3e4bb122439f96ec35105521285d2c5be317e2..66522b820786649a1b82647d8ccdb086edf420f6 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -2099,6 +2099,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2304,6 +2304,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { ? (org.bukkit.entity.Firework) entity.getBukkitEntity() : null; } diff --git a/Spigot-Server-Patches/0650-Add-StructureLocateEvent.patch b/Spigot-Server-Patches/0651-Add-StructureLocateEvent.patch similarity index 100% rename from Spigot-Server-Patches/0650-Add-StructureLocateEvent.patch rename to Spigot-Server-Patches/0651-Add-StructureLocateEvent.patch diff --git a/Spigot-Server-Patches/0651-Collision-option-for-requiring-a-player-participant.patch b/Spigot-Server-Patches/0652-Collision-option-for-requiring-a-player-participant.patch similarity index 97% rename from Spigot-Server-Patches/0651-Collision-option-for-requiring-a-player-participant.patch rename to Spigot-Server-Patches/0652-Collision-option-for-requiring-a-player-participant.patch index 68c59880d0..2b6e5d1aa3 100644 --- a/Spigot-Server-Patches/0651-Collision-option-for-requiring-a-player-participant.patch +++ b/Spigot-Server-Patches/0652-Collision-option-for-requiring-a-player-participant.patch @@ -28,7 +28,7 @@ index 234d2daecc5d0bf6a99c0a5f4a87f947a15029d9..89f3a28c20f0e4db4650c435dbcbc923 public int wanderingTraderSpawnDayTicks = 24000; public int wanderingTraderSpawnChanceFailureIncrement = 25; diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 8e71f7a8b62d89f2d770b03b4730d3d030717bfd..d8787985ab4c94e9808332c15b3d16d4b52ba195 100644 +index f9d7419e376268b00db2eb98a3db4116bdb72bd8..f307a6361144c7e315b2e0ea45df27527cdb26ca 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -1375,6 +1375,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/0652-Make-ProjectileHitEvent-Cancellable.patch b/Spigot-Server-Patches/0653-Make-ProjectileHitEvent-Cancellable.patch similarity index 97% rename from Spigot-Server-Patches/0652-Make-ProjectileHitEvent-Cancellable.patch rename to Spigot-Server-Patches/0653-Make-ProjectileHitEvent-Cancellable.patch index d2892415e9..e37ab5aa37 100644 --- a/Spigot-Server-Patches/0652-Make-ProjectileHitEvent-Cancellable.patch +++ b/Spigot-Server-Patches/0653-Make-ProjectileHitEvent-Cancellable.patch @@ -32,7 +32,7 @@ index 9f5ce64a60fe7c312399ee416b11b84213dd3bee..bbc089b41fcbe0141f13591db2cb44b9 if (movingobjectposition_enummovingobjecttype == MovingObjectPosition.EnumMovingObjectType.ENTITY) { diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index d543e9ff0622c8fcab9c8ec24648a8038f080a5f..622014739f3b37e9c62d7923c6d105c8b53f1ceb 100644 +index c25f18d9bf851df8cfb90f065c2d9a857d77f229..c225822da37b04814fe990d0f7044f74f2987d13 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -1295,9 +1295,9 @@ public class CraftEventFactory { diff --git a/Spigot-Server-Patches/0653-Return-chat-component-with-empty-text-instead-of-thr.patch b/Spigot-Server-Patches/0654-Return-chat-component-with-empty-text-instead-of-thr.patch similarity index 100% rename from Spigot-Server-Patches/0653-Return-chat-component-with-empty-text-instead-of-thr.patch rename to Spigot-Server-Patches/0654-Return-chat-component-with-empty-text-instead-of-thr.patch diff --git a/Spigot-Server-Patches/0654-Make-schedule-command-per-world.patch b/Spigot-Server-Patches/0655-Make-schedule-command-per-world.patch similarity index 100% rename from Spigot-Server-Patches/0654-Make-schedule-command-per-world.patch rename to Spigot-Server-Patches/0655-Make-schedule-command-per-world.patch diff --git a/Spigot-Server-Patches/0655-Configurable-max-leash-distance.patch b/Spigot-Server-Patches/0656-Configurable-max-leash-distance.patch similarity index 100% rename from Spigot-Server-Patches/0655-Configurable-max-leash-distance.patch rename to Spigot-Server-Patches/0656-Configurable-max-leash-distance.patch diff --git a/Spigot-Server-Patches/0656-Implement-BlockPreDispenseEvent.patch b/Spigot-Server-Patches/0657-Implement-BlockPreDispenseEvent.patch similarity index 96% rename from Spigot-Server-Patches/0656-Implement-BlockPreDispenseEvent.patch rename to Spigot-Server-Patches/0657-Implement-BlockPreDispenseEvent.patch index 53fe5edfb6..0dc5220686 100644 --- a/Spigot-Server-Patches/0656-Implement-BlockPreDispenseEvent.patch +++ b/Spigot-Server-Patches/0657-Implement-BlockPreDispenseEvent.patch @@ -17,7 +17,7 @@ index 063453552b7b6c2395c8f9be27cdb71a15a56ca4..89325af931b5ca43729758e94e971b61 tileentitydispenser.setItem(i, idispensebehavior.dispense(sourceblock, itemstack)); } diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 622014739f3b37e9c62d7923c6d105c8b53f1ceb..db56b48f2fd2d45f286339e62090155f8d802969 100644 +index c225822da37b04814fe990d0f7044f74f2987d13..02a588d83e1ee5091d93fdc3cdec04bdf92d2d05 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -13,6 +13,7 @@ import java.util.List; diff --git a/Spigot-Server-Patches/0657-Added-Vanilla-Entity-Tags.patch b/Spigot-Server-Patches/0658-Added-Vanilla-Entity-Tags.patch similarity index 96% rename from Spigot-Server-Patches/0657-Added-Vanilla-Entity-Tags.patch rename to Spigot-Server-Patches/0658-Added-Vanilla-Entity-Tags.patch index bff7ffe103..8c911115e2 100644 --- a/Spigot-Server-Patches/0657-Added-Vanilla-Entity-Tags.patch +++ b/Spigot-Server-Patches/0658-Added-Vanilla-Entity-Tags.patch @@ -41,10 +41,10 @@ index 0000000000000000000000000000000000000000..4a689a2769ac343c2ffab49631c41601 + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 3138ebd9a4fbf50f5aae74c280a8a916500dcb23..85023c68a9c85802383cfcf52ec21392abdf3d85 100644 +index 1b6c79f8c3038cbcae93eb7880cf16e0a77c83e8..3c83e2363aa4c7323eece1e17781bfe19ce26564 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2168,6 +2168,11 @@ public final class CraftServer implements Server { +@@ -2217,6 +2217,11 @@ public final class CraftServer implements Server { Preconditions.checkArgument(clazz == org.bukkit.Fluid.class, "Fluid namespace must have fluid type"); return (org.bukkit.Tag) new CraftFluidTag(console.getTagRegistry().getFluidTags(), key); diff --git a/Spigot-Server-Patches/0658-added-Wither-API.patch b/Spigot-Server-Patches/0659-added-Wither-API.patch similarity index 100% rename from Spigot-Server-Patches/0658-added-Wither-API.patch rename to Spigot-Server-Patches/0659-added-Wither-API.patch diff --git a/Spigot-Server-Patches/0659-Added-firing-of-PlayerChangeBeaconEffectEvent.patch b/Spigot-Server-Patches/0660-Added-firing-of-PlayerChangeBeaconEffectEvent.patch similarity index 100% rename from Spigot-Server-Patches/0659-Added-firing-of-PlayerChangeBeaconEffectEvent.patch rename to Spigot-Server-Patches/0660-Added-firing-of-PlayerChangeBeaconEffectEvent.patch diff --git a/Spigot-Server-Patches/0660-Fix-console-spam-when-removing-chests-in-water.patch b/Spigot-Server-Patches/0661-Fix-console-spam-when-removing-chests-in-water.patch similarity index 100% rename from Spigot-Server-Patches/0660-Fix-console-spam-when-removing-chests-in-water.patch rename to Spigot-Server-Patches/0661-Fix-console-spam-when-removing-chests-in-water.patch diff --git a/Spigot-Server-Patches/0661-Add-toggle-for-always-placing-the-dragon-egg.patch b/Spigot-Server-Patches/0662-Add-toggle-for-always-placing-the-dragon-egg.patch similarity index 100% rename from Spigot-Server-Patches/0661-Add-toggle-for-always-placing-the-dragon-egg.patch rename to Spigot-Server-Patches/0662-Add-toggle-for-always-placing-the-dragon-egg.patch diff --git a/Spigot-Server-Patches/0662-Added-PlayerStonecutterRecipeSelectEvent.patch b/Spigot-Server-Patches/0663-Added-PlayerStonecutterRecipeSelectEvent.patch similarity index 100% rename from Spigot-Server-Patches/0662-Added-PlayerStonecutterRecipeSelectEvent.patch rename to Spigot-Server-Patches/0663-Added-PlayerStonecutterRecipeSelectEvent.patch diff --git a/Spigot-Server-Patches/0666-Add-dropLeash-variable-to-EntityUnleashEvent.patch b/Spigot-Server-Patches/0664-Add-dropLeash-variable-to-EntityUnleashEvent.patch similarity index 99% rename from Spigot-Server-Patches/0666-Add-dropLeash-variable-to-EntityUnleashEvent.patch rename to Spigot-Server-Patches/0664-Add-dropLeash-variable-to-EntityUnleashEvent.patch index f367be4fe1..19408bc4f3 100644 --- a/Spigot-Server-Patches/0666-Add-dropLeash-variable-to-EntityUnleashEvent.patch +++ b/Spigot-Server-Patches/0664-Add-dropLeash-variable-to-EntityUnleashEvent.patch @@ -137,7 +137,7 @@ index 6bd25833bc3ff3ca46367a48da001ed9bda8c19d..5e4652e997362e7c3fac05ac8a4fcdd6 } } diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index db56b48f2fd2d45f286339e62090155f8d802969..a0a116ac7a4e5ecfd7514b26add44e75be88f631 100644 +index 02a588d83e1ee5091d93fdc3cdec04bdf92d2d05..ab687c8a7f73bebf089880eae728567856a94ec9 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -1447,8 +1447,10 @@ public class CraftEventFactory { diff --git a/Spigot-Server-Patches/0663-Skip-distance-map-update-when-spawning-disabled.patch b/Spigot-Server-Patches/0665-Skip-distance-map-update-when-spawning-disabled.patch similarity index 87% rename from Spigot-Server-Patches/0663-Skip-distance-map-update-when-spawning-disabled.patch rename to Spigot-Server-Patches/0665-Skip-distance-map-update-when-spawning-disabled.patch index def8b55602..96e795198d 100644 --- a/Spigot-Server-Patches/0663-Skip-distance-map-update-when-spawning-disabled.patch +++ b/Spigot-Server-Patches/0665-Skip-distance-map-update-when-spawning-disabled.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Skip distance map update when spawning disabled. diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 12e417d2fe8e7f6a2f664ef916c141305ce1b29c..0ea1b25bf98d71c251351807fa92d4d08eb6b06e 100644 +index 75d25576d68ec95a14372f8530f4916f2bd7c3c5..96a6f4675dc10a0047b7d2ee4164d0376de36c27 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -800,7 +800,7 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -792,7 +792,7 @@ public class ChunkProviderServer extends IChunkProvider { int l = this.chunkMapDistance.b(); // Paper start - per player mob spawning SpawnerCreature.d spawnercreature_d; // moved down diff --git a/Spigot-Server-Patches/0664-Reset-shield-blocking-on-dimension-change.patch b/Spigot-Server-Patches/0666-Reset-shield-blocking-on-dimension-change.patch similarity index 83% rename from Spigot-Server-Patches/0664-Reset-shield-blocking-on-dimension-change.patch rename to Spigot-Server-Patches/0666-Reset-shield-blocking-on-dimension-change.patch index 1d070c1baf..4811b72338 100644 --- a/Spigot-Server-Patches/0664-Reset-shield-blocking-on-dimension-change.patch +++ b/Spigot-Server-Patches/0666-Reset-shield-blocking-on-dimension-change.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Reset shield blocking on dimension change diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 07808a111047934d8ca10c45b7e702f7a7115788..a9a409eebabae11ab84cf9bcced1f9a030b4a479 100644 +index 3f480b6a419403536d87194525a82c5d3745963a..17f6031558d98182c32b3df3fb60daf528d5e684 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -990,6 +990,11 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -987,6 +987,11 @@ public class EntityPlayer extends EntityHuman implements ICrafting { this.world.getServer().getPluginManager().callEvent(changeEvent); // CraftBukkit end } diff --git a/Spigot-Server-Patches/0665-EntityMoveEvent.patch b/Spigot-Server-Patches/0668-EntityMoveEvent.patch similarity index 100% rename from Spigot-Server-Patches/0665-EntityMoveEvent.patch rename to Spigot-Server-Patches/0668-EntityMoveEvent.patch diff --git a/Spigot-Server-Patches/0668-added-option-to-disable-pathfinding-updates-on-block.patch b/Spigot-Server-Patches/0669-added-option-to-disable-pathfinding-updates-on-block.patch similarity index 92% rename from Spigot-Server-Patches/0668-added-option-to-disable-pathfinding-updates-on-block.patch rename to Spigot-Server-Patches/0669-added-option-to-disable-pathfinding-updates-on-block.patch index 565c4df9b7..552df653a8 100644 --- a/Spigot-Server-Patches/0668-added-option-to-disable-pathfinding-updates-on-block.patch +++ b/Spigot-Server-Patches/0669-added-option-to-disable-pathfinding-updates-on-block.patch @@ -19,7 +19,7 @@ index ac96011d4e104c99bb37833d91b8121f03b9d349..0776e68340b0510cc99084bea80791d5 + } } diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 466bb6297bd3bf7bb0ff1f4d0bd1f4ddfe294fa2..cf7d94aabab600822eb5e27f38690b06456d5fcc 100644 +index fdf6380bb95fd5d82842f69411ba440b520f82ca..2b94c195db43d8e7fd58301a33377e87daa16e98 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -1571,6 +1571,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -30,7 +30,7 @@ index 466bb6297bd3bf7bb0ff1f4d0bd1f4ddfe294fa2..cf7d94aabab600822eb5e27f38690b06 VoxelShape voxelshape = iblockdata.getCollisionShape(this, blockposition); VoxelShape voxelshape1 = iblockdata1.getCollisionShape(this, blockposition); -@@ -1599,6 +1600,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1588,6 +1589,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { this.tickingEntities = wasTicking; // Paper } diff --git a/Spigot-Server-Patches/0669-Inline-shift-direction-fields.patch b/Spigot-Server-Patches/0670-Inline-shift-direction-fields.patch similarity index 100% rename from Spigot-Server-Patches/0669-Inline-shift-direction-fields.patch rename to Spigot-Server-Patches/0670-Inline-shift-direction-fields.patch diff --git a/Spigot-Server-Patches/0670-Allow-adding-items-to-BlockDropItemEvent.patch b/Spigot-Server-Patches/0671-Allow-adding-items-to-BlockDropItemEvent.patch similarity index 95% rename from Spigot-Server-Patches/0670-Allow-adding-items-to-BlockDropItemEvent.patch rename to Spigot-Server-Patches/0671-Allow-adding-items-to-BlockDropItemEvent.patch index f501a92886..45adb2d479 100644 --- a/Spigot-Server-Patches/0670-Allow-adding-items-to-BlockDropItemEvent.patch +++ b/Spigot-Server-Patches/0671-Allow-adding-items-to-BlockDropItemEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Allow adding items to BlockDropItemEvent diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index a0a116ac7a4e5ecfd7514b26add44e75be88f631..9ff0f70154367b99317ed3927a97ec08c7e9e015 100644 +index ab687c8a7f73bebf089880eae728567856a94ec9..689e19924c6690ba187aa6787f1eb34dd5c85f40 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -380,13 +380,30 @@ public class CraftEventFactory { diff --git a/Spigot-Server-Patches/0671-Add-getMainThreadExecutor-to-BukkitScheduler.patch b/Spigot-Server-Patches/0672-Add-getMainThreadExecutor-to-BukkitScheduler.patch similarity index 100% rename from Spigot-Server-Patches/0671-Add-getMainThreadExecutor-to-BukkitScheduler.patch rename to Spigot-Server-Patches/0672-Add-getMainThreadExecutor-to-BukkitScheduler.patch diff --git a/Spigot-Server-Patches/0672-living-entity-allow-attribute-registration.patch b/Spigot-Server-Patches/0673-living-entity-allow-attribute-registration.patch similarity index 100% rename from Spigot-Server-Patches/0672-living-entity-allow-attribute-registration.patch rename to Spigot-Server-Patches/0673-living-entity-allow-attribute-registration.patch diff --git a/Spigot-Server-Patches/0673-fix-dead-slime-setSize-invincibility.patch b/Spigot-Server-Patches/0674-fix-dead-slime-setSize-invincibility.patch similarity index 100% rename from Spigot-Server-Patches/0673-fix-dead-slime-setSize-invincibility.patch rename to Spigot-Server-Patches/0674-fix-dead-slime-setSize-invincibility.patch diff --git a/Spigot-Server-Patches/0674-Merchant-getRecipes-should-return-an-immutable-list.patch b/Spigot-Server-Patches/0675-Merchant-getRecipes-should-return-an-immutable-list.patch similarity index 100% rename from Spigot-Server-Patches/0674-Merchant-getRecipes-should-return-an-immutable-list.patch rename to Spigot-Server-Patches/0675-Merchant-getRecipes-should-return-an-immutable-list.patch diff --git a/work/Bukkit b/work/Bukkit index 1e843b72bb..1b5ad2af5d 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit 1e843b72bbd67b7b5ec785eae260fb00a5b64292 +Subproject commit 1b5ad2af5decf1d2cd276ae391d75a8ab1167b15 diff --git a/work/CraftBukkit b/work/CraftBukkit index b7eed25467..8049146227 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit b7eed25467eb583d77cda6a042387dc48fe14f97 +Subproject commit 8049146227e4f8e44013f6b825ee91bdc7e3290f diff --git a/work/Spigot b/work/Spigot index 73fb6094f4..89d6047d1a 160000 --- a/work/Spigot +++ b/work/Spigot @@ -1 +1 @@ -Subproject commit 73fb6094f4fa318955bb5bb11a1ec1af12cf90a1 +Subproject commit 89d6047d1aea78b9011ba38681663780a63233c9