diff --git a/Spigot-API-Patches/0005-Adventure.patch b/Spigot-API-Patches/0005-Adventure.patch index bccb5b37d8..a13859f4db 100644 --- a/Spigot-API-Patches/0005-Adventure.patch +++ b/Spigot-API-Patches/0005-Adventure.patch @@ -7,7 +7,7 @@ Co-authored-by: zml Co-authored-by: Jake Potrebic diff --git a/pom.xml b/pom.xml -index 58fc279186e01a4703102227f387e96272fcf0a7..efcd00a8f25a9e82512b090f54a337fed734dfb5 100644 +index 58fc279186e01a4703102227f387e96272fcf0a7..6397486ac7027a679d70d388066e4dac55936f5c 100644 --- a/pom.xml +++ b/pom.xml @@ -48,7 +48,39 @@ @@ -20,7 +20,7 @@ index 58fc279186e01a4703102227f387e96272fcf0a7..efcd00a8f25a9e82512b090f54a337fe + + net.kyori + adventure-bom -+ 4.5.1 ++ 4.6.0 + pom + import + @@ -55,10 +55,10 @@ index 58fc279186e01a4703102227f387e96272fcf0a7..efcd00a8f25a9e82512b090f54a337fe https://javadoc.io/doc/org.jetbrains/annotations-java5/20.1.0/ https://javadoc.io/doc/net.md-5/bungeecord-chat/1.16-R0.4/ + -+ https://jd.adventure.kyori.net/api/4.5.1/ -+ https://jd.adventure.kyori.net/text-serializer-gson/4.5.1/ -+ https://jd.adventure.kyori.net/text-serializer-legacy/4.5.1/ -+ https://jd.adventure.kyori.net/text-serializer-plain/4.5.1/ ++ https://jd.adventure.kyori.net/api/4.6.0/ ++ https://jd.adventure.kyori.net/text-serializer-gson/4.6.0/ ++ https://jd.adventure.kyori.net/text-serializer-legacy/4.6.0/ ++ https://jd.adventure.kyori.net/text-serializer-plain/4.6.0/ + @@ -94,6 +94,214 @@ index ef58a6c00f444bd498a2d8fc4e457236f393954f..ecd149157d4fb80444f34bf5633d74bc + } + // Paper end } +diff --git a/src/main/java/io/papermc/paper/chat/ChatFormatter.java b/src/main/java/io/papermc/paper/chat/ChatFormatter.java +new file mode 100644 +index 0000000000000000000000000000000000000000..9873a97d472e000d2d996fc2b6a46db25cdd397b +--- /dev/null ++++ b/src/main/java/io/papermc/paper/chat/ChatFormatter.java +@@ -0,0 +1,24 @@ ++package io.papermc.paper.chat; ++ ++import net.kyori.adventure.text.Component; ++import org.bukkit.entity.Player; ++import org.jetbrains.annotations.NotNull; ++ ++/** ++ * A chat formatter is responsible for the formatting of chat messages sent by {@link Player}s to the server. ++ */ ++@FunctionalInterface ++public interface ChatFormatter { ++ // This format might be different than the CraftBukkit one? ++ ChatFormatter DEFAULT = (displayName, message) -> Component.translatable("chat.type.text", displayName, message); ++ ++ /** ++ * Formats a chat message. ++ * ++ * @param displayName the display name of the {@link Player} sending the message ++ * @param message the chat message ++ * @return a formatted chat message ++ */ ++ @NotNull ++ Component chat(final @NotNull Component displayName, final @NotNull Component message); ++} +diff --git a/src/main/java/io/papermc/paper/event/player/AbstractChatEvent.java b/src/main/java/io/papermc/paper/event/player/AbstractChatEvent.java +new file mode 100644 +index 0000000000000000000000000000000000000000..9cac60a004a71963221dc4e5fc595eeba3055be7 +--- /dev/null ++++ b/src/main/java/io/papermc/paper/event/player/AbstractChatEvent.java +@@ -0,0 +1,95 @@ ++package io.papermc.paper.event.player; ++ ++import io.papermc.paper.chat.ChatFormatter; ++import java.util.Objects; ++import java.util.Set; ++import net.kyori.adventure.text.Component; ++import org.bukkit.entity.Player; ++import org.bukkit.event.Cancellable; ++import org.bukkit.event.player.PlayerEvent; ++import org.jetbrains.annotations.NotNull; ++ ++/** ++ * An abstract implementation of a chat event, handling shared logic. ++ */ ++public abstract class AbstractChatEvent extends PlayerEvent implements Cancellable { ++ private final Set recipients; ++ private boolean cancelled = false; ++ private ChatFormatter formatter; ++ private Component message; ++ ++ AbstractChatEvent(final boolean async, final @NotNull Player player, final @NotNull Set recipients, final @NotNull ChatFormatter formatter, final @NotNull Component message) { ++ super(player, async); ++ this.recipients = recipients; ++ this.formatter = formatter; ++ this.message = message; ++ } ++ ++ /** ++ * Gets a set of recipients that this chat message will be displayed to. ++ * ++ *

The set returned is not guaranteed to be mutable and may auto-populate ++ * on access. Any listener accessing the returned set should be aware that ++ * it may reduce performance for a lazy set implementation.

++ * ++ *

Listeners should be aware that modifying the list may throw {@link ++ * UnsupportedOperationException} if the event caller provides an ++ * unmodifiable set.

++ * ++ * @return a set of players who will receive the chat message ++ */ ++ @NotNull ++ public final Set recipients() { ++ return this.recipients; ++ } ++ ++ /** ++ * Gets the chat formatter. ++ * ++ * @return the chat formatter ++ */ ++ @NotNull ++ public final ChatFormatter formatter() { ++ return this.formatter; ++ } ++ ++ /** ++ * Sets the chat formatter. ++ * ++ * @param formatter the chat formatter ++ * @throws NullPointerException if {@code formatter} is {@code null} ++ */ ++ public final void formatter(final @NotNull ChatFormatter formatter) { ++ this.formatter = Objects.requireNonNull(formatter, "formatter"); ++ } ++ ++ /** ++ * Gets the user-supplied message. ++ * ++ * @return the user-supplied message ++ */ ++ @NotNull ++ public final Component message() { ++ return this.message; ++ } ++ ++ /** ++ * Sets the user-supplied message. ++ * ++ * @param message the user-supplied message ++ * @throws NullPointerException if {@code message} is {@code null} ++ */ ++ public final void message(final @NotNull Component message) { ++ this.message = Objects.requireNonNull(message, "message"); ++ } ++ ++ @Override ++ public final boolean isCancelled() { ++ return this.cancelled; ++ } ++ ++ @Override ++ public final void setCancelled(final boolean cancelled) { ++ this.cancelled = cancelled; ++ } ++} +diff --git a/src/main/java/io/papermc/paper/event/player/AsyncChatEvent.java b/src/main/java/io/papermc/paper/event/player/AsyncChatEvent.java +new file mode 100644 +index 0000000000000000000000000000000000000000..baaa0451fec6b2d9a601f355984adce6c74d11f6 +--- /dev/null ++++ b/src/main/java/io/papermc/paper/event/player/AsyncChatEvent.java +@@ -0,0 +1,30 @@ ++package io.papermc.paper.event.player; ++ ++import io.papermc.paper.chat.ChatFormatter; ++import java.util.Set; ++import net.kyori.adventure.text.Component; ++import org.bukkit.entity.Player; ++import org.bukkit.event.HandlerList; ++import org.jetbrains.annotations.NotNull; ++ ++/** ++ * An event fired when a {@link Player} sends a chat message to the server. ++ */ ++public final class AsyncChatEvent extends AbstractChatEvent { ++ private static final HandlerList HANDLERS = new HandlerList(); ++ ++ public AsyncChatEvent(final boolean async, final @NotNull Player player, final @NotNull Set recipients, final @NotNull ChatFormatter formatter, final @NotNull Component message) { ++ super(async, player, recipients, formatter, message); ++ } ++ ++ @NotNull ++ @Override ++ public HandlerList getHandlers() { ++ return HANDLERS; ++ } ++ ++ @NotNull ++ public static HandlerList getHandlerList() { ++ return HANDLERS; ++ } ++} +diff --git a/src/main/java/io/papermc/paper/event/player/ChatEvent.java b/src/main/java/io/papermc/paper/event/player/ChatEvent.java +new file mode 100644 +index 0000000000000000000000000000000000000000..04ee20906e104e15d730899477ae983d3255cb18 +--- /dev/null ++++ b/src/main/java/io/papermc/paper/event/player/ChatEvent.java +@@ -0,0 +1,35 @@ ++package io.papermc.paper.event.player; ++ ++import io.papermc.paper.chat.ChatFormatter; ++import java.util.Set; ++import net.kyori.adventure.text.Component; ++import org.bukkit.Warning; ++import org.bukkit.entity.Player; ++import org.bukkit.event.HandlerList; ++import org.jetbrains.annotations.NotNull; ++ ++/** ++ * An event fired when a {@link Player} sends a chat message to the server. ++ * ++ * @deprecated Listening to this event forces chat to wait for the main thread, delaying chat messages. It is recommended to use {@link AsyncChatEvent} instead, wherever possible. ++ */ ++@Deprecated ++@Warning(reason = "Listening to this event forces chat to wait for the main thread, delaying chat messages.") ++public final class ChatEvent extends AbstractChatEvent { ++ private static final HandlerList HANDLERS = new HandlerList(); ++ ++ public ChatEvent(final @NotNull Player player, final @NotNull Set recipients, final @NotNull ChatFormatter formatter, final @NotNull Component message) { ++ super(false, player, recipients, formatter, message); ++ } ++ ++ @NotNull ++ @Override ++ public HandlerList getHandlers() { ++ return HANDLERS; ++ } ++ ++ @NotNull ++ public static HandlerList getHandlerList() { ++ return HANDLERS; ++ } ++} 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 @@ -601,6 +809,18 @@ index 768f35c19c4557236bded5f4a85f48a2b2b2a9e6..d0ce64412276512cde133937a85a3340 + } + // Paper end } +diff --git a/src/main/java/org/bukkit/Warning.java b/src/main/java/org/bukkit/Warning.java +index efb97712cc9dc7c1e12a59f5b94e4f2ad7c6b7d8..3024468af4c073324e536c1cb26beffb1e09f3f4 100644 +--- a/src/main/java/org/bukkit/Warning.java ++++ b/src/main/java/org/bukkit/Warning.java +@@ -67,6 +67,7 @@ public @interface Warning { + * + */ + public boolean printFor(@Nullable Warning warning) { ++ if (Boolean.getBoolean("paper.alwaysPrintWarningState")) return true; // Paper + if (this == DEFAULT) { + return warning == null || warning.value(); + } diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java index b8a33ac504da73ec990550bdd23e4548f6ccba95..27faaf8d1101f8522b728e3d73833e4dddbf1715 100644 --- a/src/main/java/org/bukkit/World.java @@ -1502,6 +1722,22 @@ index f1e9bc9bc797b7216336d3470e3c696a06f2b21a..090d22bd30f7947103771aaaf09a2398 public String getDefaultTitle() { return title; } +diff --git a/src/main/java/org/bukkit/event/player/AsyncPlayerChatEvent.java b/src/main/java/org/bukkit/event/player/AsyncPlayerChatEvent.java +index 9c68c3f2d61500479f48b80264f625aaae2f3204..399afcd19fcb6acd24857ed6ab48cf0d105a01a3 100644 +--- a/src/main/java/org/bukkit/event/player/AsyncPlayerChatEvent.java ++++ b/src/main/java/org/bukkit/event/player/AsyncPlayerChatEvent.java +@@ -22,7 +22,11 @@ import org.jetbrains.annotations.NotNull; + *

