diff --git a/patches/api/Add-Player-Client-Options-API.patch b/patches/api/Add-Player-Client-Options-API.patch index 5c6fa9fd3..fe7f89051 100644 --- a/patches/api/Add-Player-Client-Options-API.patch +++ b/patches/api/Add-Player-Client-Options-API.patch @@ -197,8 +197,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java @@ -0,0 +0,0 @@ package org.bukkit.entity; - import java.net.InetSocketAddress; + import java.util.Collection; import java.util.UUID; +import com.destroystokyo.paper.ClientOption; // Paper import com.destroystokyo.paper.Title; // Paper diff --git a/patches/api/Add-String-based-Action-Bar-API.patch b/patches/api/Add-String-based-Action-Bar-API.patch index 40c557dab..4ba0a2cec 100644 --- a/patches/api/Add-String-based-Action-Bar-API.patch +++ b/patches/api/Add-String-based-Action-Bar-API.patch @@ -8,8 +8,8 @@ diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/buk index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -0,0 +0,0 @@ package org.bukkit.entity; - import java.net.InetSocketAddress; +@@ -0,0 +0,0 @@ import java.net.InetSocketAddress; + import java.util.Collection; import java.util.UUID; import com.destroystokyo.paper.Title; // Paper +import net.kyori.adventure.text.Component; diff --git a/patches/api/Adventure.patch b/patches/api/Adventure.patch index b414916c6..160be9765 100644 --- a/patches/api/Adventure.patch +++ b/patches/api/Adventure.patch @@ -2154,6 +2154,25 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 public void setResourcePack(@NotNull String url, @Nullable byte[] hash, @Nullable String prompt); + // Paper start + /** + * Request that the player's client download and switch resource packs. + *

+@@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM + * @param hash The sha1 hash sum of the resource pack file which is used + * to apply a cached version of the pack directly without downloading + * if it is available. Hast to be 20 bytes long! ++ * @param prompt The optional custom prompt message to be shown to client. ++ * @throws IllegalArgumentException Thrown if the URL is null. ++ * @throws IllegalArgumentException Thrown if the URL is too long. The ++ * length restriction is an implementation specific arbitrary value. ++ * @throws IllegalArgumentException Thrown if the hash is not 20 bytes ++ * long. ++ */ ++ default void setResourcePack(@NotNull String url, byte @Nullable [] hash, net.kyori.adventure.text.@Nullable Component prompt) { ++ this.setResourcePack(url, hash, prompt, false); ++ } ++ // Paper end ++ + /** + * Request that the player's client download and switch resource packs. + *

