Updated Upstream (Bukkit/CraftBukkit) (#8823)

This commit is contained in:
Jake Potrebic 2023-02-07 07:55:53 -08:00 committed by GitHub
parent b9b4c9a314
commit 57f1157871
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
430 changed files with 270 additions and 303 deletions

View file

@ -1048,10 +1048,10 @@ index fee814e01a653d2b53c56e8b566383ca44aa5346..b71b780792b672b37c8fe65d43489b86
public void setCustomName(@Nullable String name);
}
diff --git a/src/main/java/org/bukkit/NamespacedKey.java b/src/main/java/org/bukkit/NamespacedKey.java
index 803fa0019869127ee8c7e4fb1777a59c43e66f8a..c65f0d6569c130b4920a9e71ad24af6427f1f030 100644
index c559f38fdb92cfee9f2e0ffb7088d1cf74a7f73d..f4540ceee4937a496a10a08429093adf8ae2cfc0 100644
--- a/src/main/java/org/bukkit/NamespacedKey.java
+++ b/src/main/java/org/bukkit/NamespacedKey.java
@@ -19,7 +19,7 @@ import org.jetbrains.annotations.Nullable;
@@ -18,7 +18,7 @@ import org.jetbrains.annotations.Nullable;
* underscores, hyphens, and forward slashes.
*
*/
@ -1060,7 +1060,7 @@ index 803fa0019869127ee8c7e4fb1777a59c43e66f8a..c65f0d6569c130b4920a9e71ad24af64
/**
* The namespace representing all inbuilt keys.
@@ -212,4 +212,24 @@ public final class NamespacedKey {
@@ -246,4 +246,24 @@ public final class NamespacedKey {
public static NamespacedKey fromString(@NotNull String key) {
return fromString(key, null);
}
@ -1416,7 +1416,7 @@ index efb97712cc9dc7c1e12a59f5b94e4f2ad7c6b7d8..3024468af4c073324e536c1cb26beffb
return warning == null || warning.value();
}
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 3a5251cb3b45f50d1ea4ab2c9b430e990cdfc8d5..425cad3b6c365560f6614767d763ad61a92e6722 100644
index 98b9818fa10be7a36e862b3afafc9ed2d0a64209..ed57cd69d88504b78782271c9a3d423a29471674 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -43,7 +43,7 @@ import org.jetbrains.annotations.Nullable;
@ -1921,7 +1921,7 @@ index 8489a0b009223b727b0393840374550a1cc192ff..bdcf5219ff1e4d4c0dc8a3423bc17b45
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index a060b8b022c600e43aaef79a2942a384d47b300d..5a2c072c95cad8485e281e080e5e606194b05b30 100644
index 74152aa68883973c896c35f538c402fce377144b..4053c086a9ef9aa071402818672643bd800851d6 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;
@ -2099,7 +2099,7 @@ index a060b8b022c600e43aaef79a2942a384d47b300d..5a2c072c95cad8485e281e080e5e6061
/**
* Says a message (or runs a command).
*
@@ -538,6 +624,90 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -563,6 +649,90 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*/
public void sendEquipmentChange(@NotNull LivingEntity entity, @NotNull EquipmentSlot slot, @NotNull ItemStack item);
@ -2190,7 +2190,7 @@ index a060b8b022c600e43aaef79a2942a384d47b300d..5a2c072c95cad8485e281e080e5e6061
/**
* 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.
@@ -552,7 +722,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -577,7 +747,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
@ -2200,7 +2200,7 @@ index a060b8b022c600e43aaef79a2942a384d47b300d..5a2c072c95cad8485e281e080e5e6061
public void sendSignChange(@NotNull Location loc, @Nullable String[] lines) throws IllegalArgumentException;
/**
@@ -571,7 +743,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -596,7 +768,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
@ -2210,7 +2210,7 @@ index a060b8b022c600e43aaef79a2942a384d47b300d..5a2c072c95cad8485e281e080e5e6061
public void sendSignChange(@NotNull Location loc, @Nullable String[] lines, @NotNull DyeColor dyeColor) throws IllegalArgumentException;
/**
@@ -591,7 +765,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -616,7 +790,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
@ -2220,7 +2220,7 @@ index a060b8b022c600e43aaef79a2942a384d47b300d..5a2c072c95cad8485e281e080e5e6061
public void sendSignChange(@NotNull Location loc, @Nullable String[] lines, @NotNull DyeColor dyeColor, boolean hasGlowingText) throws IllegalArgumentException;
/**
@@ -1023,6 +1199,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1048,6 +1224,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* pack correctly.
* </ul>
*
@ -2228,7 +2228,7 @@ index a060b8b022c600e43aaef79a2942a384d47b300d..5a2c072c95cad8485e281e080e5e6061
* @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.
@@ -1079,8 +1256,10 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1104,8 +1281,10 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @throws IllegalArgumentException Thrown if the hash is not 20 bytes
* long.
*/
@ -2239,7 +2239,7 @@ index a060b8b022c600e43aaef79a2942a384d47b300d..5a2c072c95cad8485e281e080e5e6061
/**
* Request that the player's client download and switch resource packs.
* <p>
@@ -1116,6 +1295,54 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1141,6 +1320,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!
@ -2294,7 +2294,7 @@ index a060b8b022c600e43aaef79a2942a384d47b300d..5a2c072c95cad8485e281e080e5e6061
* @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.
@@ -1170,8 +1397,57 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1195,8 +1422,57 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @throws IllegalArgumentException Thrown if the hash is not 20 bytes
* long.
*/
@ -2352,7 +2352,7 @@ index a060b8b022c600e43aaef79a2942a384d47b300d..5a2c072c95cad8485e281e080e5e6061
/**
* Gets the Scoreboard displayed to this player
*
@@ -1287,7 +1563,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1312,7 +1588,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*
* @param title Title text
* @param subtitle Subtitle text
@ -2361,7 +2361,7 @@ index a060b8b022c600e43aaef79a2942a384d47b300d..5a2c072c95cad8485e281e080e5e6061
*/
@Deprecated
public void sendTitle(@Nullable String title, @Nullable String subtitle);
@@ -1306,7 +1582,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1331,7 +1607,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.
@ -2371,7 +2371,7 @@ index a060b8b022c600e43aaef79a2942a384d47b300d..5a2c072c95cad8485e281e080e5e6061
public void sendTitle(@Nullable String title, @Nullable String subtitle, int fadeIn, int stay, int fadeOut);
/**
@@ -1533,6 +1811,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1558,6 +1836,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*/
public int getClientViewDistance();
@ -2386,7 +2386,7 @@ index a060b8b022c600e43aaef79a2942a384d47b300d..5a2c072c95cad8485e281e080e5e6061
/**
* Gets the player's estimated ping in milliseconds.
*
@@ -1558,8 +1844,10 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1583,8 +1869,10 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* they wish.
*
* @return the player's locale
@ -2397,7 +2397,7 @@ index a060b8b022c600e43aaef79a2942a384d47b300d..5a2c072c95cad8485e281e080e5e6061
public String getLocale();
/**
@@ -1601,6 +1889,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1626,6 +1914,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*/
public boolean isAllowingServerListings();
@ -2412,7 +2412,7 @@ index a060b8b022c600e43aaef79a2942a384d47b300d..5a2c072c95cad8485e281e080e5e6061
// Spigot start
public class Spigot extends Entity.Spigot {
@@ -1655,11 +1951,13 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1680,11 +1976,13 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
throw new UnsupportedOperationException("Not supported yet.");
}
@ -2426,7 +2426,7 @@ index a060b8b022c600e43aaef79a2942a384d47b300d..5a2c072c95cad8485e281e080e5e6061
@Override
public void sendMessage(@NotNull net.md_5.bungee.api.chat.BaseComponent... components) {
throw new UnsupportedOperationException("Not supported yet.");
@@ -1670,7 +1968,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1695,7 +1993,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*
* @param position the screen position
* @param component the components to send
@ -2436,7 +2436,7 @@ index a060b8b022c600e43aaef79a2942a384d47b300d..5a2c072c95cad8485e281e080e5e6061
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.");
}
@@ -1680,7 +1980,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1705,7 +2005,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*
* @param position the screen position
* @param components the components to send
@ -2446,7 +2446,7 @@ index a060b8b022c600e43aaef79a2942a384d47b300d..5a2c072c95cad8485e281e080e5e6061
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.");
}
@@ -1691,7 +1993,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1716,7 +2018,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
@ -2456,7 +2456,7 @@ index a060b8b022c600e43aaef79a2942a384d47b300d..5a2c072c95cad8485e281e080e5e6061
public void sendMessage(@NotNull net.md_5.bungee.api.ChatMessageType position, @Nullable UUID sender, @NotNull net.md_5.bungee.api.chat.BaseComponent component) {
throw new UnsupportedOperationException("Not supported yet.");
}
@@ -1702,7 +2006,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1727,7 +2031,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