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:
1d522878 PR-966: Introduce getRespawnLocation as a replacement for getBedSpawnLocation
cc01b745 PR-965: Add DragonBattle#setPreviouslyKilled
28e3702f SPIGOT-6921, PR-957: Add methods to remove all enchantments on an ItemStack
8872404e PR-961: Add BlockData#copyTo
4054cc7b PR-956: Add method to get an offline player's location

CraftBukkit Changes:
292ec79e0 SPIGOT-7568: Call EntityChangeBlockEvent for DecoratedPot
b44bf5aa8 SPIGOT-7575: SuspiciousStewMeta creates invalid PotionEffect data
161784713 PR-1340: Centralize the conversion from and to Minecraft / Bukkit registry items even more and add a test case for them
b93c5a30d PR-1338: Introduce getRespawnLocation as a replacement for getBedSpawnLocation
fb973486c SPIGOT-7570: PrepareItemCraftEvent#isRepair() always returns false
c9c24535e PR-1337: Add DragonBattle#setPreviouslyKilled
c8b4da803 SPIGOT-6921, PR-1330: Add methods to remove all enchantments on an ItemStack
95bc1c4f5 PR-1333: Add BlockData#copyTo
36e2f9ce1 PR-1329: Add method to get an offline player's location

Spigot Changes:
c198da22 SPIGOT-7563: Update to latest release of bungeecord-chat
This commit is contained in:
Nassim Jahnke 2024-01-26 20:17:06 +01:00
parent bd2fd615ce
commit fe53b0e76f
No known key found for this signature in database
GPG key ID: EF6771C01F6EF02F
192 changed files with 403 additions and 409 deletions

View file