@@ -2183,35 +2202,16 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + * pack correctly. + * + * ++ * @deprecated in favour of {@link #setResourcePack(String, byte[], Component, boolean)} + * @param url The URL from which the client will download the resource + * pack. The string must contain only US-ASCII characters and should + * be encoded as per RFC 1738. + * @param hash The sha1 hash sum of the resource pack file which is used + * to apply a cached version of the pack directly without downloading + * if it is available. Hast to be 20 bytes long! -+ * @param prompt The optional custom prompt message to be shown to client. -+ * @throws IllegalArgumentException Thrown if the URL is null. -+ * @throws IllegalArgumentException Thrown if the URL is too long. The -+ * length restriction is an implementation specific arbitrary value. -+ * @throws IllegalArgumentException Thrown if the hash is not 20 bytes -+ * long. -+ */ -+ default void setResourcePack(@NotNull String url, byte @Nullable [] hash, net.kyori.adventure.text.@Nullable Component prompt) { -+ this.setResourcePack(url, hash, prompt, false); -+ } -+ // Paper end -+ - /** - * Request that the player's client download and switch resource packs. - *

-@@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM - * pack correctly. - * - * -+ * @deprecated in favour of {@link #setResourcePack(String, byte[], Component, boolean)} - * @param url The URL from which the client will download the resource - * pack. The string must contain only US-ASCII characters and should - * be encoded as per RFC 1738. + * @param force If true, the client will be disconnected from the server + * when it declines to use the resource pack. + * @throws IllegalArgumentException Thrown if the URL is null. @@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * @throws IllegalArgumentException Thrown if the hash is not 20 bytes * long. diff --git a/patches/api/Annotation-Test-changes.patch b/patches/api/Annotation-Test-changes.patch index b7607b3e6..c063fdab0 100644 --- a/patches/api/Annotation-Test-changes.patch +++ b/patches/api/Annotation-Test-changes.patch @@ -57,7 +57,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + dancing: // Paper for (int i = 0; i < paramTypes.length; i++) { - if (mustBeAnnotated(paramTypes[i]) && !isWellAnnotated(method.invisibleParameterAnnotations == null ? null : method.invisibleParameterAnnotations[i])) { + if (mustBeAnnotated(paramTypes[i]) ^ isWellAnnotated(method.invisibleParameterAnnotations == null ? null : method.invisibleParameterAnnotations[i])) { + // Paper start + if (method.invisibleTypeAnnotations != null) { + for (final org.objectweb.asm.tree.TypeAnnotationNode invisibleTypeAnnotation : method.invisibleTypeAnnotations) { diff --git a/patches/api/Fix-Spigot-annotation-mistakes.patch b/patches/api/Fix-Spigot-annotation-mistakes.patch index 130608aac..b7439dd18 100644 --- a/patches/api/Fix-Spigot-annotation-mistakes.patch +++ b/patches/api/Fix-Spigot-annotation-mistakes.patch @@ -211,7 +211,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + } + + @Deprecated(forRemoval = true) // Paper end - public Vibration(@NotNull Location origin, @NotNull Destination destination, @NotNull int arrivalTime) { + public Vibration(@NotNull Location origin, @NotNull Destination destination, int arrivalTime) { this.origin = origin; this.destination = destination; @@ -0,0 +0,0 @@ public class Vibration { diff --git a/patches/api/Fix-upstream-javadocs.patch b/patches/api/Fix-upstream-javadocs.patch index a97c18147..0083c1da0 100644 --- a/patches/api/Fix-upstream-javadocs.patch +++ b/patches/api/Fix-upstream-javadocs.patch @@ -187,41 +187,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 */ EATING, /** -diff --git a/src/main/java/org/bukkit/event/player/PlayerArmorStandManipulateEvent.java b/src/main/java/org/bukkit/event/player/PlayerArmorStandManipulateEvent.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/org/bukkit/event/player/PlayerArmorStandManipulateEvent.java -+++ b/src/main/java/org/bukkit/event/player/PlayerArmorStandManipulateEvent.java -@@ -0,0 +0,0 @@ public class PlayerArmorStandManipulateEvent extends PlayerInteractEntityEvent { - } - - /** -- * Returns the item held by the player. If this Item is null and the armor stand Item is also null, -+ * Returns the item held by the player. If this Item is air and the armor stand Item is also air, - * there will be no transaction between the player and the armor stand. -- * If the Player's item is null, but the armor stand item is not then the player will obtain the armor stand item. -- * In the case that the Player's item is not null, but the armor stand item is null, the players item will be placed on the armor stand. -- * If both items are not null, the items will be swapped. -+ * If the Player's item is air, but the armor stand item is not then the player will obtain the armor stand item. -+ * In the case that the Player's item is not air, but the armor stand item is air, the players item will be placed on the armor stand. -+ * If both items are not air, the items will be swapped. - * In the case that the event is cancelled the original items will remain the same. - * @return the item held by the player. - */ -@@ -0,0 +0,0 @@ public class PlayerArmorStandManipulateEvent extends PlayerInteractEntityEvent { - - /** - * Returns the item held by the armor stand. -- * If this Item is null and the player's Item is also null, there will be no transaction between the player and the armor stand. -- * If the Player's item is null, but the armor stand item is not then the player will obtain the armor stand item. -- * In the case that the Player's item is not null, but the armor stand item is null, the players item will be placed on the armor stand. -- * If both items are not null, the items will be swapped. -+ * If this Item is air and the player's Item is also air, there will be no transaction between the player and the armor stand. -+ * If the Player's item is air, but the armor stand item is not then the player will obtain the armor stand item. -+ * In the case that the Player's item is not air, but the armor stand item is air, the players item will be placed on the armor stand. -+ * If both items are not air, the items will be swapped. - * In the case that the event is cancelled the original items will remain the same. - * @return the item held by the armor stand. - */ diff --git a/src/main/java/org/bukkit/inventory/EntityEquipment.java b/src/main/java/org/bukkit/inventory/EntityEquipment.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/inventory/EntityEquipment.java diff --git a/patches/api/Player-Tab-List-and-Title-APIs.patch b/patches/api/Player-Tab-List-and-Title-APIs.patch index 46f121705..436d6416a 100644 --- a/patches/api/Player-Tab-List-and-Title-APIs.patch +++ b/patches/api/Player-Tab-List-and-Title-APIs.patch @@ -436,8 +436,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java @@ -0,0 +0,0 @@ package org.bukkit.entity; - import java.net.InetSocketAddress; + import java.util.Collection; import java.util.UUID; +import com.destroystokyo.paper.Title; // Paper import org.bukkit.DyeColor; diff --git a/patches/server/Multi-Block-Change-API-Implementation.patch b/patches/server/Multi-Block-Change-API-Implementation.patch index f685950e0..580cffc2d 100644 --- a/patches/server/Multi-Block-Change-API-Implementation.patch +++ b/patches/server/Multi-Block-Change-API-Implementation.patch @@ -28,14 +28,6 @@ diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/ index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -0,0 +0,0 @@ import java.util.logging.Logger; - import javax.annotation.Nullable; - import net.minecraft.advancements.AdvancementProgress; - import net.minecraft.core.BlockPos; -+import net.minecraft.core.SectionPos; // Paper - import net.minecraft.nbt.CompoundTag; - import net.minecraft.network.FriendlyByteBuf; - import net.minecraft.network.chat.ChatMessageContent; @@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player { this.getHandle().connection.send(packet); } @@ -70,5 +62,5 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // Paper end + @Override - public void sendBlockDamage(Location loc, float progress) { - Preconditions.checkArgument(loc != null, "loc must not be null"); + public void sendBlockChanges(Collection blocks, boolean suppressLightUpdates) { + Preconditions.checkArgument(blocks != null, "blocks must not be null"); diff --git a/work/Bukkit b/work/Bukkit index acdb55f9a..c7c111886 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit acdb55f9a97c6b361947405717eb710b0200e165 +Subproject commit c7c11188610b4b0a59d090b06cabdc239337dcb8 diff --git a/work/CraftBukkit b/work/CraftBukkit index 08cdd26ca..c2c39089e 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit 08cdd26ca9c8fbae22ffa03f79ecc564f015e260 +Subproject commit c2c39089eb639479327acb2c9f58bdfb69bc6b81 diff --git a/work/Spigot b/work/Spigot index 4c157bb49..4aa5ead23 160000 --- a/work/Spigot +++ b/work/Spigot @@ -1 +1 @@ -Subproject commit 4c157bb49aa5705967b066e9c2dec5520f720b22 +Subproject commit 4aa5ead2377692b934a84b6853d188e2d9cbd53a