Updated Upstream (Bukkit/CraftBukkit/Spigot)

Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
c7c11188 SPIGOT-2620: Add Player#sendBlockChanges()
f63d2b44 Improve annotation test on parameters
3372e7b4 SPIGOT-1244, SPIGOT-6860, SPIGOT-6874: Various Javadoc and formatting fixes
a1e8a9ab PR-793: Ignore .checkstyle file generated by Eclipse IDE

CraftBukkit Changes:
c2c39089e SPIGOT-2620: Add Player#sendBlockChanges()
8209158db PR-1113: Ignore .checkstyle file generated by Eclipse IDE

Spigot Changes:
4aa5ead2 Rebuild patches
This commit is contained in:
Shane Freeder 2022-09-24 02:38:12 +01:00
parent d885450b81
commit 8e18842fbc
11 changed files with 34 additions and 77 deletions

View File

@ -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

View File

@ -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;

View File

@ -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.
* <p>
@@ -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.
+ * <p>
@ -2183,35 +2202,16 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ * pack correctly.
+ * </ul>
+ *
+ * @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.
* <p>
@@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* pack correctly.
* </ul>
*
+ * @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.

View File

@ -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) {

View File

@ -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 {

View File

@ -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

View File

@ -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;

View File

@ -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<BlockState> blocks, boolean suppressLightUpdates) {
Preconditions.checkArgument(blocks != null, "blocks must not be null");

@ -1 +1 @@
Subproject commit acdb55f9a97c6b361947405717eb710b0200e165
Subproject commit c7c11188610b4b0a59d090b06cabdc239337dcb8

@ -1 +1 @@
Subproject commit 08cdd26ca9c8fbae22ffa03f79ecc564f015e260
Subproject commit c2c39089eb639479327acb2c9f58bdfb69bc6b81

@ -1 +1 @@
Subproject commit 4c157bb49aa5705967b066e9c2dec5520f720b22
Subproject commit 4aa5ead2377692b934a84b6853d188e2d9cbd53a