+ * Care should be taken to check {@link #isAsynchronous()} and treat the event + * appropriately. ++ * ++ * @deprecated use {@link io.papermc.paper.event.player.AsyncChatEvent} instead + */ ++@Deprecated // Paper ++@org.bukkit.Warning(value = false, reason = "Don't nag on old event yet") // Paper + public class AsyncPlayerChatEvent extends PlayerEvent implements Cancellable { + private static final HandlerList handlers = new HandlerList(); + private boolean cancel = false; 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 @@ -1633,6 +1869,31 @@ index c8384da69af61e1970f254a3a9c206ee81d7a989..992d1025ca02020e87a9ab5db83d2494 } /** +diff --git a/src/main/java/org/bukkit/event/player/PlayerChatEvent.java b/src/main/java/org/bukkit/event/player/PlayerChatEvent.java +index 8ea56aac752544f798728b429e7152afbee497e4..213837794c603cb9f152f917941b912326a08030 100644 +--- a/src/main/java/org/bukkit/event/player/PlayerChatEvent.java ++++ b/src/main/java/org/bukkit/event/player/PlayerChatEvent.java +@@ -18,6 +18,7 @@ import org.jetbrains.annotations.NotNull; + * Listening to this event forces chat to wait for the main thread which + * causes delays for chat. {@link AsyncPlayerChatEvent} is the encouraged + * alternative for thread safe implementations. ++ * @deprecated use {@link io.papermc.paper.event.player.ChatEvent} instead + */ + @Deprecated + @Warning(reason = "Listening to this event forces chat to wait for the main thread, delaying chat messages.") +diff --git a/src/main/java/org/bukkit/event/player/PlayerEvent.java b/src/main/java/org/bukkit/event/player/PlayerEvent.java +index 793b661b6d2d05de3d7f4fc26a4c018a2af58e62..f6d3b817de3001f04ea4554c7c39a1290af3fd6d 100644 +--- a/src/main/java/org/bukkit/event/player/PlayerEvent.java ++++ b/src/main/java/org/bukkit/event/player/PlayerEvent.java +@@ -14,7 +14,7 @@ public abstract class PlayerEvent extends Event { + player = who; + } + +- PlayerEvent(@NotNull final Player who, boolean async) { ++ public PlayerEvent(@NotNull final Player who, boolean async) { // Paper - public + super(async); + player = who; + diff --git a/src/main/java/org/bukkit/event/player/PlayerJoinEvent.java b/src/main/java/org/bukkit/event/player/PlayerJoinEvent.java index d06684aba7688ce06777dbd837a46856a9d7767f..4af1d064fcb57773dfa8f6ad40d6482973f8e1a8 100644 --- a/src/main/java/org/bukkit/event/player/PlayerJoinEvent.java diff --git a/Spigot-API-Patches/0184-Increase-custom-payload-channel-message-size.patch b/Spigot-API-Patches/0183-Increase-custom-payload-channel-message-size.patch similarity index 100% rename from Spigot-API-Patches/0184-Increase-custom-payload-channel-message-size.patch rename to Spigot-API-Patches/0183-Increase-custom-payload-channel-message-size.patch diff --git a/Spigot-API-Patches/0183-Make-PlayerEvent-public.patch b/Spigot-API-Patches/0183-Make-PlayerEvent-public.patch deleted file mode 100644 index ed61e9159c..0000000000 --- a/Spigot-API-Patches/0183-Make-PlayerEvent-public.patch +++ /dev/null @@ -1,19 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Aikar -Date: Mon, 27 Apr 2020 02:40:34 -0400 -Subject: [PATCH] Make PlayerEvent public - - -diff --git a/src/main/java/org/bukkit/event/player/PlayerEvent.java b/src/main/java/org/bukkit/event/player/PlayerEvent.java -index 793b661b6d2d05de3d7f4fc26a4c018a2af58e62..b7c8f2c31731960124ae4d67e935d2baaaae9e27 100644 ---- a/src/main/java/org/bukkit/event/player/PlayerEvent.java -+++ b/src/main/java/org/bukkit/event/player/PlayerEvent.java -@@ -14,7 +14,7 @@ public abstract class PlayerEvent extends Event { - player = who; - } - -- PlayerEvent(@NotNull final Player who, boolean async) { -+ public PlayerEvent(@NotNull final Player who, boolean async) { // Paper - wtf? - super(async); - player = who; - diff --git a/Spigot-API-Patches/0185-Expose-the-internal-current-tick.patch b/Spigot-API-Patches/0184-Expose-the-internal-current-tick.patch similarity index 100% rename from Spigot-API-Patches/0185-Expose-the-internal-current-tick.patch rename to Spigot-API-Patches/0184-Expose-the-internal-current-tick.patch diff --git a/Spigot-API-Patches/0186-PlayerDeathEvent-shouldDropExperience.patch b/Spigot-API-Patches/0185-PlayerDeathEvent-shouldDropExperience.patch similarity index 97% rename from Spigot-API-Patches/0186-PlayerDeathEvent-shouldDropExperience.patch rename to Spigot-API-Patches/0185-PlayerDeathEvent-shouldDropExperience.patch index f4a70120eb..f19bdcd569 100644 --- a/Spigot-API-Patches/0186-PlayerDeathEvent-shouldDropExperience.patch +++ b/Spigot-API-Patches/0185-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 831c2aeca95f813b675603af8173e2a20b740052..fa30689cc3555020a0989dd0b667644158578754 100644 +index 7b78afe9281681cb9262fa044c1069a6121358eb..46917615ac4734bf5fa4ddea497132466eb5cc35 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 @@ diff --git a/Spigot-API-Patches/0187-Add-effect-to-block-break-naturally.patch b/Spigot-API-Patches/0186-Add-effect-to-block-break-naturally.patch similarity index 100% rename from Spigot-API-Patches/0187-Add-effect-to-block-break-naturally.patch rename to Spigot-API-Patches/0186-Add-effect-to-block-break-naturally.patch diff --git a/Spigot-API-Patches/0188-Add-ThrownEggHatchEvent.patch b/Spigot-API-Patches/0187-Add-ThrownEggHatchEvent.patch similarity index 100% rename from Spigot-API-Patches/0188-Add-ThrownEggHatchEvent.patch rename to Spigot-API-Patches/0187-Add-ThrownEggHatchEvent.patch diff --git a/Spigot-API-Patches/0189-Entity-Jump-API.patch b/Spigot-API-Patches/0188-Entity-Jump-API.patch similarity index 100% rename from Spigot-API-Patches/0189-Entity-Jump-API.patch rename to Spigot-API-Patches/0188-Entity-Jump-API.patch diff --git a/Spigot-API-Patches/0190-add-hand-to-BlockMultiPlaceEvent.patch b/Spigot-API-Patches/0189-add-hand-to-BlockMultiPlaceEvent.patch similarity index 100% rename from Spigot-API-Patches/0190-add-hand-to-BlockMultiPlaceEvent.patch rename to Spigot-API-Patches/0189-add-hand-to-BlockMultiPlaceEvent.patch diff --git a/Spigot-API-Patches/0191-Add-tick-times-API.patch b/Spigot-API-Patches/0190-Add-tick-times-API.patch similarity index 100% rename from Spigot-API-Patches/0191-Add-tick-times-API.patch rename to Spigot-API-Patches/0190-Add-tick-times-API.patch diff --git a/Spigot-API-Patches/0192-Expose-MinecraftServer-isRunning.patch b/Spigot-API-Patches/0191-Expose-MinecraftServer-isRunning.patch similarity index 100% rename from Spigot-API-Patches/0192-Expose-MinecraftServer-isRunning.patch rename to Spigot-API-Patches/0191-Expose-MinecraftServer-isRunning.patch diff --git a/Spigot-API-Patches/0193-Disable-Sync-Events-firing-Async-errors-during-shutd.patch b/Spigot-API-Patches/0192-Disable-Sync-Events-firing-Async-errors-during-shutd.patch similarity index 100% rename from Spigot-API-Patches/0193-Disable-Sync-Events-firing-Async-errors-during-shutd.patch rename to Spigot-API-Patches/0192-Disable-Sync-Events-firing-Async-errors-during-shutd.patch diff --git a/Spigot-API-Patches/0194-Make-JavaPluginLoader-thread-safe.patch b/Spigot-API-Patches/0193-Make-JavaPluginLoader-thread-safe.patch similarity index 100% rename from Spigot-API-Patches/0194-Make-JavaPluginLoader-thread-safe.patch rename to Spigot-API-Patches/0193-Make-JavaPluginLoader-thread-safe.patch diff --git a/Spigot-API-Patches/0195-Add-Player-Client-Options-API.patch b/Spigot-API-Patches/0194-Add-Player-Client-Options-API.patch similarity index 100% rename from Spigot-API-Patches/0195-Add-Player-Client-Options-API.patch rename to Spigot-API-Patches/0194-Add-Player-Client-Options-API.patch diff --git a/Spigot-API-Patches/0196-Add-PlayerAttackEntityCooldownResetEvent.patch b/Spigot-API-Patches/0195-Add-PlayerAttackEntityCooldownResetEvent.patch similarity index 100% rename from Spigot-API-Patches/0196-Add-PlayerAttackEntityCooldownResetEvent.patch rename to Spigot-API-Patches/0195-Add-PlayerAttackEntityCooldownResetEvent.patch diff --git a/Spigot-API-Patches/0197-Fix-Potion-toItemStack-swapping-the-extended-and-upg.patch b/Spigot-API-Patches/0196-Fix-Potion-toItemStack-swapping-the-extended-and-upg.patch similarity index 100% rename from Spigot-API-Patches/0197-Fix-Potion-toItemStack-swapping-the-extended-and-upg.patch rename to Spigot-API-Patches/0196-Fix-Potion-toItemStack-swapping-the-extended-and-upg.patch diff --git a/Spigot-API-Patches/0198-Villager-Restocks-API.patch b/Spigot-API-Patches/0197-Villager-Restocks-API.patch similarity index 100% rename from Spigot-API-Patches/0198-Villager-Restocks-API.patch rename to Spigot-API-Patches/0197-Villager-Restocks-API.patch diff --git a/Spigot-API-Patches/0199-Expose-game-version.patch b/Spigot-API-Patches/0198-Expose-game-version.patch similarity index 100% rename from Spigot-API-Patches/0199-Expose-game-version.patch rename to Spigot-API-Patches/0198-Expose-game-version.patch diff --git a/Spigot-API-Patches/0200-Add-item-slot-convenience-methods.patch b/Spigot-API-Patches/0199-Add-item-slot-convenience-methods.patch similarity index 100% rename from Spigot-API-Patches/0200-Add-item-slot-convenience-methods.patch rename to Spigot-API-Patches/0199-Add-item-slot-convenience-methods.patch diff --git a/Spigot-API-Patches/0201-Add-Mob-Goal-API.patch b/Spigot-API-Patches/0200-Add-Mob-Goal-API.patch similarity index 100% rename from Spigot-API-Patches/0201-Add-Mob-Goal-API.patch rename to Spigot-API-Patches/0200-Add-Mob-Goal-API.patch diff --git a/Spigot-API-Patches/0202-World-view-distance-api.patch b/Spigot-API-Patches/0201-World-view-distance-api.patch similarity index 100% rename from Spigot-API-Patches/0202-World-view-distance-api.patch rename to Spigot-API-Patches/0201-World-view-distance-api.patch diff --git a/Spigot-API-Patches/0203-Add-villager-reputation-API.patch b/Spigot-API-Patches/0202-Add-villager-reputation-API.patch similarity index 100% rename from Spigot-API-Patches/0203-Add-villager-reputation-API.patch rename to Spigot-API-Patches/0202-Add-villager-reputation-API.patch diff --git a/Spigot-API-Patches/0204-Spawn-Reason-API.patch b/Spigot-API-Patches/0203-Spawn-Reason-API.patch similarity index 100% rename from Spigot-API-Patches/0204-Spawn-Reason-API.patch rename to Spigot-API-Patches/0203-Spawn-Reason-API.patch diff --git a/Spigot-API-Patches/0205-Potential-bed-API.patch b/Spigot-API-Patches/0204-Potential-bed-API.patch similarity index 100% rename from Spigot-API-Patches/0205-Potential-bed-API.patch rename to Spigot-API-Patches/0204-Potential-bed-API.patch diff --git a/Spigot-API-Patches/0206-Prioritise-own-classes-where-possible.patch b/Spigot-API-Patches/0205-Prioritise-own-classes-where-possible.patch similarity index 100% rename from Spigot-API-Patches/0206-Prioritise-own-classes-where-possible.patch rename to Spigot-API-Patches/0205-Prioritise-own-classes-where-possible.patch diff --git a/Spigot-API-Patches/0207-Add-Raw-Byte-ItemStack-Serialization.patch b/Spigot-API-Patches/0206-Add-Raw-Byte-ItemStack-Serialization.patch similarity index 100% rename from Spigot-API-Patches/0207-Add-Raw-Byte-ItemStack-Serialization.patch rename to Spigot-API-Patches/0206-Add-Raw-Byte-ItemStack-Serialization.patch diff --git a/Spigot-API-Patches/0208-Provide-a-useful-PluginClassLoader-toString.patch b/Spigot-API-Patches/0207-Provide-a-useful-PluginClassLoader-toString.patch similarity index 100% rename from Spigot-API-Patches/0208-Provide-a-useful-PluginClassLoader-toString.patch rename to Spigot-API-Patches/0207-Provide-a-useful-PluginClassLoader-toString.patch diff --git a/Spigot-API-Patches/0209-Inventory-getHolder-method-without-block-snapshot.patch b/Spigot-API-Patches/0208-Inventory-getHolder-method-without-block-snapshot.patch similarity index 100% rename from Spigot-API-Patches/0209-Inventory-getHolder-method-without-block-snapshot.patch rename to Spigot-API-Patches/0208-Inventory-getHolder-method-without-block-snapshot.patch diff --git a/Spigot-API-Patches/0210-Expose-Arrow-getItemStack.patch b/Spigot-API-Patches/0209-Expose-Arrow-getItemStack.patch similarity index 100% rename from Spigot-API-Patches/0210-Expose-Arrow-getItemStack.patch rename to Spigot-API-Patches/0209-Expose-Arrow-getItemStack.patch diff --git a/Spigot-API-Patches/0211-Add-and-implement-PlayerRecipeBookClickEvent.patch b/Spigot-API-Patches/0210-Add-and-implement-PlayerRecipeBookClickEvent.patch similarity index 100% rename from Spigot-API-Patches/0211-Add-and-implement-PlayerRecipeBookClickEvent.patch rename to Spigot-API-Patches/0210-Add-and-implement-PlayerRecipeBookClickEvent.patch diff --git a/Spigot-API-Patches/0212-Support-components-in-ItemMeta.patch b/Spigot-API-Patches/0211-Support-components-in-ItemMeta.patch similarity index 100% rename from Spigot-API-Patches/0212-Support-components-in-ItemMeta.patch rename to Spigot-API-Patches/0211-Support-components-in-ItemMeta.patch diff --git a/Spigot-API-Patches/0213-added-2-new-TargetReasons-for-1.16-mob-behavior.patch b/Spigot-API-Patches/0212-added-2-new-TargetReasons-for-1.16-mob-behavior.patch similarity index 100% rename from Spigot-API-Patches/0213-added-2-new-TargetReasons-for-1.16-mob-behavior.patch rename to Spigot-API-Patches/0212-added-2-new-TargetReasons-for-1.16-mob-behavior.patch diff --git a/Spigot-API-Patches/0214-Add-entity-liquid-API.patch b/Spigot-API-Patches/0213-Add-entity-liquid-API.patch similarity index 100% rename from Spigot-API-Patches/0214-Add-entity-liquid-API.patch rename to Spigot-API-Patches/0213-Add-entity-liquid-API.patch diff --git a/Spigot-API-Patches/0215-Add-PrepareResultEvent-PrepareGrindstoneEvent.patch b/Spigot-API-Patches/0214-Add-PrepareResultEvent-PrepareGrindstoneEvent.patch similarity index 100% rename from Spigot-API-Patches/0215-Add-PrepareResultEvent-PrepareGrindstoneEvent.patch rename to Spigot-API-Patches/0214-Add-PrepareResultEvent-PrepareGrindstoneEvent.patch diff --git a/Spigot-API-Patches/0216-Allow-delegation-to-vanilla-chunk-gen.patch b/Spigot-API-Patches/0215-Allow-delegation-to-vanilla-chunk-gen.patch similarity index 100% rename from Spigot-API-Patches/0216-Allow-delegation-to-vanilla-chunk-gen.patch rename to Spigot-API-Patches/0215-Allow-delegation-to-vanilla-chunk-gen.patch diff --git a/Spigot-API-Patches/0217-Support-hex-colors-in-getLastColors.patch b/Spigot-API-Patches/0216-Support-hex-colors-in-getLastColors.patch similarity index 100% rename from Spigot-API-Patches/0217-Support-hex-colors-in-getLastColors.patch rename to Spigot-API-Patches/0216-Support-hex-colors-in-getLastColors.patch diff --git a/Spigot-API-Patches/0218-Add-setMaxPlayers-API.patch b/Spigot-API-Patches/0217-Add-setMaxPlayers-API.patch similarity index 100% rename from Spigot-API-Patches/0218-Add-setMaxPlayers-API.patch rename to Spigot-API-Patches/0217-Add-setMaxPlayers-API.patch diff --git a/Spigot-API-Patches/0219-Add-moon-phase-API.patch b/Spigot-API-Patches/0218-Add-moon-phase-API.patch similarity index 94% rename from Spigot-API-Patches/0219-Add-moon-phase-API.patch rename to Spigot-API-Patches/0218-Add-moon-phase-API.patch index 9148fb9a19..c9e9827954 100644 --- a/Spigot-API-Patches/0219-Add-moon-phase-API.patch +++ b/Spigot-API-Patches/0218-Add-moon-phase-API.patch @@ -47,7 +47,7 @@ index 0000000000000000000000000000000000000000..df05153397b42930cd53d37b30824c7e + } +} diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index b1b12cd1c53ca4666d0f2e77853f3a11441d24e5..301c8b34329e410df4f99c8617f768c48e4ea99d 100644 +index 6441d4e45e5d5f008f95233cdc34048b8be38592..e20d863d1308b470a294cb7ab022aac4b9a91f71 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, net.kyori.ad diff --git a/Spigot-API-Patches/0220-Add-playPickupItemAnimation-to-LivingEntity.patch b/Spigot-API-Patches/0219-Add-playPickupItemAnimation-to-LivingEntity.patch similarity index 100% rename from Spigot-API-Patches/0220-Add-playPickupItemAnimation-to-LivingEntity.patch rename to Spigot-API-Patches/0219-Add-playPickupItemAnimation-to-LivingEntity.patch diff --git a/Spigot-API-Patches/0221-Add-BellRingEvent.patch b/Spigot-API-Patches/0220-Add-BellRingEvent.patch similarity index 100% rename from Spigot-API-Patches/0221-Add-BellRingEvent.patch rename to Spigot-API-Patches/0220-Add-BellRingEvent.patch diff --git a/Spigot-API-Patches/0222-Brand-support.patch b/Spigot-API-Patches/0221-Brand-support.patch similarity index 100% rename from Spigot-API-Patches/0222-Brand-support.patch rename to Spigot-API-Patches/0221-Brand-support.patch diff --git a/Spigot-API-Patches/0223-Add-more-Evoker-API.patch b/Spigot-API-Patches/0222-Add-more-Evoker-API.patch similarity index 100% rename from Spigot-API-Patches/0223-Add-more-Evoker-API.patch rename to Spigot-API-Patches/0222-Add-more-Evoker-API.patch diff --git a/Spigot-API-Patches/0224-Add-a-way-to-get-translation-keys-for-blocks-entitie.patch b/Spigot-API-Patches/0223-Add-a-way-to-get-translation-keys-for-blocks-entitie.patch similarity index 100% rename from Spigot-API-Patches/0224-Add-a-way-to-get-translation-keys-for-blocks-entitie.patch rename to Spigot-API-Patches/0223-Add-a-way-to-get-translation-keys-for-blocks-entitie.patch diff --git a/Spigot-API-Patches/0225-Create-HoverEvent-from-ItemStack-Entity.patch b/Spigot-API-Patches/0224-Create-HoverEvent-from-ItemStack-Entity.patch similarity index 100% rename from Spigot-API-Patches/0225-Create-HoverEvent-from-ItemStack-Entity.patch rename to Spigot-API-Patches/0224-Create-HoverEvent-from-ItemStack-Entity.patch diff --git a/Spigot-API-Patches/0226-Add-additional-open-container-api-to-HumanEntity.patch b/Spigot-API-Patches/0225-Add-additional-open-container-api-to-HumanEntity.patch similarity index 100% rename from Spigot-API-Patches/0226-Add-additional-open-container-api-to-HumanEntity.patch rename to Spigot-API-Patches/0225-Add-additional-open-container-api-to-HumanEntity.patch diff --git a/Spigot-API-Patches/0227-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch b/Spigot-API-Patches/0226-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch similarity index 100% rename from Spigot-API-Patches/0227-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch rename to Spigot-API-Patches/0226-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch diff --git a/Spigot-API-Patches/0228-Entity-isTicking.patch b/Spigot-API-Patches/0227-Entity-isTicking.patch similarity index 100% rename from Spigot-API-Patches/0228-Entity-isTicking.patch rename to Spigot-API-Patches/0227-Entity-isTicking.patch diff --git a/Spigot-API-Patches/0229-Clarify-the-Javadocs-for-Entity.getEntitySpawnReason.patch b/Spigot-API-Patches/0228-Clarify-the-Javadocs-for-Entity.getEntitySpawnReason.patch similarity index 100% rename from Spigot-API-Patches/0229-Clarify-the-Javadocs-for-Entity.getEntitySpawnReason.patch rename to Spigot-API-Patches/0228-Clarify-the-Javadocs-for-Entity.getEntitySpawnReason.patch diff --git a/Spigot-API-Patches/0230-Villager-resetOffers.patch b/Spigot-API-Patches/0229-Villager-resetOffers.patch similarity index 100% rename from Spigot-API-Patches/0230-Villager-resetOffers.patch rename to Spigot-API-Patches/0229-Villager-resetOffers.patch diff --git a/Spigot-API-Patches/0231-Player-elytra-boost-API.patch b/Spigot-API-Patches/0230-Player-elytra-boost-API.patch similarity index 100% rename from Spigot-API-Patches/0231-Player-elytra-boost-API.patch rename to Spigot-API-Patches/0230-Player-elytra-boost-API.patch diff --git a/Spigot-API-Patches/0232-Add-getOfflinePlayerIfCached-String.patch b/Spigot-API-Patches/0231-Add-getOfflinePlayerIfCached-String.patch similarity index 100% rename from Spigot-API-Patches/0232-Add-getOfflinePlayerIfCached-String.patch rename to Spigot-API-Patches/0231-Add-getOfflinePlayerIfCached-String.patch diff --git a/Spigot-API-Patches/0233-Add-ignore-discounts-API.patch b/Spigot-API-Patches/0232-Add-ignore-discounts-API.patch similarity index 100% rename from Spigot-API-Patches/0233-Add-ignore-discounts-API.patch rename to Spigot-API-Patches/0232-Add-ignore-discounts-API.patch diff --git a/Spigot-API-Patches/0234-Item-no-age-no-player-pickup.patch b/Spigot-API-Patches/0233-Item-no-age-no-player-pickup.patch similarity index 100% rename from Spigot-API-Patches/0234-Item-no-age-no-player-pickup.patch rename to Spigot-API-Patches/0233-Item-no-age-no-player-pickup.patch diff --git a/Spigot-API-Patches/0235-Beacon-API-custom-effect-ranges.patch b/Spigot-API-Patches/0234-Beacon-API-custom-effect-ranges.patch similarity index 100% rename from Spigot-API-Patches/0235-Beacon-API-custom-effect-ranges.patch rename to Spigot-API-Patches/0234-Beacon-API-custom-effect-ranges.patch diff --git a/Spigot-API-Patches/0236-Add-API-for-quit-reason.patch b/Spigot-API-Patches/0235-Add-API-for-quit-reason.patch similarity index 100% rename from Spigot-API-Patches/0236-Add-API-for-quit-reason.patch rename to Spigot-API-Patches/0235-Add-API-for-quit-reason.patch diff --git a/Spigot-API-Patches/0237-Add-Destroy-Speed-API.patch b/Spigot-API-Patches/0236-Add-Destroy-Speed-API.patch similarity index 100% rename from Spigot-API-Patches/0237-Add-Destroy-Speed-API.patch rename to Spigot-API-Patches/0236-Add-Destroy-Speed-API.patch diff --git a/Spigot-API-Patches/0238-Add-LivingEntity-clearActiveItem.patch b/Spigot-API-Patches/0237-Add-LivingEntity-clearActiveItem.patch similarity index 100% rename from Spigot-API-Patches/0238-Add-LivingEntity-clearActiveItem.patch rename to Spigot-API-Patches/0237-Add-LivingEntity-clearActiveItem.patch diff --git a/Spigot-API-Patches/0239-Add-PlayerItemCooldownEvent.patch b/Spigot-API-Patches/0238-Add-PlayerItemCooldownEvent.patch similarity index 100% rename from Spigot-API-Patches/0239-Add-PlayerItemCooldownEvent.patch rename to Spigot-API-Patches/0238-Add-PlayerItemCooldownEvent.patch diff --git a/Spigot-API-Patches/0240-More-lightning-API.patch b/Spigot-API-Patches/0239-More-lightning-API.patch similarity index 100% rename from Spigot-API-Patches/0240-More-lightning-API.patch rename to Spigot-API-Patches/0239-More-lightning-API.patch diff --git a/Spigot-API-Patches/0241-Add-PlayerShearBlockEvent.patch b/Spigot-API-Patches/0240-Add-PlayerShearBlockEvent.patch similarity index 100% rename from Spigot-API-Patches/0241-Add-PlayerShearBlockEvent.patch rename to Spigot-API-Patches/0240-Add-PlayerShearBlockEvent.patch diff --git a/Spigot-API-Patches/0242-Enable-multi-release-plugin-jars.patch b/Spigot-API-Patches/0241-Enable-multi-release-plugin-jars.patch similarity index 100% rename from Spigot-API-Patches/0242-Enable-multi-release-plugin-jars.patch rename to Spigot-API-Patches/0241-Enable-multi-release-plugin-jars.patch diff --git a/Spigot-API-Patches/0243-Player-Chunk-Load-Unload-Events.patch b/Spigot-API-Patches/0242-Player-Chunk-Load-Unload-Events.patch similarity index 100% rename from Spigot-API-Patches/0243-Player-Chunk-Load-Unload-Events.patch rename to Spigot-API-Patches/0242-Player-Chunk-Load-Unload-Events.patch diff --git a/Spigot-API-Patches/0244-Expose-LivingEntity-hurt-direction.patch b/Spigot-API-Patches/0243-Expose-LivingEntity-hurt-direction.patch similarity index 100% rename from Spigot-API-Patches/0244-Expose-LivingEntity-hurt-direction.patch rename to Spigot-API-Patches/0243-Expose-LivingEntity-hurt-direction.patch diff --git a/Spigot-API-Patches/0245-added-PlayerTradeEvent.patch b/Spigot-API-Patches/0244-added-PlayerTradeEvent.patch similarity index 100% rename from Spigot-API-Patches/0245-added-PlayerTradeEvent.patch rename to Spigot-API-Patches/0244-added-PlayerTradeEvent.patch diff --git a/Spigot-API-Patches/0246-Add-OBSTRUCTED-reason-to-BedEnterResult.patch b/Spigot-API-Patches/0245-Add-OBSTRUCTED-reason-to-BedEnterResult.patch similarity index 100% rename from Spigot-API-Patches/0246-Add-OBSTRUCTED-reason-to-BedEnterResult.patch rename to Spigot-API-Patches/0245-Add-OBSTRUCTED-reason-to-BedEnterResult.patch diff --git a/Spigot-API-Patches/0247-Add-TargetHitEvent-API.patch b/Spigot-API-Patches/0246-Add-TargetHitEvent-API.patch similarity index 100% rename from Spigot-API-Patches/0247-Add-TargetHitEvent-API.patch rename to Spigot-API-Patches/0246-Add-TargetHitEvent-API.patch diff --git a/Spigot-API-Patches/0248-Additional-Block-Material-API-s.patch b/Spigot-API-Patches/0247-Additional-Block-Material-API-s.patch similarity index 100% rename from Spigot-API-Patches/0248-Additional-Block-Material-API-s.patch rename to Spigot-API-Patches/0247-Additional-Block-Material-API-s.patch diff --git a/Spigot-API-Patches/0249-Add-API-to-get-Material-from-Boats-and-Minecarts.patch b/Spigot-API-Patches/0248-Add-API-to-get-Material-from-Boats-and-Minecarts.patch similarity index 100% rename from Spigot-API-Patches/0249-Add-API-to-get-Material-from-Boats-and-Minecarts.patch rename to Spigot-API-Patches/0248-Add-API-to-get-Material-from-Boats-and-Minecarts.patch diff --git a/Spigot-API-Patches/0250-Add-PlayerFlowerPotManipulateEvent.patch b/Spigot-API-Patches/0249-Add-PlayerFlowerPotManipulateEvent.patch similarity index 100% rename from Spigot-API-Patches/0250-Add-PlayerFlowerPotManipulateEvent.patch rename to Spigot-API-Patches/0249-Add-PlayerFlowerPotManipulateEvent.patch diff --git a/Spigot-API-Patches/0251-Zombie-API-breaking-doors.patch b/Spigot-API-Patches/0250-Zombie-API-breaking-doors.patch similarity index 100% rename from Spigot-API-Patches/0251-Zombie-API-breaking-doors.patch rename to Spigot-API-Patches/0250-Zombie-API-breaking-doors.patch diff --git a/Spigot-API-Patches/0252-Add-EntityLoadCrossbowEvent.patch b/Spigot-API-Patches/0251-Add-EntityLoadCrossbowEvent.patch similarity index 100% rename from Spigot-API-Patches/0252-Add-EntityLoadCrossbowEvent.patch rename to Spigot-API-Patches/0251-Add-EntityLoadCrossbowEvent.patch diff --git a/Spigot-API-Patches/0253-Added-WorldGameRuleChangeEvent.patch b/Spigot-API-Patches/0252-Added-WorldGameRuleChangeEvent.patch similarity index 100% rename from Spigot-API-Patches/0253-Added-WorldGameRuleChangeEvent.patch rename to Spigot-API-Patches/0252-Added-WorldGameRuleChangeEvent.patch diff --git a/Spigot-API-Patches/0254-Added-ServerResourcesReloadedEvent.patch b/Spigot-API-Patches/0253-Added-ServerResourcesReloadedEvent.patch similarity index 100% rename from Spigot-API-Patches/0254-Added-ServerResourcesReloadedEvent.patch rename to Spigot-API-Patches/0253-Added-ServerResourcesReloadedEvent.patch diff --git a/Spigot-API-Patches/0255-Add-BlockFailedDispenseEvent.patch b/Spigot-API-Patches/0254-Add-BlockFailedDispenseEvent.patch similarity index 100% rename from Spigot-API-Patches/0255-Add-BlockFailedDispenseEvent.patch rename to Spigot-API-Patches/0254-Add-BlockFailedDispenseEvent.patch diff --git a/Spigot-API-Patches/0256-Added-PlayerLecternPageChangeEvent.patch b/Spigot-API-Patches/0255-Added-PlayerLecternPageChangeEvent.patch similarity index 100% rename from Spigot-API-Patches/0256-Added-PlayerLecternPageChangeEvent.patch rename to Spigot-API-Patches/0255-Added-PlayerLecternPageChangeEvent.patch diff --git a/Spigot-API-Patches/0257-Added-PlayerLoomPatternSelectEvent.patch b/Spigot-API-Patches/0256-Added-PlayerLoomPatternSelectEvent.patch similarity index 100% rename from Spigot-API-Patches/0257-Added-PlayerLoomPatternSelectEvent.patch rename to Spigot-API-Patches/0256-Added-PlayerLoomPatternSelectEvent.patch diff --git a/Spigot-API-Patches/0258-Better-AnnotationTest-printout.patch b/Spigot-API-Patches/0257-Better-AnnotationTest-printout.patch similarity index 96% rename from Spigot-API-Patches/0258-Better-AnnotationTest-printout.patch rename to Spigot-API-Patches/0257-Better-AnnotationTest-printout.patch index 1c2414d763..d1c2bf74f7 100644 --- a/Spigot-API-Patches/0258-Better-AnnotationTest-printout.patch +++ b/Spigot-API-Patches/0257-Better-AnnotationTest-printout.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Better AnnotationTest printout diff --git a/pom.xml b/pom.xml -index 1b9b4349e303a17e96ce0a09e8776b6635092e57..0d922ea17c675d6e3a7106937918d2a818814fba 100644 +index 650dbfd69281ada120c9cd9b04934f493c65977c..af17cd24b44c601f300e3ad5d6c57d810768b5e8 100644 --- a/pom.xml +++ b/pom.xml @@ -255,6 +255,19 @@ diff --git a/Spigot-API-Patches/0259-Add-API-to-get-exact-interaction-point-in-PlayerInte.patch b/Spigot-API-Patches/0258-Add-API-to-get-exact-interaction-point-in-PlayerInte.patch similarity index 100% rename from Spigot-API-Patches/0259-Add-API-to-get-exact-interaction-point-in-PlayerInte.patch rename to Spigot-API-Patches/0258-Add-API-to-get-exact-interaction-point-in-PlayerInte.patch diff --git a/Spigot-API-Patches/0260-Add-sendOpLevel-API.patch b/Spigot-API-Patches/0259-Add-sendOpLevel-API.patch similarity index 100% rename from Spigot-API-Patches/0260-Add-sendOpLevel-API.patch rename to Spigot-API-Patches/0259-Add-sendOpLevel-API.patch diff --git a/Spigot-API-Patches/0261-Add-StructureLocateEvent.patch b/Spigot-API-Patches/0260-Add-StructureLocateEvent.patch similarity index 100% rename from Spigot-API-Patches/0261-Add-StructureLocateEvent.patch rename to Spigot-API-Patches/0260-Add-StructureLocateEvent.patch diff --git a/Spigot-API-Patches/0262-Make-ProjectileHitEvent-Cancellable.patch b/Spigot-API-Patches/0261-Make-ProjectileHitEvent-Cancellable.patch similarity index 100% rename from Spigot-API-Patches/0262-Make-ProjectileHitEvent-Cancellable.patch rename to Spigot-API-Patches/0261-Make-ProjectileHitEvent-Cancellable.patch diff --git a/Spigot-API-Patches/0263-Return-chat-component-with-empty-text-instead-of-thr.patch b/Spigot-API-Patches/0262-Return-chat-component-with-empty-text-instead-of-thr.patch similarity index 100% rename from Spigot-API-Patches/0263-Return-chat-component-with-empty-text-instead-of-thr.patch rename to Spigot-API-Patches/0262-Return-chat-component-with-empty-text-instead-of-thr.patch diff --git a/Spigot-API-Patches/0264-Add-BlockPreDispenseEvent.patch b/Spigot-API-Patches/0263-Add-BlockPreDispenseEvent.patch similarity index 100% rename from Spigot-API-Patches/0264-Add-BlockPreDispenseEvent.patch rename to Spigot-API-Patches/0263-Add-BlockPreDispenseEvent.patch diff --git a/Spigot-API-Patches/0265-Added-Vanilla-Entity-Tags.patch b/Spigot-API-Patches/0264-Added-Vanilla-Entity-Tags.patch similarity index 100% rename from Spigot-API-Patches/0265-Added-Vanilla-Entity-Tags.patch rename to Spigot-API-Patches/0264-Added-Vanilla-Entity-Tags.patch diff --git a/Spigot-API-Patches/0266-added-Wither-API.patch b/Spigot-API-Patches/0265-added-Wither-API.patch similarity index 100% rename from Spigot-API-Patches/0266-added-Wither-API.patch rename to Spigot-API-Patches/0265-added-Wither-API.patch diff --git a/Spigot-API-Patches/0267-Added-PlayerChangeBeaconEffectEvent.patch b/Spigot-API-Patches/0266-Added-PlayerChangeBeaconEffectEvent.patch similarity index 100% rename from Spigot-API-Patches/0267-Added-PlayerChangeBeaconEffectEvent.patch rename to Spigot-API-Patches/0266-Added-PlayerChangeBeaconEffectEvent.patch diff --git a/Spigot-API-Patches/0268-Add-dropLeash-variable-to-EntityUnleashEvent.patch b/Spigot-API-Patches/0267-Add-dropLeash-variable-to-EntityUnleashEvent.patch similarity index 100% rename from Spigot-API-Patches/0268-Add-dropLeash-variable-to-EntityUnleashEvent.patch rename to Spigot-API-Patches/0267-Add-dropLeash-variable-to-EntityUnleashEvent.patch diff --git a/Spigot-API-Patches/0269-Added-PlayerStonecutterRecipeSelectEvent.patch b/Spigot-API-Patches/0268-Added-PlayerStonecutterRecipeSelectEvent.patch similarity index 100% rename from Spigot-API-Patches/0269-Added-PlayerStonecutterRecipeSelectEvent.patch rename to Spigot-API-Patches/0268-Added-PlayerStonecutterRecipeSelectEvent.patch diff --git a/Spigot-API-Patches/0270-EntityMoveEvent.patch b/Spigot-API-Patches/0269-EntityMoveEvent.patch similarity index 100% rename from Spigot-API-Patches/0270-EntityMoveEvent.patch rename to Spigot-API-Patches/0269-EntityMoveEvent.patch diff --git a/Spigot-API-Patches/0271-add-DragonEggFormEvent.patch b/Spigot-API-Patches/0270-add-DragonEggFormEvent.patch similarity index 100% rename from Spigot-API-Patches/0271-add-DragonEggFormEvent.patch rename to Spigot-API-Patches/0270-add-DragonEggFormEvent.patch diff --git a/Spigot-API-Patches/0272-Allow-adding-items-to-BlockDropItemEvent.patch b/Spigot-API-Patches/0271-Allow-adding-items-to-BlockDropItemEvent.patch similarity index 100% rename from Spigot-API-Patches/0272-Allow-adding-items-to-BlockDropItemEvent.patch rename to Spigot-API-Patches/0271-Allow-adding-items-to-BlockDropItemEvent.patch diff --git a/Spigot-API-Patches/0273-Add-getMainThreadExecutor-to-BukkitScheduler.patch b/Spigot-API-Patches/0272-Add-getMainThreadExecutor-to-BukkitScheduler.patch similarity index 100% rename from Spigot-API-Patches/0273-Add-getMainThreadExecutor-to-BukkitScheduler.patch rename to Spigot-API-Patches/0272-Add-getMainThreadExecutor-to-BukkitScheduler.patch diff --git a/Spigot-API-Patches/0274-living-entity-allow-attribute-registration.patch b/Spigot-API-Patches/0273-living-entity-allow-attribute-registration.patch similarity index 100% rename from Spigot-API-Patches/0274-living-entity-allow-attribute-registration.patch rename to Spigot-API-Patches/0273-living-entity-allow-attribute-registration.patch diff --git a/Spigot-API-Patches/0275-Add-missing-effects.patch b/Spigot-API-Patches/0274-Add-missing-effects.patch similarity index 100% rename from Spigot-API-Patches/0275-Add-missing-effects.patch rename to Spigot-API-Patches/0274-Add-missing-effects.patch diff --git a/Spigot-API-Patches/0276-Expose-Tracked-Players.patch b/Spigot-API-Patches/0275-Expose-Tracked-Players.patch similarity index 100% rename from Spigot-API-Patches/0276-Expose-Tracked-Players.patch rename to Spigot-API-Patches/0275-Expose-Tracked-Players.patch diff --git a/Spigot-Server-Patches/0010-Adventure.patch b/Spigot-Server-Patches/0010-Adventure.patch index 1dbcacc210..667e3d12f6 100644 --- a/Spigot-Server-Patches/0010-Adventure.patch +++ b/Spigot-Server-Patches/0010-Adventure.patch @@ -104,6 +104,221 @@ index 0000000000000000000000000000000000000000..a2acd31dce4461338a8baa96e03df36a + } + } +} +diff --git a/src/main/java/io/papermc/paper/adventure/ChatProcessor.java b/src/main/java/io/papermc/paper/adventure/ChatProcessor.java +new file mode 100644 +index 0000000000000000000000000000000000000000..d7945e7340f406fbf21a1bd67f9c167a309d0fb7 +--- /dev/null ++++ b/src/main/java/io/papermc/paper/adventure/ChatProcessor.java +@@ -0,0 +1,209 @@ ++package io.papermc.paper.adventure; ++ ++import io.papermc.paper.chat.ChatFormatter; ++import io.papermc.paper.event.player.AbstractChatEvent; ++import io.papermc.paper.event.player.AsyncChatEvent; ++import io.papermc.paper.event.player.ChatEvent; ++import java.util.concurrent.ExecutionException; ++import java.util.function.Consumer; ++import java.util.regex.Pattern; ++import net.kyori.adventure.text.Component; ++import net.kyori.adventure.text.TextReplacementConfig; ++import net.kyori.adventure.text.event.ClickEvent; ++import net.minecraft.server.EntityPlayer; ++import net.minecraft.server.IChatBaseComponent; ++import net.minecraft.server.MinecraftServer; ++import org.bukkit.Bukkit; ++import org.bukkit.craftbukkit.entity.CraftPlayer; ++import org.bukkit.craftbukkit.util.LazyPlayerSet; ++import org.bukkit.craftbukkit.util.Waitable; ++import org.bukkit.entity.Player; ++import org.bukkit.event.Event; ++import org.bukkit.event.HandlerList; ++import org.bukkit.event.player.AsyncPlayerChatEvent; ++import org.bukkit.event.player.PlayerChatEvent; ++ ++public final class ChatProcessor { ++ // <-- copied from adventure-text-serializer-legacy ++ private static final Pattern DEFAULT_URL_PATTERN = Pattern.compile("(?:(https?)://)?([-\\w_.]+\\.\\w{2,})(/\\S*)?"); ++ private static final Pattern URL_SCHEME_PATTERN = Pattern.compile("^[a-z][a-z0-9+\\-.]*:"); ++ private static final TextReplacementConfig URL_REPLACEMENT_CONFIG = TextReplacementConfig.builder() ++ .match(DEFAULT_URL_PATTERN) ++ .replacement(url -> { ++ String clickUrl = url.content(); ++ if (!URL_SCHEME_PATTERN.matcher(clickUrl).find()) { ++ clickUrl = "http://" + clickUrl; ++ } ++ return url.clickEvent(ClickEvent.openUrl(clickUrl)); ++ }) ++ .build(); ++ // copied from adventure-text-serializer-legacy --> ++ final MinecraftServer server; ++ final EntityPlayer player; ++ final String message; ++ final boolean async; ++ ++ public ChatProcessor(final MinecraftServer server, final EntityPlayer player, final String message, final boolean async) { ++ this.server = server; ++ this.player = player; ++ this.message = message; ++ this.async = async; ++ } ++ ++ @SuppressWarnings("deprecation") ++ public void process() { ++ final boolean listenersOnSyncEvent = anyListeners(ChatEvent.getHandlerList()); ++ ++ this.processLegacy( ++ // continuing from AsyncPlayerChatEvent (without PlayerChatEvent) ++ event -> { ++ final AsyncChatEvent ae = this.createAsync( ++ legacyFormatter(event.getFormat(), event.getPlayer().getDisplayName(), event.getMessage()), ++ PaperAdventure.LEGACY_SECTION_UXRC.deserialize(event.getMessage()) ++ ); ++ ae.setCancelled(event.isCancelled()); // propagate cancelled state ++ post(ae); ++ if (listenersOnSyncEvent) { ++ this.continueWithSyncFromWhereAsyncLeftOff(ae); ++ } else { ++ this.complete(ae); ++ } ++ }, ++ // continuing from AsyncPlayerChatEvent and PlayerChatEvent ++ event -> { ++ this.queueIfAsyncOrRunImmediately(new Waitable() { ++ @Override ++ protected Void evaluate() { ++ final ChatEvent se = ChatProcessor.this.createSync( ++ legacyFormatter(event.getFormat(), event.getPlayer().getDisplayName(), event.getMessage()), ++ PaperAdventure.LEGACY_SECTION_UXRC.deserialize(event.getMessage()) ++ ); ++ se.setCancelled(event.isCancelled()); // propagate cancelled state ++ post(se); ++ ChatProcessor.this.complete(se); ++ return null; ++ } ++ }); ++ }, ++ // no legacy events called, all nice and fresh! ++ () -> { ++ final AsyncChatEvent ae = this.createAsync(ChatFormatter.DEFAULT, Component.text(this.message).replaceText(URL_REPLACEMENT_CONFIG)); ++ post(ae); ++ if (listenersOnSyncEvent) { ++ this.continueWithSyncFromWhereAsyncLeftOff(ae); ++ } else { ++ this.complete(ae); ++ } ++ } ++ ); ++ } ++ ++ private static Component displayName(final CraftPlayer player) { ++ return player.displayName(); ++ } ++ ++ private static ChatFormatter legacyFormatter(final String format, final String legacyDisplayName, final String legacyMessage) { ++ return (displayName, message) -> PaperAdventure.LEGACY_SECTION_UXRC.deserialize(String.format(format, legacyDisplayName, legacyMessage)).replaceText(URL_REPLACEMENT_CONFIG); ++ } ++ ++ private void continueWithSyncFromWhereAsyncLeftOff(final AsyncChatEvent ae) { ++ this.queueIfAsyncOrRunImmediately(new Waitable() { ++ @Override ++ protected Void evaluate() { ++ final ChatEvent se = ChatProcessor.this.createSync(ae.formatter(), ae.message()); ++ se.setCancelled(ae.isCancelled()); // propagate cancelled state ++ post(se); ++ ChatProcessor.this.complete(se); ++ return null; ++ } ++ }); ++ } ++ ++ private void complete(final AbstractChatEvent event) { ++ if (event.isCancelled()) { ++ return; ++ } ++ ++ final CraftPlayer player = this.player.getBukkitEntity(); ++ ++ final Component message = event.formatter().chat( ++ displayName(player), ++ event.message() ++ ); ++ ++ this.server.console.sendMessage(message); ++ ++ if (((LazyPlayerSet) event.recipients()).isLazy()) { ++ final IChatBaseComponent vanilla = PaperAdventure.asVanilla(message); ++ for(final EntityPlayer recipient : this.server.getPlayerList().players) { ++ recipient.sendMessage(vanilla, this.player.getUniqueID()); ++ } ++ } else { ++ for(final Player recipient : event.recipients()) { ++ recipient.sendMessage(player, message); ++ } ++ } ++ } ++ ++ private AsyncChatEvent createAsync(final ChatFormatter formatter, final Component message) { ++ return new AsyncChatEvent(this.async, this.player.getBukkitEntity(), new LazyPlayerSet(this.server), formatter, message); ++ } ++ ++ private ChatEvent createSync(final ChatFormatter formatter, final Component message) { ++ return new ChatEvent(this.player.getBukkitEntity(), new LazyPlayerSet(this.server), formatter, message); ++ } ++ ++ @SuppressWarnings("deprecation") ++ public void processLegacy( ++ final Consumer continueAfterAsync, ++ final Consumer continueAfterAsyncAndSync, ++ final Runnable modernOnly ++ ) { ++ final boolean listenersOnAsyncEvent = anyListeners(AsyncPlayerChatEvent.getHandlerList()); ++ final boolean listenersOnSyncEvent = anyListeners(PlayerChatEvent.getHandlerList()); ++ if (listenersOnAsyncEvent || listenersOnSyncEvent) { ++ final CraftPlayer player = this.player.getBukkitEntity(); ++ final AsyncPlayerChatEvent ae = new AsyncPlayerChatEvent(this.async, player, this.message, new LazyPlayerSet(this.server)); ++ post(ae); ++ if (listenersOnSyncEvent) { ++ final PlayerChatEvent se = new PlayerChatEvent(player, ae.getMessage(), ae.getFormat(), ae.getRecipients()); ++ se.setCancelled(ae.isCancelled()); // propagate cancelled state ++ this.queueIfAsyncOrRunImmediately(new Waitable() { ++ @Override ++ protected Void evaluate() { ++ post(se); ++ return null; ++ } ++ }); ++ continueAfterAsyncAndSync.accept(se); ++ } else if (!ae.isCancelled()) { ++ continueAfterAsync.accept(ae); ++ } ++ } else { ++ modernOnly.run(); ++ } ++ } ++ ++ private void queueIfAsyncOrRunImmediately(final Waitable waitable) { ++ if (this.async) { ++ this.server.processQueue.add(waitable); ++ } else { ++ waitable.run(); ++ } ++ try { ++ waitable.get(); ++ } catch (final InterruptedException e) { ++ Thread.currentThread().interrupt(); // tag, you're it ++ } catch (final ExecutionException e) { ++ throw new RuntimeException("Exception processing chat", e.getCause()); ++ } ++ } ++ ++ private static void post(final Event event) { ++ Bukkit.getPluginManager().callEvent(event); ++ } ++ ++ private static boolean anyListeners(final HandlerList handlers) { ++ return handlers.getRegisteredListeners().length > 0; ++ } ++} 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 @@ -537,73 +752,6 @@ index 0000000000000000000000000000000000000000..59dd2a453dbfc538431a3414ab35d183 + 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..5f1f839da11058cffae8b29ad2820dc4cc1b1e10 ---- /dev/null -+++ b/src/main/java/io/papermc/paper/adventure/VanillaChatMessageLogic.java -@@ -0,0 +1,61 @@ -+package io.papermc.paper.adventure; -+ -+import java.util.function.BiFunction; -+import java.util.regex.MatchResult; -+import java.util.regex.Pattern; -+import net.kyori.adventure.text.Component; -+import net.kyori.adventure.text.ComponentLike; -+import net.kyori.adventure.text.TextComponent; -+import net.kyori.adventure.text.TextReplacementConfig; -+import net.kyori.adventure.text.event.ClickEvent; -+import org.bukkit.craftbukkit.entity.CraftPlayer; -+ -+public class VanillaChatMessageLogic { -+ // <-- copied from adventure-text-serializer-legacy -+ private static final Pattern DEFAULT_URL_PATTERN = Pattern.compile("(?:(https?)://)?([-\\w_.]+\\.\\w{2,})(/\\S*)?"); -+ private static final Pattern URL_SCHEME_PATTERN = Pattern.compile("^[a-z][a-z0-9+\\-.]*:"); -+ private static final TextReplacementConfig URL_REPLACEMENT_CONFIG = TextReplacementConfig.builder() -+ .match(DEFAULT_URL_PATTERN) -+ .replacement(url -> { -+ String clickUrl = url.content(); -+ if (!URL_SCHEME_PATTERN.matcher(clickUrl).find()) { -+ clickUrl = "http://" + clickUrl; -+ } -+ return url.clickEvent(ClickEvent.openUrl(clickUrl)); -+ }) -+ .build(); -+ // copied from adventure-text-serializer-legacy --> -+ -+ 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 PaperAdventure.LEGACY_SECTION_UXRC.deserialize(message).mergeStyle(builder.asComponent()).replaceText(URL_REPLACEMENT_CONFIG); -+ } else { -+ return builder; -+ } -+ } -+ } -+ final Replacement replacement = new Replacement(); -+ if (format.contains("%2$s") && !format.contains("%1$s")) { -+ replacement.index = 1; -+ } -+ return PaperAdventure.LEGACY_SECTION_UXRC.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 @@ -1129,15 +1277,15 @@ index 055555cb5ce63d41cb9a7f4114341b0685879b9e..7875d4c08969b3adc6f95504686cc9fe @Override diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index d34e91887cd73009bf852fb849e495a8affed7a9..5fa4afb75d46a32d91402c5ca850d17d11990b8d 100644 +index d34e91887cd73009bf852fb849e495a8affed7a9..5636a76f1a893dc0609f16a240ae559396a4b46d 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.ChatProcessor; // Paper +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; @@ -1199,57 +1347,23 @@ index d34e91887cd73009bf852fb849e495a8affed7a9..5fa4afb75d46a32d91402c5ca850d17d } // CraftBukkit end ITextFilter itextfilter = this.player.Q(); -@@ -1721,15 +1727,20 @@ public class PlayerConnection implements PacketListenerPlayIn { - return null; - } +@@ -1703,8 +1709,13 @@ public class PlayerConnection implements PacketListenerPlayIn { + this.handleCommand(s); + } else if (this.player.getChatFlags() == EnumChatVisibility.SYSTEM) { + // Do nothing, this is coming from a plugin +- } else { +- Player player = this.getPlayer(); ++ // Paper start ++ } else if (true) { ++ final ChatProcessor cp = new ChatProcessor(this.minecraftServer, this.player, s, async); ++ cp.process(); ++ // Paper end ++ } else if (false) { // Paper ++ Player player = this.getPlayer(); // Paper + AsyncPlayerChatEvent event = new AsyncPlayerChatEvent(async, player, s, new LazyPlayerSet(minecraftServer)); + this.server.getPluginManager().callEvent(event); -- 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 +1762,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 +2527,20 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -2511,21 +2522,20 @@ public class PlayerConnection implements PacketListenerPlayIn { return; } @@ -1762,7 +1876,7 @@ index 81f6bf5533288ed90e2f1f4d421d54195d9650c7..d742f72215f6a9a2b562182fd57fd9ac 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..8495632d99137b89e4dd4543c2ea721dacfc9ee2 100644 +index 089fe4a3458ed3106fa214f89a7004a5d3c6bb95..af986adfdb547cb61fbd52f0f89858f1a9e52cc3 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 @@ -1773,7 +1887,7 @@ index 089fe4a3458ed3106fa214f89a7004a5d3c6bb95..8495632d99137b89e4dd4543c2ea721d + // 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(io.papermc.paper.adventure.PaperAdventure.LEGACY_SECTION_UXRC.serialize(message)); ++ this.sendRawMessage(org.bukkit.craftbukkit.util.CraftChatMessage.fromComponent(io.papermc.paper.adventure.PaperAdventure.asVanilla(message))); + } + // Paper end } diff --git a/Spigot-Server-Patches/0045-Ensure-commands-are-not-ran-async.patch b/Spigot-Server-Patches/0045-Ensure-commands-are-not-ran-async.patch index 2a1bd393da..fde755bb95 100644 --- a/Spigot-Server-Patches/0045-Ensure-commands-are-not-ran-async.patch +++ b/Spigot-Server-Patches/0045-Ensure-commands-are-not-ran-async.patch @@ -14,7 +14,7 @@ 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 5fa4afb75d46a32d91402c5ca850d17d11990b8d..0dec3e50fcaf4505dcd7800c8ec985ae302c1da2 100644 +index 5636a76f1a893dc0609f16a240ae559396a4b46d..bb74049fb2baffbe67f9e34cc0ee0b83180d02eb 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -1706,6 +1706,29 @@ public class PlayerConnection implements PacketListenerPlayIn { @@ -48,7 +48,7 @@ index 5fa4afb75d46a32d91402c5ca850d17d11990b8d..0dec3e50fcaf4505dcd7800c8ec985ae } 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 390714fa5822a61f64f6b3b8731397e9dae77cfd..e78182508ccd05bcb934a29eb495ff9c884d3a55 100644 +index 4fdc38de35ce2f3ec20c6892bc9eb39ec0366498..66cbc94b8d5cb9e435e0fb32596f8f3cef0a49a5 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -762,6 +762,29 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/0059-Complete-resource-pack-API.patch b/Spigot-Server-Patches/0059-Complete-resource-pack-API.patch index 3b9453c787..2b0ef491de 100644 --- a/Spigot-Server-Patches/0059-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 0dec3e50fcaf4505dcd7800c8ec985ae302c1da2..c1d0aa8248af19124b1c94313602cd4dadcc95df 100644 +index bb74049fb2baffbe67f9e34cc0ee0b83180d02eb..9a9847c217a6f7a2e2bc09b68b3d2821fcecbbc3 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -1457,7 +1457,11 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0078-Add-PlayerUseUnknownEntityEvent.patch b/Spigot-Server-Patches/0078-Add-PlayerUseUnknownEntityEvent.patch index 6f04da4428..0109071b81 100644 --- a/Spigot-Server-Patches/0078-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 c1d0aa8248af19124b1c94313602cd4dadcc95df..3aa6cae8b7f27264ee5f910d13df876b568968e4 100644 +index 2436ee100bdf7cb2166595f41af61af806ecdd46..f021568601198ddcf4c1c312eb5d3eef4b9eb5e5 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -2057,6 +2057,16 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -2052,6 +2052,16 @@ public class PlayerConnection implements PacketListenerPlayIn { } } } 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 index 95aff69a5f..4aa1a9cba0 100644 --- 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 @@ -25,48 +25,27 @@ index db2dddd12f54e6d15916c4cee623676541de37fb..1942f5224aaebb18adb591d6f70a419c + 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 5f1f839da11058cffae8b29ad2820dc4cc1b1e10..b62d573db85dcc59f9a2704c9142bde6bd5105c9 100644 ---- a/src/main/java/io/papermc/paper/adventure/VanillaChatMessageLogic.java -+++ b/src/main/java/io/papermc/paper/adventure/VanillaChatMessageLogic.java -@@ -8,6 +8,8 @@ import net.kyori.adventure.text.ComponentLike; - import net.kyori.adventure.text.TextComponent; - import net.kyori.adventure.text.TextReplacementConfig; - import net.kyori.adventure.text.event.ClickEvent; +diff --git a/src/main/java/io/papermc/paper/adventure/ChatProcessor.java b/src/main/java/io/papermc/paper/adventure/ChatProcessor.java +index d7945e7340f406fbf21a1bd67f9c167a309d0fb7..63085b09eb4d7dc5ebbad9f3d8d6309990473b45 100644 +--- a/src/main/java/io/papermc/paper/adventure/ChatProcessor.java ++++ b/src/main/java/io/papermc/paper/adventure/ChatProcessor.java +@@ -13,7 +13,9 @@ import net.kyori.adventure.text.event.ClickEvent; + import net.minecraft.server.EntityPlayer; + import net.minecraft.server.IChatBaseComponent; + import net.minecraft.server.MinecraftServer; +import net.minecraft.server.ScoreboardTeam; + import org.bukkit.Bukkit; +import org.bukkit.craftbukkit.CraftWorld; import org.bukkit.craftbukkit.entity.CraftPlayer; + import org.bukkit.craftbukkit.util.LazyPlayerSet; + import org.bukkit.craftbukkit.util.Waitable; +@@ -99,6 +101,9 @@ public final class ChatProcessor { + } - public class VanillaChatMessageLogic { -@@ -27,6 +29,9 @@ public class VanillaChatMessageLogic { - // copied from adventure-text-serializer-legacy --> - - public static Component displayNameForChat(final CraftPlayer player) { + private static Component displayName(final CraftPlayer player) { + if (((CraftWorld) player.getWorld()).getHandle().paperConfig.useVanillaScoreboardColoring) { + return PaperAdventure.asAdventure(ScoreboardTeam.a(player.getHandle().getScoreboardTeam(), player.getHandle().getDisplayName())); + } return player.displayName(); } -diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 3aa6cae8b7f27264ee5f910d13df876b568968e4..5d6214b00633b64a769384e6e01eba58cc7d0e6a 100644 ---- a/src/main/java/net/minecraft/server/PlayerConnection.java -+++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -1737,7 +1737,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); - -@@ -1754,7 +1754,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/0110-Configurable-packet-in-spam-threshold.patch b/Spigot-Server-Patches/0110-Configurable-packet-in-spam-threshold.patch index b58e07c7cb..7b1910a4c2 100644 --- a/Spigot-Server-Patches/0110-Configurable-packet-in-spam-threshold.patch +++ b/Spigot-Server-Patches/0110-Configurable-packet-in-spam-threshold.patch @@ -23,7 +23,7 @@ index c52dc0346f93527965ef29a0ccdc4bf3debe302e..64d7c9058ee757a6d3cf3b648596092a + } } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 5d6214b00633b64a769384e6e01eba58cc7d0e6a..29aa35877549abaef40a88c23f4fc44622e31842 100644 +index 283ff4a255f310ab0a8900531c397a1ad4b99018..9af1176497735f465fb06ff326d1c32125f7407f 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -1317,13 +1317,14 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0111-Configurable-flying-kick-messages.patch b/Spigot-Server-Patches/0111-Configurable-flying-kick-messages.patch index 5dc321104e..94cc8bb81e 100644 --- a/Spigot-Server-Patches/0111-Configurable-flying-kick-messages.patch +++ b/Spigot-Server-Patches/0111-Configurable-flying-kick-messages.patch @@ -21,7 +21,7 @@ index 64d7c9058ee757a6d3cf3b648596092a810e105c..4e2f243faa209925dcb7c3ef89df3ed8 + } } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 29aa35877549abaef40a88c23f4fc44622e31842..52d28a0ce408a58f0068920d2286409e5124b7f6 100644 +index 9af1176497735f465fb06ff326d1c32125f7407f..697edff8d2a1435c8831dadfd5c2fa60753d6d18 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -160,7 +160,7 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0130-Properly-fix-item-duplication-bug.patch b/Spigot-Server-Patches/0130-Properly-fix-item-duplication-bug.patch index d67d41ab95..17e867dc4e 100644 --- a/Spigot-Server-Patches/0130-Properly-fix-item-duplication-bug.patch +++ b/Spigot-Server-Patches/0130-Properly-fix-item-duplication-bug.patch @@ -6,7 +6,7 @@ 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 f8c9515f3ee922b6b96d97676ca740bba617721a..fd7513008dde790107647f7f5b9670030696e064 100644 +index a812bb96596ddebe6118b2fd79a75e5e87d622f2..7a9e237d23051b43fe0ac3720cd6a36faabc9dd2 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -1933,7 +1933,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -19,10 +19,10 @@ index f8c9515f3ee922b6b96d97676ca740bba617721a..fd7513008dde790107647f7f5b967003 @Override diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 52d28a0ce408a58f0068920d2286409e5124b7f6..e48d896974b6839e496deda320e5c470188b2754 100644 +index 5b51b2b0b47a39ed1fcbb89cb240032de0b32aa8..9d4f0a309a2328aff7b036dafa0a21921e36bacd 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -2666,7 +2666,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -2661,7 +2661,7 @@ public class PlayerConnection implements PacketListenerPlayIn { } public final boolean isDisconnected() { diff --git a/Spigot-Server-Patches/0144-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 index f103b79ccd..a95a251f91 100644 --- a/Spigot-Server-Patches/0144-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 e48d896974b6839e496deda320e5c470188b2754..833095238b2e08058573b777fc226278f187c103 100644 +index 9d4f0a309a2328aff7b036dafa0a21921e36bacd..90a202f040865d9e5fcbbbca25f86a36fa49984d 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -1910,6 +1910,13 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -1905,6 +1905,13 @@ public class PlayerConnection implements PacketListenerPlayIn { switch (packetplayinentityaction.c()) { case PRESS_SHIFT_KEY: this.player.setSneaking(true); diff --git a/Spigot-Server-Patches/0170-Add-PlayerJumpEvent.patch b/Spigot-Server-Patches/0170-Add-PlayerJumpEvent.patch index e797e0e5cd..aa775740fa 100644 --- a/Spigot-Server-Patches/0170-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 833095238b2e08058573b777fc226278f187c103..8d04e3ab27229fcd0756ec4ed82064d65cf58f07 100644 +index b6f68a8d1eb523fa0e33fae717249bbba2c0715b..14f6df878beecdccd3036f60535fc36c0a3e5776 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -1021,7 +1021,34 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0171-handle-PacketPlayInKeepAlive-async.patch b/Spigot-Server-Patches/0171-handle-PacketPlayInKeepAlive-async.patch index afe5f88cab..8dc9c40a29 100644 --- a/Spigot-Server-Patches/0171-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 8d04e3ab27229fcd0756ec4ed82064d65cf58f07..4c20d092c029383737f2e78acdb38c977f35252b 100644 +index 3ee747ab2c43e6af78366f5cd8e35c0e09424d55..acbb1e013341fcf94109766bbbea542f072b4d9f 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -2625,14 +2625,18 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -2620,14 +2620,18 @@ public class PlayerConnection implements PacketListenerPlayIn { @Override public void a(PacketPlayInKeepAlive packetplayinkeepalive) { diff --git a/Spigot-Server-Patches/0173-revert-serverside-behavior-of-keepalives.patch b/Spigot-Server-Patches/0173-revert-serverside-behavior-of-keepalives.patch index c4dc69c76e..6bd819d7ee 100644 --- a/Spigot-Server-Patches/0173-revert-serverside-behavior-of-keepalives.patch +++ b/Spigot-Server-Patches/0173-revert-serverside-behavior-of-keepalives.patch @@ -17,7 +17,7 @@ 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 f61471e726928c18b9e181c98d69717384b130f4..bbf89a81489bc6ec5741448b246ce9926b87b4e1 100644 +index 5ca6891f312092940607d82575b2e08d226efa4d..1b1de63c405a1e9a62787be11ac1ee3029ffc828 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -76,7 +76,7 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0180-AsyncTabCompleteEvent.patch b/Spigot-Server-Patches/0180-AsyncTabCompleteEvent.patch index 49950c9e36..bc5b3b4bfd 100644 --- a/Spigot-Server-Patches/0180-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 afedfbbeaaefc3f301b1f2f15a72298d244455ad..ab6d99493b6284b5ae1d7255446ea27f1db5a834 100644 +index 1b1de63c405a1e9a62787be11ac1ee3029ffc828..297593d412706e3ea583ac9bbd5c9e15b711d312 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -566,10 +566,10 @@ public class PlayerConnection implements PacketListenerPlayIn { @@ -72,7 +72,7 @@ index afedfbbeaaefc3f301b1f2f15a72298d244455ad..ab6d99493b6284b5ae1d7255446ea27f @Override diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 2b6c9dbbbf97386cd9d9b37254640b8585092140..cef40ca8f3c7da1ac16dc11c3643899f2fe45098 100644 +index 01cd09eae054de89dfa910980974e12d6350eae5..7d470b42e6aca9539b102c189c7a2fd848995d55 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -1844,7 +1844,7 @@ public final class CraftServer implements Server { diff --git a/Spigot-Server-Patches/0209-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 index a303c3c78f..898f6cf55a 100644 --- a/Spigot-Server-Patches/0209-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,10 +5,10 @@ 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 ab6d99493b6284b5ae1d7255446ea27f1db5a834..cb9257d66a28ddd30c5e54808c044cd1e10b8a4a 100644 +index 2cb29fe217dc489e533d29295099a3e21e18911d..76c3e9a0a10fdeda93af3bc0a3564e5fd9d83b1e 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -2634,7 +2634,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -2629,7 +2629,7 @@ public class PlayerConnection implements PacketListenerPlayIn { List lines = new java.util.ArrayList<>(); for (int i = 0; i < list.size(); ++i) { diff --git a/Spigot-Server-Patches/0234-InventoryCloseEvent-Reason-API.patch b/Spigot-Server-Patches/0234-InventoryCloseEvent-Reason-API.patch index 180126a0b5..f5e12418fa 100644 --- a/Spigot-Server-Patches/0234-InventoryCloseEvent-Reason-API.patch +++ b/Spigot-Server-Patches/0234-InventoryCloseEvent-Reason-API.patch @@ -88,7 +88,7 @@ index 42bf31bd9569a8f1c2b36f1c3a2c5c0d805c9b5d..c0b1643dfb4701f0d790bcfae75ede41 this.o(); } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index cb9257d66a28ddd30c5e54808c044cd1e10b8a4a..fb121524f0505baf65d0ed3cb6db7cbdf24bbf96 100644 +index 6051ceba109350fdb07f476df97a1f27345f20f1..7a52e92de0f0b1fccfc07045701d1b86f208290f 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -45,6 +45,7 @@ import org.bukkit.event.inventory.ClickType; @@ -99,7 +99,7 @@ index cb9257d66a28ddd30c5e54808c044cd1e10b8a4a..fb121524f0505baf65d0ed3cb6db7cbd import org.bukkit.event.inventory.InventoryCreativeEvent; import org.bukkit.event.inventory.InventoryType.SlotType; import org.bukkit.event.player.AsyncPlayerChatEvent; -@@ -2168,10 +2169,15 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -2163,10 +2164,15 @@ public class PlayerConnection implements PacketListenerPlayIn { @Override public void a(PacketPlayInCloseWindow packetplayinclosewindow) { diff --git a/Spigot-Server-Patches/0236-Refresh-player-inventory-when-cancelling-PlayerInter.patch b/Spigot-Server-Patches/0236-Refresh-player-inventory-when-cancelling-PlayerInter.patch index 76adbaca1a..ae3bac9cfd 100644 --- a/Spigot-Server-Patches/0236-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 fb121524f0505baf65d0ed3cb6db7cbdf24bbf96..eeefbf2d81e73226e1ba84be6fd54c330b60f240 100644 +index f4bcb078b53391976da1ea4ec95fdc62810bb8c7..2a23c11db0368f182fb50bc70ef682e46f96f5b2 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -2081,6 +2081,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -2076,6 +2076,7 @@ public class PlayerConnection implements PacketListenerPlayIn { } if (event.isCancelled()) { diff --git a/Spigot-Server-Patches/0258-Break-up-and-make-tab-spam-limits-configurable.patch b/Spigot-Server-Patches/0258-Break-up-and-make-tab-spam-limits-configurable.patch index 4527822871..1713440648 100644 --- a/Spigot-Server-Patches/0258-Break-up-and-make-tab-spam-limits-configurable.patch +++ b/Spigot-Server-Patches/0258-Break-up-and-make-tab-spam-limits-configurable.patch @@ -45,7 +45,7 @@ index 77a03abd59db4a43f6f2d59d4c7ef176e782f205..bd508025b771424c942fd856c31d520b + } } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index eeefbf2d81e73226e1ba84be6fd54c330b60f240..e27d5b1e89b6e6f511e99e104b166503b267c5bc 100644 +index 92e5e880081066c01310ac5561a90f16af7a629b..370bf14e04a5989ed306f94e669bd789e3ebd61b 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -83,6 +83,7 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0298-Call-player-spectator-target-events-and-improve-impl.patch b/Spigot-Server-Patches/0298-Call-player-spectator-target-events-and-improve-impl.patch index 5b34ad7e44..c5cf590ff1 100644 --- a/Spigot-Server-Patches/0298-Call-player-spectator-target-events-and-improve-impl.patch +++ b/Spigot-Server-Patches/0298-Call-player-spectator-target-events-and-improve-impl.patch @@ -19,7 +19,7 @@ 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 273fd5a83790f76f089c2b1308a1e02ac6828683..d92cb1aca385ea15c181ba0dc8f19f317c995163 100644 +index 03d062f9cdf19df32dcc57a247555e5fa21d38b9..86e254601498d03e516d7a00da0749d4458b4820 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -1683,15 +1683,59 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -88,7 +88,7 @@ index 273fd5a83790f76f089c2b1308a1e02ac6828683..d92cb1aca385ea15c181ba0dc8f19f31 @Override diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index e27d5b1e89b6e6f511e99e104b166503b267c5bc..49f8ceb913fe58c68cc6141ca49b0926785cd2f5 100644 +index 370bf14e04a5989ed306f94e669bd789e3ebd61b..3321be2ba2d1c565d8f41945f09cf12f38fb88b6 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -1208,6 +1208,7 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0303-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 index ad07e5e858..d876e66a0d 100644 --- a/Spigot-Server-Patches/0303-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 49f8ceb913fe58c68cc6141ca49b0926785cd2f5..0b1350c78a5d268237c983fd45214efe861c3560 100644 +index 3321be2ba2d1c565d8f41945f09cf12f38fb88b6..fa74b0266172bf83339f85a4e739bbf2256e4ccf 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -396,6 +396,13 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0311-Don-t-allow-digging-into-unloaded-chunks.patch b/Spigot-Server-Patches/0311-Don-t-allow-digging-into-unloaded-chunks.patch index f2b4317726..55408c8e62 100644 --- a/Spigot-Server-Patches/0311-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 0b1350c78a5d268237c983fd45214efe861c3560..32856a1e19bf31a7650bf9a4e662d5a49c3248d2 100644 +index fa74b0266172bf83339f85a4e739bbf2256e4ccf..a448773cc46889df37d563beb227beaa433d726e 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -1372,6 +1372,11 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0312-Book-Size-Limits.patch b/Spigot-Server-Patches/0312-Book-Size-Limits.patch index 6c89e93783..fce35a7b6c 100644 --- a/Spigot-Server-Patches/0312-Book-Size-Limits.patch +++ b/Spigot-Server-Patches/0312-Book-Size-Limits.patch @@ -22,7 +22,7 @@ index 3139c194f9b1bc3510d51a81f13ae43d00a3dc29..13edb435b3fa65b4980bd7472aa5a519 + } } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 32856a1e19bf31a7650bf9a4e662d5a49c3248d2..2e3a4f2630ce6601772f05a186e5f4a3541640b9 100644 +index a448773cc46889df37d563beb227beaa433d726e..188af7af384ca35f2e659dfb1f7518dd06803be3 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/0326-Fix-sign-edit-memory-leak.patch b/Spigot-Server-Patches/0326-Fix-sign-edit-memory-leak.patch index 123cbe672f..f4ef69cf3d 100644 --- a/Spigot-Server-Patches/0326-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 2e3a4f2630ce6601772f05a186e5f4a3541640b9..9188101eaebab33f18145f3c93e90c27a1aa8562 100644 +index f7c91df1c2cc7ae5045ee3425e21d0b1af35a5cc..c333f492dbe6148776dbffd1e5afa5dc2f9af4a8 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -2699,7 +2699,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -2694,7 +2694,7 @@ public class PlayerConnection implements PacketListenerPlayIn { TileEntitySign tileentitysign = (TileEntitySign) tileentity; diff --git a/Spigot-Server-Patches/0327-Limit-Client-Sign-length-more.patch b/Spigot-Server-Patches/0327-Limit-Client-Sign-length-more.patch index 7c5323b204..7917fc2617 100644 --- a/Spigot-Server-Patches/0327-Limit-Client-Sign-length-more.patch +++ b/Spigot-Server-Patches/0327-Limit-Client-Sign-length-more.patch @@ -22,7 +22,7 @@ it only impacts data sent from the client. Set -DPaper.maxSignLength=XX to change limit or -1 to disable diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 9188101eaebab33f18145f3c93e90c27a1aa8562..454587fc85aecad21f4f042dd87c35a4232338e9 100644 +index 081077c3e00d424baa8f6a293c3a911da447cb69..86572dd0d7f415a9a141785518452bf1b051e10d 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -110,6 +110,7 @@ public class PlayerConnection implements PacketListenerPlayIn { @@ -33,7 +33,7 @@ index 9188101eaebab33f18145f3c93e90c27a1aa8562..454587fc85aecad21f4f042dd87c35a4 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) { -@@ -2709,7 +2710,17 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -2704,7 +2705,17 @@ public class PlayerConnection implements PacketListenerPlayIn { List lines = new java.util.ArrayList<>(); for (int i = 0; i < list.size(); ++i) { diff --git a/Spigot-Server-Patches/0338-Update-entity-Metadata-for-all-tracked-players.patch b/Spigot-Server-Patches/0338-Update-entity-Metadata-for-all-tracked-players.patch index 8c8ff0355c..900d65c368 100644 --- a/Spigot-Server-Patches/0338-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 454587fc85aecad21f4f042dd87c35a4232338e9..fa6ae287036992bc91c56c96fadb331050ebfbc3 100644 +index fb98cfecbcf4c7773cd9fde37a6614ced107e07a..95c5f956055d43ee0aeb291ad8f66cadf7a6d507 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -2146,7 +2146,14 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -2141,7 +2141,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/0347-Fix-CB-call-to-changed-postToMainThread-method.patch b/Spigot-Server-Patches/0347-Fix-CB-call-to-changed-postToMainThread-method.patch index 2bf2700bbf..7c88ec6aa5 100644 --- a/Spigot-Server-Patches/0347-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 fa6ae287036992bc91c56c96fadb331050ebfbc3..af464019f8ef8236c2c2d605471aa35bf1bcd25c 100644 +index 33a99669e5f9d85e150a7a3841a5e7da24142184..9886ccda757a150d00c914a017ddd7a43167a6bd 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -299,7 +299,7 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0369-Asynchronous-chunk-IO-and-loading.patch b/Spigot-Server-Patches/0369-Asynchronous-chunk-IO-and-loading.patch index 84d5b0bd3e..98912fbb99 100644 --- a/Spigot-Server-Patches/0369-Asynchronous-chunk-IO-and-loading.patch +++ b/Spigot-Server-Patches/0369-Asynchronous-chunk-IO-and-loading.patch @@ -161,7 +161,7 @@ index 944fd203e9f39d6c6fc9e270940c76c98067273a..a27dc38d1a29ed1d63d2f44b7984c2b6 public static Timing getTickList(WorldServer worldserver, String timingsType) { diff --git a/src/main/java/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java -index e4719a5e7e5ebd91257a9c9b83fa1adad70fd585..9ad822715c9358e5ac2a0e0a0800786a9cee7be3 100644 +index 2522ec624c53ca0718a8abbcb9c96d104f2f67fa..5bb90675ed813070e61e1598d0c812b20d340328 100644 --- a/src/main/java/com/destroystokyo/paper/PaperCommand.java +++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java @@ -1,5 +1,6 @@ @@ -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 af464019f8ef8236c2c2d605471aa35bf1bcd25c..44ac06b2b733336ed27a58e6d2725424dc2b134d 100644 +index 9886ccda757a150d00c914a017ddd7a43167a6bd..24a7666a74421ca07b6aeaa23ef3fc06d94b1f2e 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -584,6 +584,13 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0370-Use-getChunkIfLoadedImmediately-in-places.patch b/Spigot-Server-Patches/0370-Use-getChunkIfLoadedImmediately-in-places.patch index 609b081a49..69fb8b1728 100644 --- a/Spigot-Server-Patches/0370-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 44ac06b2b733336ed27a58e6d2725424dc2b134d..5be06182f2987f16c96c3b54fa7314f403ca69bd 100644 +index 24a7666a74421ca07b6aeaa23ef3fc06d94b1f2e..0c21e000e9bcb921d8dde4fe4957d1e47f6df16d 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -1098,7 +1098,7 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0385-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 index cfc3b3040f..5a3ac63908 100644 --- a/Spigot-Server-Patches/0385-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 5be06182f2987f16c96c3b54fa7314f403ca69bd..60046183e610f406020c9835c295e2732812b37b 100644 +index 0c21e000e9bcb921d8dde4fe4957d1e47f6df16d..33112515865b6c2d357c0560637c0aa995ca6d0f 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -1561,6 +1561,10 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0413-Prevent-teleporting-dead-entities.patch b/Spigot-Server-Patches/0413-Prevent-teleporting-dead-entities.patch index f2dad3d79b..c0c713a34f 100644 --- a/Spigot-Server-Patches/0413-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 60046183e610f406020c9835c295e2732812b37b..b6d31a9e64377de0f9ecfc5f5f24d92b8fe11caf 100644 +index 33112515865b6c2d357c0560637c0aa995ca6d0f..8fbafc6057a6062cbc222239e542a1bffc4fc09e 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -1323,6 +1323,10 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0453-Load-Chunks-for-Login-Asynchronously.patch b/Spigot-Server-Patches/0453-Load-Chunks-for-Login-Asynchronously.patch index a629fc9976..522a2a28f9 100644 --- a/Spigot-Server-Patches/0453-Load-Chunks-for-Login-Asynchronously.patch +++ b/Spigot-Server-Patches/0453-Load-Chunks-for-Login-Asynchronously.patch @@ -73,7 +73,7 @@ index e5790c2aeaa380a3acc26434f5de78ac746c6d57..bdd4766976902e11411728e6faa93b7e 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 b6d31a9e64377de0f9ecfc5f5f24d92b8fe11caf..ce25ed932bc2f49c78c4693806b7f405bc0d6e9d 100644 +index 8fbafc6057a6062cbc222239e542a1bffc4fc09e..d525f4b783bc3bff180c9dbc31750f5bc061a7fb 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -76,6 +76,7 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0460-Implement-Brigadier-Mojang-API.patch b/Spigot-Server-Patches/0460-Implement-Brigadier-Mojang-API.patch index 4b9d0ffa91..c76bb0ac1b 100644 --- a/Spigot-Server-Patches/0460-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 ce25ed932bc2f49c78c4693806b7f405bc0d6e9d..3ba41cea005aa809c7ea1fdf5fe70e594f869bc9 100644 +index d525f4b783bc3bff180c9dbc31750f5bc061a7fb..3e019d18b7c2d76c5d1169c4ada8f0603b8b460e 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -624,8 +624,12 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0462-Validate-PickItem-Packet-and-kick-for-invalid.patch b/Spigot-Server-Patches/0462-Validate-PickItem-Packet-and-kick-for-invalid.patch index 7dc2cfe08c..fe470523b9 100644 --- a/Spigot-Server-Patches/0462-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 3ba41cea005aa809c7ea1fdf5fe70e594f869bc9..b877fd6b5d47069bba0ee70a6d4aa50f24770dd7 100644 +index 3e019d18b7c2d76c5d1169c4ada8f0603b8b460e..c33d87d9c3ce2c258a5e782768eac491538a2836 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -737,7 +737,14 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0483-Add-option-for-console-having-all-permissions.patch b/Spigot-Server-Patches/0483-Add-option-for-console-having-all-permissions.patch index 35409720ee..bce41a3192 100644 --- a/Spigot-Server-Patches/0483-Add-option-for-console-having-all-permissions.patch +++ b/Spigot-Server-Patches/0483-Add-option-for-console-having-all-permissions.patch @@ -19,12 +19,12 @@ index 5f3b0d95cc7e6a0434d78ea7305a70689c41c71c..7f140333c2e62012fa572c1a061d8443 + } diff --git a/src/main/java/org/bukkit/craftbukkit/command/CraftConsoleCommandSender.java b/src/main/java/org/bukkit/craftbukkit/command/CraftConsoleCommandSender.java -index 8495632d99137b89e4dd4543c2ea721dacfc9ee2..971be15ebe4c156a36d7315a6d6c3a8e4e09d5db 100644 +index af986adfdb547cb61fbd52f0f89858f1a9e52cc3..80a67deaeaae3b3f0ceb9a298de5bb38b8ee707b 100644 --- a/src/main/java/org/bukkit/craftbukkit/command/CraftConsoleCommandSender.java +++ b/src/main/java/org/bukkit/craftbukkit/command/CraftConsoleCommandSender.java @@ -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(io.papermc.paper.adventure.PaperAdventure.LEGACY_SECTION_UXRC.serialize(message)); + this.sendRawMessage(org.bukkit.craftbukkit.util.CraftChatMessage.fromComponent(io.papermc.paper.adventure.PaperAdventure.asVanilla(message))); } + + @Override diff --git a/Spigot-Server-Patches/0486-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch b/Spigot-Server-Patches/0486-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch index 01142b861d..a76b7018dd 100644 --- a/Spigot-Server-Patches/0486-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch +++ b/Spigot-Server-Patches/0486-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch @@ -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 b877fd6b5d47069bba0ee70a6d4aa50f24770dd7..cab29e756cd0f04c8c97e29ee2affaa39b425b9a 100644 +index c33d87d9c3ce2c258a5e782768eac491538a2836..99dddcaac05cf6496fdfd3a824b42ff4336e00c5 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -1383,6 +1383,7 @@ public class PlayerConnection implements PacketListenerPlayIn { @@ -1158,7 +1158,7 @@ index b877fd6b5d47069bba0ee70a6d4aa50f24770dd7..cab29e756cd0f04c8c97e29ee2affaa3 } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index ffd4170bc410bdc88fabd2109e51fcf5eb7be718..a39e5d060120fabef8f18d41faabe2808847db00 100644 +index 6f5fd83414fd51f7674cf69066b5d5d18327e2bc..5d631dbb426f0e7a2e39c4636cfd5e0c1246c248 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -198,8 +198,8 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/0500-Prevent-position-desync-in-playerconnection-causing-.patch b/Spigot-Server-Patches/0500-Prevent-position-desync-in-playerconnection-causing-.patch index 7a98714e2f..0a03ef45da 100644 --- a/Spigot-Server-Patches/0500-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 cab29e756cd0f04c8c97e29ee2affaa39b425b9a..ab9714c0ed5eed66b6c6d44b686fe39dd1719d97 100644 +index 99dddcaac05cf6496fdfd3a824b42ff4336e00c5..747015df737074d5686e06083ff997286b0611c4 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -1180,6 +1180,11 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0504-Add-and-implement-PlayerRecipeBookClickEvent.patch b/Spigot-Server-Patches/0504-Add-and-implement-PlayerRecipeBookClickEvent.patch index b1df5d3efe..3b2bb0dfe3 100644 --- a/Spigot-Server-Patches/0504-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 ab9714c0ed5eed66b6c6d44b686fe39dd1719d97..d26d4041afe806f7d2b07ad4404610ffd6c316e4 100644 +index 0b6eea023e7f1f1042b793a8d492bf71817de538..a227445b6c5c83d513d21614f7f1908d5b4bf632 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -2619,9 +2619,15 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -2614,9 +2614,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/0507-Add-permission-for-command-blocks.patch b/Spigot-Server-Patches/0507-Add-permission-for-command-blocks.patch index 3a7817e054..62a022e647 100644 --- a/Spigot-Server-Patches/0507-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 d26d4041afe806f7d2b07ad4404610ffd6c316e4..dc11d45dbcb8c0c300e4ef407bf94df30310adf8 100644 +index 233070b1e169100d62a2dc80dc9d7178ca14ea0e..439b460216c90ff4e269240217d94e52d73d5132 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -652,7 +652,7 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0510-Fix-Per-World-Difficulty-Remembering-Difficulty.patch b/Spigot-Server-Patches/0510-Fix-Per-World-Difficulty-Remembering-Difficulty.patch index 8502b32034..fcda37add3 100644 --- a/Spigot-Server-Patches/0510-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 dc11d45dbcb8c0c300e4ef407bf94df30310adf8..d6e41934ae86d83ed3c81b499dd81f584c07b90d 100644 +index 3bce154babc74a63b5b9b3009c5b96aa4bdd9bd0..e4787193d9d18ba32e60f4507aa7f138e068e0a6 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -2888,7 +2888,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -2883,7 +2883,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/0532-Move-range-check-for-block-placing-up.patch b/Spigot-Server-Patches/0532-Move-range-check-for-block-placing-up.patch index 99ff7974e7..6f71e10cfe 100644 --- a/Spigot-Server-Patches/0532-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 d6e41934ae86d83ed3c81b499dd81f584c07b90d..b444567722c5884b10dc99e96f985f981aa76a3c 100644 +index 61e6fc80fba8dbd0216ddcc25a5f287f7fad068d..01e18079989043c2c8c49ef1dba254122617261d 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -1516,15 +1516,19 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0547-Brand-support.patch b/Spigot-Server-Patches/0547-Brand-support.patch index 8a3ca0d3d2..3953a1e52b 100644 --- a/Spigot-Server-Patches/0547-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 b444567722c5884b10dc99e96f985f981aa76a3c..5b7457d9186b9ea66b986603e5e2c629c9e245cb 100644 +index 01e18079989043c2c8c49ef1dba254122617261d..50fef192bec41070c5dd89ffbc131012efa3c279 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; @@ -25,7 +25,7 @@ index b444567722c5884b10dc99e96f985f981aa76a3c..5b7457d9186b9ea66b986603e5e2c629 public PlayerConnection(MinecraftServer minecraftserver, NetworkManager networkmanager, EntityPlayer entityplayer) { this.minecraftServer = minecraftserver; this.networkManager = networkmanager; -@@ -2847,6 +2850,8 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -2842,6 +2845,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 b444567722c5884b10dc99e96f985f981aa76a3c..5b7457d9186b9ea66b986603e5e2c629 @Override public void a(PacketPlayInCustomPayload packetplayincustompayload) { PlayerConnectionUtils.ensureMainThread(packetplayincustompayload, this, this.player.getWorldServer()); -@@ -2874,6 +2879,16 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -2869,6 +2874,16 @@ public class PlayerConnection implements PacketListenerPlayIn { try { byte[] data = new byte[packetplayincustompayload.data.readableBytes()]; packetplayincustompayload.data.readBytes(data); @@ -51,7 +51,7 @@ index b444567722c5884b10dc99e96f985f981aa76a3c..5b7457d9186b9ea66b986603e5e2c629 server.getMessenger().dispatchIncomingMessage(player.getBukkitEntity(), packetplayincustompayload.tag.toString(), data); } catch (Exception ex) { PlayerConnection.LOGGER.error("Couldn\'t dispatch custom payload", ex); -@@ -2883,6 +2898,12 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -2878,6 +2893,12 @@ public class PlayerConnection implements PacketListenerPlayIn { } diff --git a/Spigot-Server-Patches/0569-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch b/Spigot-Server-Patches/0569-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch index ab85f4a4ac..9af3c7eee1 100644 --- a/Spigot-Server-Patches/0569-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch +++ b/Spigot-Server-Patches/0569-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch @@ -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 5b7457d9186b9ea66b986603e5e2c629c9e245cb..9f836c5f6b9cbe83f537ebd25b54d7fd42693bd5 100644 +index 50fef192bec41070c5dd89ffbc131012efa3c279..25744e01cfca42e9094b2a215270e4617553d18a 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -546,7 +546,7 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0582-Fix-for-large-move-vectors-crashing-server.patch b/Spigot-Server-Patches/0582-Fix-for-large-move-vectors-crashing-server.patch index f62a67dfb2..a6fb7a84de 100644 --- a/Spigot-Server-Patches/0582-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 9f836c5f6b9cbe83f537ebd25b54d7fd42693bd5..2ca65ad26155ee168b51db52568d207c92a5d137 100644 +index 25744e01cfca42e9094b2a215270e4617553d18a..efd66e81492ec4f976b9db66b84f1c5d728c7a13 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -371,19 +371,24 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0598-Add-API-for-quit-reason.patch b/Spigot-Server-Patches/0598-Add-API-for-quit-reason.patch index dfb8c072f9..dbe802092a 100644 --- a/Spigot-Server-Patches/0598-Add-API-for-quit-reason.patch +++ b/Spigot-Server-Patches/0598-Add-API-for-quit-reason.patch @@ -37,7 +37,7 @@ 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 2ca65ad26155ee168b51db52568d207c92a5d137..8591cd6636f6c1f9cb4fd66618afe63592cec482 100644 +index efd66e81492ec4f976b9db66b84f1c5d728c7a13..1f1baaa464459e06ac877ea3dcd1d30604ef8d88 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -302,6 +302,7 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0615-Limit-recipe-packets.patch b/Spigot-Server-Patches/0615-Limit-recipe-packets.patch index 1d44197f3a..5452c1baeb 100644 --- a/Spigot-Server-Patches/0615-Limit-recipe-packets.patch +++ b/Spigot-Server-Patches/0615-Limit-recipe-packets.patch @@ -23,7 +23,7 @@ index 7d50aded88f5b7dfebaea1aebc86231f7b5c4e25..652d87fc5d566dba8018c81676329f0e 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 8591cd6636f6c1f9cb4fd66618afe63592cec482..b484af7308200133eba42dcc9918566ff3c4fb0d 100644 +index 1f1baaa464459e06ac877ea3dcd1d30604ef8d88..741e338f55a63a5a097f2adc737b7e4cf9172555 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 8591cd6636f6c1f9cb4fd66618afe63592cec482..b484af7308200133eba42dcc9918566f import org.apache.commons.lang3.StringUtils; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -@@ -31,6 +32,8 @@ import io.papermc.paper.adventure.PaperAdventure; // Paper - import io.papermc.paper.adventure.VanillaChatMessageLogic; // Paper +@@ -31,6 +32,8 @@ import io.papermc.paper.adventure.ChatProcessor; // Paper + import io.papermc.paper.adventure.PaperAdventure; // Paper import java.util.concurrent.ExecutionException; import java.util.concurrent.atomic.AtomicIntegerFieldUpdater; + @@ -67,7 +67,7 @@ index 8591cd6636f6c1f9cb4fd66618afe63592cec482..b484af7308200133eba42dcc9918566f /* Use thread-safe field access instead if (this.chatThrottle > 0) { --this.chatThrottle; -@@ -2634,6 +2639,14 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -2629,6 +2634,14 @@ public class PlayerConnection implements PacketListenerPlayIn { @Override public void a(PacketPlayInAutoRecipe packetplayinautorecipe) { diff --git a/Spigot-Server-Patches/0632-Fix-interact-event-not-being-called-in-adventure.patch b/Spigot-Server-Patches/0632-Fix-interact-event-not-being-called-in-adventure.patch index 191d882e2b..5d4b9c6d13 100644 --- a/Spigot-Server-Patches/0632-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 b484af7308200133eba42dcc9918566ff3c4fb0d..ad33505bb7896dce6c4381b4652316ef734e9e48 100644 +index 793ea3d3d81d97e59fd367979da2698ce54561b8..c06c1440353f706828cfc791e93aee7889f2ef92 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -2062,7 +2062,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -2057,7 +2057,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));