Updated Upstream (Bukkit/CraftBukkit/Spigot) (#9104)

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:
eb4b416d PR-822: Add experimental armor trim API
33498e1d PR-831: Add a standard of annotations for Minecraft experimental things and API

CraftBukkit Changes:
19de3550d SPIGOT-7315: Bed placement duplicates crops if cancelled
1eb88374e PR-1147: Add experimental armor trim API
c4c0bb0e9 Show clean error for invalidly configured server.properties options
3ae90697f Fix UUID not being updated when changing world of MapView
e43000601 PR-1164, MC-227255, MC-253819: Fix rotation of beehives and bells

Spigot Changes:
d2fdfe39 Rebuild patches
This commit is contained in:
Jake Potrebic 2023-04-08 17:00:50 -07:00 committed by GitHub
parent 29b17a892d
commit b5ce6e3dc5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
102 changed files with 658 additions and 1708 deletions

View file

@ -7,7 +7,7 @@ Co-authored-by: zml <zml@stellardrift.ca>
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
diff --git a/build.gradle.kts b/build.gradle.kts
index 05ac285c0bafa853f820d75c43858836b9bac0c4..81b9ca9c7b93e5eaf4118d69208feeab1bbfdce2 100644
index 5fccd83117c2c153951d102756acfd4862b8c51b..b0e446dde0ccdb61fe58f1c00e3e2d958336c35c 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -8,11 +8,24 @@ java {
@ -50,7 +50,7 @@ index 05ac285c0bafa853f820d75c43858836b9bac0c4..81b9ca9c7b93e5eaf4118d69208feeab
// Paper end
compileOnly("org.apache.maven:maven-resolver-provider:3.8.5")
@@ -80,9 +100,24 @@ tasks.withType<Javadoc> {
@@ -80,10 +100,25 @@ tasks.withType<Javadoc> {
"https://guava.dev/releases/31.1-jre/api/docs/",
"https://javadoc.io/doc/org.yaml/snakeyaml/1.33/",
"https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/", // Paper - we don't want Java 5 annotations
@ -64,6 +64,7 @@ index 05ac285c0bafa853f820d75c43858836b9bac0c4..81b9ca9c7b93e5eaf4118d69208feeab
+ "https://jd.advntr.dev/text-serializer-plain/$adventureVersion/",
+ // Paper end
)
options.tags("apiNote:a:API Note:")
+ inputs.files(apiAndDocs).ignoreEmptyDirectories().withPropertyName(apiAndDocs.name + "-configuration")
+ doFirst {
@ -1364,10 +1365,10 @@ index 52dd3148ae2a3480982593dc627ef7eede52bc5a..0a333c1439b3623d38029b88ce6d5ff1
throw new UnsupportedOperationException("Not supported yet.");
}
diff --git a/src/main/java/org/bukkit/Sound.java b/src/main/java/org/bukkit/Sound.java
index 5676389bb85607112194fd9a6741ab88254d18bb..5035c525ab40ebdde3da7fe85f5bdf6a26f6cfc0 100644
index 4dda5091739ece442a66d983670ad432b6042867..762b0d9ba22a1012ebe5ea77b6aef909fddc0403 100644
--- a/src/main/java/org/bukkit/Sound.java
+++ b/src/main/java/org/bukkit/Sound.java
@@ -10,7 +10,7 @@ import org.jetbrains.annotations.NotNull;
@@ -11,7 +11,7 @@ import org.jetbrains.annotations.NotNull;
* guarantee values will not be removed from this Enum. As such, you should not
* depend on the ordinal values of this class.
*/
@ -1376,7 +1377,7 @@ index 5676389bb85607112194fd9a6741ab88254d18bb..5035c525ab40ebdde3da7fe85f5bdf6a
AMBIENT_BASALT_DELTAS_ADDITIONS("ambient.basalt_deltas.additions"),
AMBIENT_BASALT_DELTAS_LOOP("ambient.basalt_deltas.loop"),
@@ -1478,4 +1478,11 @@ public enum Sound implements Keyed {
@@ -1640,4 +1640,11 @@ public enum Sound implements Keyed {
public NamespacedKey getKey() {
return key;
}
@ -1961,10 +1962,10 @@ index 9566e4306ada5e82dede0f002aa06da12c44996b..4d5f0837bd0e02a30c943d8969fb6b13
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
index 281518d6e1f67722134e22d89b71106aae0c4397..d5be25c62b2eb90f8e171646b460fef04cf2a470 100644
index f3afe67f0832cb828d25be3654518ff73a80b0e1..598abaa82c634178043a29f6caa6ac5221659d06 100644
--- a/src/main/java/org/bukkit/entity/Entity.java
+++ b/src/main/java/org/bukkit/entity/Entity.java
@@ -26,7 +26,7 @@ import org.jetbrains.annotations.Nullable;
@@ -27,7 +27,7 @@ import org.jetbrains.annotations.Nullable;
/**
* Represents a base entity in the world
*/
@ -1973,7 +1974,7 @@ index 281518d6e1f67722134e22d89b71106aae0c4397..d5be25c62b2eb90f8e171646b460fef0
/**
* Gets the entity's current position
@@ -709,4 +709,20 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
@@ -710,4 +710,20 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
@Override
Spigot spigot();
// Spigot end
@ -1995,10 +1996,10 @@ index 281518d6e1f67722134e22d89b71106aae0c4397..d5be25c62b2eb90f8e171646b460fef0
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index f2aeb6dba58ae2e0936ae2fad1cfd8d6198befe7..1fa1ad73ba424c8ae7a0646bc076e13a3a7f3e6f 100644
index 1d702d2bfd61fc44f351a90e03e4b2593e470630..743559d4cc248331578e0c2d2a026e7a270cb713 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -39,7 +39,28 @@ import org.jetbrains.annotations.Nullable;
@@ -40,7 +40,28 @@ import org.jetbrains.annotations.Nullable;
/**
* Represents a player, connected or not
*/
@ -2028,7 +2029,7 @@ index f2aeb6dba58ae2e0936ae2fad1cfd8d6198befe7..1fa1ad73ba424c8ae7a0646bc076e13a
/**
* {@inheritDoc}
@@ -56,7 +77,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -57,7 +78,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* places defined by plugins.
*
* @return the friendly name
@ -2038,7 +2039,7 @@ index f2aeb6dba58ae2e0936ae2fad1cfd8d6198befe7..1fa1ad73ba424c8ae7a0646bc076e13a
@NotNull
public String getDisplayName();
@@ -68,15 +91,50 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -69,15 +92,50 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* places defined by plugins.
*
* @param name The new display name.
@ -2089,7 +2090,7 @@ index f2aeb6dba58ae2e0936ae2fad1cfd8d6198befe7..1fa1ad73ba424c8ae7a0646bc076e13a
public String getPlayerListName();
/**
@@ -85,14 +143,18 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -86,14 +144,18 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* If the value is null, the name will be identical to {@link #getName()}.
*
* @param name new player list name
@ -2108,7 +2109,7 @@ index f2aeb6dba58ae2e0936ae2fad1cfd8d6198befe7..1fa1ad73ba424c8ae7a0646bc076e13a
@Nullable
public String getPlayerListHeader();
@@ -100,7 +162,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -101,7 +163,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* Gets the currently displayed player list footer for this player.
*
* @return player list header or null
@ -2118,7 +2119,7 @@ index f2aeb6dba58ae2e0936ae2fad1cfd8d6198befe7..1fa1ad73ba424c8ae7a0646bc076e13a
@Nullable
public String getPlayerListFooter();
@@ -108,14 +172,18 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -109,14 +173,18 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* Sets the currently displayed player list header for this player.
*
* @param header player list header, null for empty
@ -2137,7 +2138,7 @@ index f2aeb6dba58ae2e0936ae2fad1cfd8d6198befe7..1fa1ad73ba424c8ae7a0646bc076e13a
public void setPlayerListFooter(@Nullable String footer);
/**
@@ -124,7 +192,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -125,7 +193,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*
* @param header player list header, null for empty
* @param footer player list footer, null for empty
@ -2147,7 +2148,7 @@ index f2aeb6dba58ae2e0936ae2fad1cfd8d6198befe7..1fa1ad73ba424c8ae7a0646bc076e13a
public void setPlayerListHeaderFooter(@Nullable String header, @Nullable String footer);
/**
@@ -162,9 +232,25 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -163,9 +233,25 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* Kicks player with custom kick message.
*
* @param message kick message
@ -2173,7 +2174,7 @@ index f2aeb6dba58ae2e0936ae2fad1cfd8d6198befe7..1fa1ad73ba424c8ae7a0646bc076e13a
/**
* Says a message (or runs a command).
*
@@ -606,6 +692,90 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -607,6 +693,90 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*/
public void sendEquipmentChange(@NotNull LivingEntity entity, @NotNull Map<EquipmentSlot, ItemStack> items);
@ -2264,7 +2265,7 @@ index f2aeb6dba58ae2e0936ae2fad1cfd8d6198befe7..1fa1ad73ba424c8ae7a0646bc076e13a
/**
* Send a sign change. This fakes a sign change packet for a user at
* a certain location. This will not actually change the world in any way.
@@ -620,7 +790,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -621,7 +791,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @param lines the new text on the sign or null to clear it
* @throws IllegalArgumentException if location is null
* @throws IllegalArgumentException if lines is non-null and has a length less than 4
@ -2274,7 +2275,7 @@ index f2aeb6dba58ae2e0936ae2fad1cfd8d6198befe7..1fa1ad73ba424c8ae7a0646bc076e13a
public void sendSignChange(@NotNull Location loc, @Nullable String[] lines) throws IllegalArgumentException;
/**
@@ -639,7 +811,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -640,7 +812,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @throws IllegalArgumentException if location is null
* @throws IllegalArgumentException if dyeColor is null
* @throws IllegalArgumentException if lines is non-null and has a length less than 4
@ -2284,7 +2285,7 @@ index f2aeb6dba58ae2e0936ae2fad1cfd8d6198befe7..1fa1ad73ba424c8ae7a0646bc076e13a
public void sendSignChange(@NotNull Location loc, @Nullable String[] lines, @NotNull DyeColor dyeColor) throws IllegalArgumentException;
/**
@@ -659,7 +833,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -660,7 +834,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @throws IllegalArgumentException if location is null
* @throws IllegalArgumentException if dyeColor is null
* @throws IllegalArgumentException if lines is non-null and has a length less than 4
@ -2294,7 +2295,7 @@ index f2aeb6dba58ae2e0936ae2fad1cfd8d6198befe7..1fa1ad73ba424c8ae7a0646bc076e13a
public void sendSignChange(@NotNull Location loc, @Nullable String[] lines, @NotNull DyeColor dyeColor, boolean hasGlowingText) throws IllegalArgumentException;
/**
@@ -1132,6 +1308,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1133,6 +1309,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* pack correctly.
* </ul>
*
@ -2302,7 +2303,7 @@ index f2aeb6dba58ae2e0936ae2fad1cfd8d6198befe7..1fa1ad73ba424c8ae7a0646bc076e13a
* @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.
@@ -1188,8 +1365,10 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1189,8 +1366,10 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @throws IllegalArgumentException Thrown if the hash is not 20 bytes
* long.
*/
@ -2313,7 +2314,7 @@ index f2aeb6dba58ae2e0936ae2fad1cfd8d6198befe7..1fa1ad73ba424c8ae7a0646bc076e13a
/**
* Request that the player's client download and switch resource packs.
* <p>
@@ -1225,6 +1404,54 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1226,6 +1405,54 @@ 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!
@ -2368,7 +2369,7 @@ index f2aeb6dba58ae2e0936ae2fad1cfd8d6198befe7..1fa1ad73ba424c8ae7a0646bc076e13a
* @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.
@@ -1279,8 +1506,57 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1280,8 +1507,57 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @throws IllegalArgumentException Thrown if the hash is not 20 bytes
* long.
*/
@ -2426,7 +2427,7 @@ index f2aeb6dba58ae2e0936ae2fad1cfd8d6198befe7..1fa1ad73ba424c8ae7a0646bc076e13a
/**
* Gets the Scoreboard displayed to this player
*
@@ -1396,7 +1672,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1397,7 +1673,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*
* @param title Title text
* @param subtitle Subtitle text
@ -2435,7 +2436,7 @@ index f2aeb6dba58ae2e0936ae2fad1cfd8d6198befe7..1fa1ad73ba424c8ae7a0646bc076e13a
*/
@Deprecated
public void sendTitle(@Nullable String title, @Nullable String subtitle);
@@ -1415,7 +1691,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1416,7 +1692,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @param fadeIn time in ticks for titles to fade in. Defaults to 10.
* @param stay time in ticks for titles to stay. Defaults to 70.
* @param fadeOut time in ticks for titles to fade out. Defaults to 20.
@ -2445,7 +2446,7 @@ index f2aeb6dba58ae2e0936ae2fad1cfd8d6198befe7..1fa1ad73ba424c8ae7a0646bc076e13a
public void sendTitle(@Nullable String title, @Nullable String subtitle, int fadeIn, int stay, int fadeOut);
/**
@@ -1642,6 +1920,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1643,6 +1921,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*/
public int getClientViewDistance();
@ -2460,7 +2461,7 @@ index f2aeb6dba58ae2e0936ae2fad1cfd8d6198befe7..1fa1ad73ba424c8ae7a0646bc076e13a
/**
* Gets the player's estimated ping in milliseconds.
*
@@ -1667,8 +1953,10 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1668,8 +1954,10 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* they wish.
*
* @return the player's locale
@ -2471,7 +2472,7 @@ index f2aeb6dba58ae2e0936ae2fad1cfd8d6198befe7..1fa1ad73ba424c8ae7a0646bc076e13a
public String getLocale();
/**
@@ -1710,6 +1998,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1711,6 +1999,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*/
public boolean isAllowingServerListings();
@ -2486,7 +2487,7 @@ index f2aeb6dba58ae2e0936ae2fad1cfd8d6198befe7..1fa1ad73ba424c8ae7a0646bc076e13a
// Spigot start
public class Spigot extends Entity.Spigot {
@@ -1764,11 +2060,13 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1765,11 +2061,13 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
throw new UnsupportedOperationException("Not supported yet.");
}
@ -2500,7 +2501,7 @@ index f2aeb6dba58ae2e0936ae2fad1cfd8d6198befe7..1fa1ad73ba424c8ae7a0646bc076e13a
@Override
public void sendMessage(@NotNull net.md_5.bungee.api.chat.BaseComponent... components) {
throw new UnsupportedOperationException("Not supported yet.");
@@ -1779,7 +2077,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1780,7 +2078,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*
* @param position the screen position
* @param component the components to send
@ -2510,7 +2511,7 @@ index f2aeb6dba58ae2e0936ae2fad1cfd8d6198befe7..1fa1ad73ba424c8ae7a0646bc076e13a
public void sendMessage(@NotNull net.md_5.bungee.api.ChatMessageType position, @NotNull net.md_5.bungee.api.chat.BaseComponent component) {
throw new UnsupportedOperationException("Not supported yet.");
}
@@ -1789,7 +2089,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1790,7 +2090,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*
* @param position the screen position
* @param components the components to send
@ -2520,7 +2521,7 @@ index f2aeb6dba58ae2e0936ae2fad1cfd8d6198befe7..1fa1ad73ba424c8ae7a0646bc076e13a
public void sendMessage(@NotNull net.md_5.bungee.api.ChatMessageType position, @NotNull net.md_5.bungee.api.chat.BaseComponent... components) {
throw new UnsupportedOperationException("Not supported yet.");
}
@@ -1800,7 +2102,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1801,7 +2103,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @param position the screen position
* @param sender the sender of the message
* @param component the components to send
@ -2530,7 +2531,7 @@ index f2aeb6dba58ae2e0936ae2fad1cfd8d6198befe7..1fa1ad73ba424c8ae7a0646bc076e13a
public void sendMessage(@NotNull net.md_5.bungee.api.ChatMessageType position, @Nullable java.util.UUID sender, @NotNull net.md_5.bungee.api.chat.BaseComponent component) {
throw new UnsupportedOperationException("Not supported yet.");
}
@@ -1811,7 +2115,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1812,7 +2116,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @param position the screen position
* @param sender the sender of the message
* @param components the components to send
@ -2821,10 +2822,10 @@ index 3c2ea8fec3a748cab7f5ad9100d12bd8213ec6c9..a803bfea5400b3578bb4cf3261874e87
* Gets how much EXP the Player should have at respawn.
* <p>
diff --git a/src/main/java/org/bukkit/event/inventory/InventoryType.java b/src/main/java/org/bukkit/event/inventory/InventoryType.java
index 629c1bf79ca3577c51d17ef8c9d36f84b1a2c360..2186507089384cb9805057c7cc1795fba7de1df3 100644
index 3eb3a2cb67d9aa54180ab310524770189ad37c99..b821fa535b23fe5af5884e536b1708460076ee40 100644
--- a/src/main/java/org/bukkit/event/inventory/InventoryType.java
+++ b/src/main/java/org/bukkit/event/inventory/InventoryType.java
@@ -155,6 +155,18 @@ public enum InventoryType {
@@ -156,6 +156,18 @@ public enum InventoryType {
private final String title;
private final boolean isCreatable;
@ -2843,7 +2844,7 @@ index 629c1bf79ca3577c51d17ef8c9d36f84b1a2c360..2186507089384cb9805057c7cc1795fb
private InventoryType(int defaultSize, /*@NotNull*/ String defaultTitle) {
this(defaultSize, defaultTitle, true);
}
@@ -163,6 +175,7 @@ public enum InventoryType {
@@ -164,6 +176,7 @@ public enum InventoryType {
size = defaultSize;
title = defaultTitle;
this.isCreatable = isCreatable;
@ -2851,7 +2852,7 @@ index 629c1bf79ca3577c51d17ef8c9d36f84b1a2c360..2186507089384cb9805057c7cc1795fb
}
public int getDefaultSize() {
@@ -170,6 +183,7 @@ public enum InventoryType {
@@ -171,6 +184,7 @@ public enum InventoryType {
}
@NotNull