@ -7,13 +7,13 @@ 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 cc8f297a71eb75b3388ff1cb21a297e268894aac..4f5ac0c5fe6494d5fe5caa8ed5077a83cf43fa87 100644
index b3df8cf8d32a4cc99a3a3950f146cdab65826e1b..b577114c2b89fe2053123d1a542d37dff7fa8d5a 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -11,12 +11,28 @@ java {
val annotationsVersion = "24.0.1"
val bungeeCordChatVersion = "1.20-R0.1"
val bungeeCordChatVersion = "1.20-R0.2"
+val adventureVersion = "4.15.0"
+val apiAndDocs: Configuration by configurations.creating {
+ attributes {
@ -33,7 +33,7 @@ index cc8f297a71eb75b3388ff1cb21a297e268894aac..4f5ac0c5fe6494d5fe5caa8ed5077a83
api("com.google.code.gson:gson:2.10.1")
- api("net.md-5:bungeecord-chat:$bungeeCordChatVersion")
+ // Paper start - adventure
+ api("net.md-5:bungeecord-chat:$bungeeCordChatVersion-deprecated+build.14") {
+ api("net.md-5:bungeecord-chat:$bungeeCordChatVersion-deprecated+build.18") {
+ exclude("com.google.guava", "guava")
+ }
+ // Paper - adventure
@ -2148,7 +2148,7 @@ index 8532b8484d5a493c1c37ad7508597f624f1831c8..978431fd88cfb7d42fcdea8c904633df
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index a5046b416fa26d51974de0866d3af190ee197c3a..01fe25d7925d7c014524ae9c26b62fade5670e64 100644
index b2925af90c531f0e8a5c39a915834f25d0015460..696efe5b86346209e9780b73229236e87ca26dec 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -52,7 +52,41 @@ import org.jetbrains.annotations.Nullable;
@ -2339,7 +2339,7 @@ index a5046b416fa26d51974de0866d3af190ee197c3a..01fe25d7925d7c014524ae9c26b62fad
/**
* Adds this user to the {@link ProfileBanList}. If a previous ban exists, this will
* update the entry.
@@ -799,6 +898,106 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -840,6 +939,106 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*/
public void sendEquipmentChange(@NotNull LivingEntity entity, @NotNull Map<EquipmentSlot, ItemStack> items);
@ -2446,7 +2446,7 @@ index a5046b416fa26d51974de0866d3af190ee197c3a..01fe25d7925d7c014524ae9c26b62fad
/**
* 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.
@@ -816,7 +1015,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -857,7 +1056,11 @@ 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
@ -2458,7 +2458,7 @@ index a5046b416fa26d51974de0866d3af190ee197c3a..01fe25d7925d7c014524ae9c26b62fad
public void sendSignChange(@NotNull Location loc, @Nullable String[] lines) throws IllegalArgumentException;
/**
@@ -838,7 +1041,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -879,7 +1082,11 @@ 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
@ -2470,7 +2470,7 @@ index a5046b416fa26d51974de0866d3af190ee197c3a..01fe25d7925d7c014524ae9c26b62fad
public void sendSignChange(@NotNull Location loc, @Nullable String[] lines, @NotNull DyeColor dyeColor) throws IllegalArgumentException;
/**
@@ -861,7 +1068,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -902,7 +1109,11 @@ 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
@ -2482,7 +2482,7 @@ index a5046b416fa26d51974de0866d3af190ee197c3a..01fe25d7925d7c014524ae9c26b62fad
public void sendSignChange(@NotNull Location loc, @Nullable String[] lines, @NotNull DyeColor dyeColor, boolean hasGlowingText) throws IllegalArgumentException;
/**
@@ -1309,7 +1520,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1350,7 +1561,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @throws IllegalArgumentException Thrown if the URL is null.
* @throws IllegalArgumentException Thrown if the URL is too long.
* @deprecated Minecraft no longer uses textures packs. Instead you
@ -2491,7 +2491,7 @@ index a5046b416fa26d51974de0866d3af190ee197c3a..01fe25d7925d7c014524ae9c26b62fad
*/
@Deprecated
public void setTexturePack(@NotNull String url);
@@ -1345,7 +1556,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1386,7 +1597,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @throws IllegalArgumentException Thrown if the URL is null.
* @throws IllegalArgumentException Thrown if the URL is too long. The
* length restriction is an implementation specific arbitrary value.
@ -2501,7 +2501,7 @@ index a5046b416fa26d51974de0866d3af190ee197c3a..01fe25d7925d7c014524ae9c26b62fad
public void setResourcePack(@NotNull String url);
/**
@@ -1377,6 +1590,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1418,6 +1631,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* pack correctly.
* </ul>
*
@ -2509,7 +2509,7 @@ index a5046b416fa26d51974de0866d3af190ee197c3a..01fe25d7925d7c014524ae9c26b62fad
* @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.
@@ -1389,6 +1603,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1430,6 +1644,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @throws IllegalArgumentException Thrown if the hash is not 20 bytes
* long.
*/
@ -2517,7 +2517,7 @@ index a5046b416fa26d51974de0866d3af190ee197c3a..01fe25d7925d7c014524ae9c26b62fad
public void setResourcePack(@NotNull String url, @Nullable byte[] hash);
/**
@@ -1413,12 +1628,13 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1454,12 +1669,13 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* {@link PlayerResourcePackStatusEvent} to figure out whether or not
* the player loaded the pack!
* <li>To remove a resource pack you can use
@ -2532,7 +2532,7 @@ index a5046b416fa26d51974de0866d3af190ee197c3a..01fe25d7925d7c014524ae9c26b62fad
* @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.
@@ -1432,8 +1648,57 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1473,8 +1689,57 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @throws IllegalArgumentException Thrown if the hash is not 20 bytes
* long.
*/
@ -2590,7 +2590,7 @@ index a5046b416fa26d51974de0866d3af190ee197c3a..01fe25d7925d7c014524ae9c26b62fad
/**
* Request that the player's client download and switch resource packs.
* <p>
@@ -1456,7 +1721,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1497,7 +1762,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* {@link PlayerResourcePackStatusEvent} to figure out whether or not
* the player loaded the pack!
* <li>To remove a resource pack you can use
@ -2599,7 +2599,7 @@ index a5046b416fa26d51974de0866d3af190ee197c3a..01fe25d7925d7c014524ae9c26b62fad
* <li>The request is sent with empty string as the hash when the hash is
* not provided. This might result in newer versions not loading the
* pack correctly.
@@ -1475,7 +1740,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1516,7 +1781,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* length restriction is an implementation specific arbitrary value.
* @throws IllegalArgumentException Thrown if the hash is not 20 bytes
* long.
@ -2609,7 +2609,7 @@ index a5046b416fa26d51974de0866d3af190ee197c3a..01fe25d7925d7c014524ae9c26b62fad
public void setResourcePack(@NotNull String url, @Nullable byte[] hash, boolean force);
/**
@@ -1500,7 +1767,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1541,7 +1808,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* {@link PlayerResourcePackStatusEvent} to figure out whether or not
* the player loaded the pack!
* <li>To remove a resource pack you can use
@ -2618,7 +2618,7 @@ index a5046b416fa26d51974de0866d3af190ee197c3a..01fe25d7925d7c014524ae9c26b62fad
* <li>The request is sent with empty string as the hash when the hash is
* not provided. This might result in newer versions not loading the
* pack correctly.
@@ -1520,9 +1787,61 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1561,9 +1828,61 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* length restriction is an implementation specific arbitrary value.
* @throws IllegalArgumentException Thrown if the hash is not 20 bytes
* long.
@ -2680,7 +2680,7 @@ index a5046b416fa26d51974de0866d3af190ee197c3a..01fe25d7925d7c014524ae9c26b62fad
/**
* Request that the player's client download and switch resource packs.
* <p>
@@ -1545,7 +1864,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1586,7 +1905,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* {@link PlayerResourcePackStatusEvent} to figure out whether or not
* the player loaded the pack!
* <li>To remove a resource pack you can use
@ -2689,7 +2689,7 @@ index a5046b416fa26d51974de0866d3af190ee197c3a..01fe25d7925d7c014524ae9c26b62fad
* <li>The request is sent with empty string as the hash when the hash is
* not provided. This might result in newer versions not loading the
* pack correctly.
@@ -1566,21 +1885,74 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1607,21 +1926,74 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* length restriction is an implementation specific arbitrary value.
* @throws IllegalArgumentException Thrown if the hash is not 20 bytes
* long.
@ -2764,7 +2764,7 @@ index a5046b416fa26d51974de0866d3af190ee197c3a..01fe25d7925d7c014524ae9c26b62fad
*/
public void removeResourcePacks();
@@ -1718,7 +2090,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1759,7 +2131,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*
* @param title Title text
* @param subtitle Subtitle text
@ -2773,7 +2773,7 @@ index a5046b416fa26d51974de0866d3af190ee197c3a..01fe25d7925d7c014524ae9c26b62fad
*/
@Deprecated
public void sendTitle(@Nullable String title, @Nullable String subtitle);
@@ -1737,7 +2109,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1778,7 +2150,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.
@ -2783,7 +2783,7 @@ index a5046b416fa26d51974de0866d3af190ee197c3a..01fe25d7925d7c014524ae9c26b62fad
public void sendTitle(@Nullable String title, @Nullable String subtitle, int fadeIn, int stay, int fadeOut);
/**
@@ -1964,6 +2338,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -2005,6 +2379,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*/
public int getClientViewDistance();
@ -2798,7 +2798,7 @@ index a5046b416fa26d51974de0866d3af190ee197c3a..01fe25d7925d7c014524ae9c26b62fad
/**
* Gets the player's estimated ping in milliseconds.
*
@@ -1989,8 +2371,10 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -2030,8 +2412,10 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* they wish.
*
* @return the player's locale
@ -2809,7 +2809,7 @@ index a5046b416fa26d51974de0866d3af190ee197c3a..01fe25d7925d7c014524ae9c26b62fad
public String getLocale();
/**
@@ -2042,6 +2426,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -2083,6 +2467,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*/
public boolean isAllowingServerListings();
@ -2824,7 +2824,7 @@ index a5046b416fa26d51974de0866d3af190ee197c3a..01fe25d7925d7c014524ae9c26b62fad
// Spigot start
public class Spigot extends Entity.Spigot {
@@ -2073,11 +2465,13 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -2114,11 +2506,13 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
throw new UnsupportedOperationException("Not supported yet.");
}
@ -2838,7 +2838,7 @@ index a5046b416fa26d51974de0866d3af190ee197c3a..01fe25d7925d7c014524ae9c26b62fad
@Override
public void sendMessage(@NotNull net.md_5.bungee.api.chat.BaseComponent... components) {
throw new UnsupportedOperationException("Not supported yet.");
@@ -2088,7 +2482,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -2129,7 +2523,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*
* @param position the screen position
* @param component the components to send
@ -2848,7 +2848,7 @@ index a5046b416fa26d51974de0866d3af190ee197c3a..01fe25d7925d7c014524ae9c26b62fad
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.");
}
@@ -2098,7 +2494,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -2139,7 +2535,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*
* @param position the screen position
* @param components the components to send
@ -2858,7 +2858,7 @@ index a5046b416fa26d51974de0866d3af190ee197c3a..01fe25d7925d7c014524ae9c26b62fad
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.");
}
@@ -2109,7 +2507,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -2150,7 +2548,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
@ -2868,7 +2868,7 @@ index a5046b416fa26d51974de0866d3af190ee197c3a..01fe25d7925d7c014524ae9c26b62fad
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.");
}
@@ -2120,7 +2520,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -2161,7 +2561,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
@ -4214,7 +4214,7 @@ index 096e0d60c4542fec66898b6aa8ea9820a1ef483b..3e7f92dc0aea0ea555dd02c50a1102da
+ // Paper end - Adventure
}
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index d80b0a52968920b990a75cff85e436a16d782500..9d327f0832c40d4a8d212346284274f6cf78834f 100644
index 88cdce67e6a55712cb56e946f2f09c82ddbc1d15..e76c847e57f3d32757129d56922862a4202c9d07 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -23,7 +23,7 @@ import org.jetbrains.annotations.Nullable;
@ -4226,7 +4226,7 @@ index d80b0a52968920b990a75cff85e436a16d782500..9d327f0832c40d4a8d212346284274f6
private Material type = Material.AIR;
private int amount = 0;
private MaterialData data = null;
@@ -602,4 +602,21 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
@@ -613,4 +613,21 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
public String getTranslationKey() {
return Bukkit.getUnsafe().getTranslationKey(this);
}
@ -4495,7 +4495,7 @@ index 94852d50e88d0594b84b581cd627174043629995..be7c2cfc757e4dd15927be850739d401
throw new UnsupportedOperationException("Not supported yet.");
}
diff --git a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
index 8ca9605fc1193de9277407f02f755d81190472a4..d7fab2b856f6dfec4f9225c1bdb4254b238d98a4 100644
index 9f159ac909ad5287b719cee331db5c44654ec547..f1fcc844d563a0108230676dec84ef25485756b3 100644
--- a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
+++ b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
@@ -32,6 +32,24 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste