Updated Upstream (Bukkit/CraftBukkit) (#9342)

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:
fdff0cd4 PR-869: Add Enderman#teleport and Enderman#teleportTowards
dfd86ee7 Improve sendSignChange and related documentation
beced2b2 PR-867: Add Player#sendBlockUpdate to send tile entity updates

CraftBukkit Changes:
ad6d0cffb SPIGOT-7394: Fix another issue with sendSignChange
66c5ce4c7 SPIGOT-7391: Preserve vanilla sign json where not modified by event
ae3824f94 PR-1204: Add Enderman#teleport and Enderman#teleportTowards
5863a2eae Fix sendSignChange not working
4a7eadc97 PR-1201: Add Player#sendBlockUpdate to send tile entity updates
789324e30 Work around issue placing decorated pots
This commit is contained in:
Jake Potrebic 2023-06-16 03:28:31 -07:00 committed by GitHub
parent f7b386ddc7
commit 41e6f20420
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
88 changed files with 271 additions and 305 deletions

View file

@ -2080,10 +2080,10 @@ index f3afe67f0832cb828d25be3654518ff73a80b0e1..598abaa82c634178043a29f6caa6ac52
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..b7512fa8fa65a2832cd2123ef30b47cd102492cf 100644
index 6860eb5e85d115d1c00ace8c646ccc080bff29ce..84e63caeabe3e44381a464bde47bcadaddba9d43 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -42,7 +42,41 @@ import org.jetbrains.annotations.Nullable;
@@ -43,7 +43,41 @@ import org.jetbrains.annotations.Nullable;
/**
* Represents a player, connected or not
*/
@ -2126,7 +2126,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..b7512fa8fa65a2832cd2123ef30b47cd
/**
* {@inheritDoc}
@@ -59,7 +93,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -60,7 +94,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* places defined by plugins.
*
* @return the friendly name
@ -2136,7 +2136,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..b7512fa8fa65a2832cd2123ef30b47cd
@NotNull
public String getDisplayName();
@@ -71,15 +107,50 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -72,15 +108,50 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* places defined by plugins.
*
* @param name The new display name.
@ -2187,7 +2187,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..b7512fa8fa65a2832cd2123ef30b47cd
public String getPlayerListName();
/**
@@ -88,14 +159,18 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -89,14 +160,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
@ -2206,7 +2206,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..b7512fa8fa65a2832cd2123ef30b47cd
@Nullable
public String getPlayerListHeader();
@@ -103,7 +178,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -104,7 +179,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
@ -2216,7 +2216,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..b7512fa8fa65a2832cd2123ef30b47cd
@Nullable
public String getPlayerListFooter();
@@ -111,14 +188,18 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -112,14 +189,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
@ -2235,7 +2235,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..b7512fa8fa65a2832cd2123ef30b47cd
public void setPlayerListFooter(@Nullable String footer);
/**
@@ -127,7 +208,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -128,7 +209,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
@ -2245,7 +2245,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..b7512fa8fa65a2832cd2123ef30b47cd
public void setPlayerListHeaderFooter(@Nullable String header, @Nullable String footer);
/**
@@ -165,9 +248,25 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -166,9 +249,25 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* Kicks player with custom kick message.
*
* @param message kick message
@ -2271,7 +2271,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..b7512fa8fa65a2832cd2123ef30b47cd
/**
* Says a message (or runs a command).
*
@@ -632,6 +731,90 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -633,6 +732,90 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*/
public void sendEquipmentChange(@NotNull LivingEntity entity, @NotNull Map<EquipmentSlot, ItemStack> items);
@ -2362,7 +2362,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..b7512fa8fa65a2832cd2123ef30b47cd
/**
* 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.
@@ -646,7 +829,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -650,7 +833,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
@ -2372,7 +2372,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..b7512fa8fa65a2832cd2123ef30b47cd
public void sendSignChange(@NotNull Location loc, @Nullable String[] lines) throws IllegalArgumentException;
/**
@@ -665,7 +850,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -672,7 +857,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
@ -2382,7 +2382,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..b7512fa8fa65a2832cd2123ef30b47cd
public void sendSignChange(@NotNull Location loc, @Nullable String[] lines, @NotNull DyeColor dyeColor) throws IllegalArgumentException;
/**
@@ -685,7 +872,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -695,7 +882,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
@ -2392,7 +2392,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..b7512fa8fa65a2832cd2123ef30b47cd
public void sendSignChange(@NotNull Location loc, @Nullable String[] lines, @NotNull DyeColor dyeColor, boolean hasGlowingText) throws IllegalArgumentException;
/**
@@ -1181,6 +1370,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1211,6 +1400,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* pack correctly.
* </ul>
*
@ -2400,7 +2400,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..b7512fa8fa65a2832cd2123ef30b47cd
* @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.
@@ -1237,8 +1427,57 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1267,8 +1457,57 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @throws IllegalArgumentException Thrown if the hash is not 20 bytes
* long.
*/
@ -2458,7 +2458,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..b7512fa8fa65a2832cd2123ef30b47cd
/**
* Request that the player's client download and switch resource packs.
* <p>
@@ -1268,6 +1507,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1298,6 +1537,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* pack correctly.
* </ul>
*
@ -2466,7 +2466,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..b7512fa8fa65a2832cd2123ef30b47cd
* @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.
@@ -1328,8 +1568,57 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1358,8 +1598,57 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @throws IllegalArgumentException Thrown if the hash is not 20 bytes
* long.
*/
@ -2524,7 +2524,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..b7512fa8fa65a2832cd2123ef30b47cd
/**
* Gets the Scoreboard displayed to this player
*
@@ -1445,7 +1734,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1475,7 +1764,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*
* @param title Title text
* @param subtitle Subtitle text
@ -2533,7 +2533,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..b7512fa8fa65a2832cd2123ef30b47cd
*/
@Deprecated
public void sendTitle(@Nullable String title, @Nullable String subtitle);
@@ -1464,7 +1753,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1494,7 +1783,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.
@ -2543,7 +2543,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..b7512fa8fa65a2832cd2123ef30b47cd
public void sendTitle(@Nullable String title, @Nullable String subtitle, int fadeIn, int stay, int fadeOut);
/**
@@ -1691,6 +1982,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1721,6 +2012,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*/
public int getClientViewDistance();
@ -2558,7 +2558,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..b7512fa8fa65a2832cd2123ef30b47cd
/**
* Gets the player's estimated ping in milliseconds.
*
@@ -1716,8 +2015,10 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1746,8 +2045,10 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* they wish.
*
* @return the player's locale
@ -2569,7 +2569,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..b7512fa8fa65a2832cd2123ef30b47cd
public String getLocale();
/**
@@ -1769,6 +2070,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1799,6 +2100,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*/
public boolean isAllowingServerListings();
@ -2584,7 +2584,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..b7512fa8fa65a2832cd2123ef30b47cd
// Spigot start
public class Spigot extends Entity.Spigot {
@@ -1800,11 +2109,13 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1830,11 +2139,13 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
throw new UnsupportedOperationException("Not supported yet.");
}
@ -2598,7 +2598,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..b7512fa8fa65a2832cd2123ef30b47cd
@Override
public void sendMessage(@NotNull net.md_5.bungee.api.chat.BaseComponent... components) {
throw new UnsupportedOperationException("Not supported yet.");
@@ -1815,7 +2126,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1845,7 +2156,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*
* @param position the screen position
* @param component the components to send
@ -2608,7 +2608,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..b7512fa8fa65a2832cd2123ef30b47cd
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.");
}
@@ -1825,7 +2138,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1855,7 +2168,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*
* @param position the screen position
* @param components the components to send
@ -2618,7 +2618,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..b7512fa8fa65a2832cd2123ef30b47cd
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.");
}
@@ -1836,7 +2151,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1866,7 +2181,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
@ -2628,7 +2628,7 @@ index 73e4d48cd2e424a7ecd6fc37d4c020aca7a6a726..b7512fa8fa65a2832cd2123ef30b47cd
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.");
}
@@ -1847,7 +2164,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1877,7 +2194,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