Updated Upstream (Bukkit/CraftBukkit) (#8270)
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: d43a1e72 SPIGOT-2450: Improve scoreboard criteria API, add missing DisplaySlots 9d6e4847 SPIGOT-7122: New Allay Methods from 1.19.1 CraftBukkit Changes: c379a6b4e SPIGOT-2450: Improve scoreboard criteria API, add missing DisplaySlots 051fcced1 SPIGOT-7122: New Allay Methods from 1.19.1
This commit is contained in:
parent
c7e118b394
commit
e6f8284125
91 changed files with 469 additions and 379 deletions
|
@ -670,10 +670,10 @@ index 0000000000000000000000000000000000000000..bff9a6295db367c6b89d69fb55459a40
|
|||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index 5029d98816c137fcc7068bd5596d6a38d96ee877..ba57a093a2df3c65036377e3093eedabeda7c6f5 100644
|
||||
index 72143df182e55b70726b066b6b276021c1f4f4d7..c800da7aba43de995682eb724ccf8b7066d6cad3 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -357,7 +357,9 @@ public final class Bukkit {
|
||||
@@ -358,7 +358,9 @@ public final class Bukkit {
|
||||
*
|
||||
* @param message the message
|
||||
* @return the number of players
|
||||
|
@ -683,7 +683,7 @@ index 5029d98816c137fcc7068bd5596d6a38d96ee877..ba57a093a2df3c65036377e3093eedab
|
|||
public static int broadcastMessage(@NotNull String message) {
|
||||
return server.broadcastMessage(message);
|
||||
}
|
||||
@@ -1071,6 +1073,19 @@ public final class Bukkit {
|
||||
@@ -1072,6 +1074,19 @@ public final class Bukkit {
|
||||
server.shutdown();
|
||||
}
|
||||
|
||||
|
@ -703,7 +703,7 @@ index 5029d98816c137fcc7068bd5596d6a38d96ee877..ba57a093a2df3c65036377e3093eedab
|
|||
/**
|
||||
* Broadcasts the specified message to every user with the given
|
||||
* permission name.
|
||||
@@ -1080,6 +1095,21 @@ public final class Bukkit {
|
||||
@@ -1081,6 +1096,21 @@ public final class Bukkit {
|
||||
* permissibles} must have to receive the broadcast
|
||||
* @return number of message recipients
|
||||
*/
|
||||
|
@ -725,7 +725,7 @@ index 5029d98816c137fcc7068bd5596d6a38d96ee877..ba57a093a2df3c65036377e3093eedab
|
|||
public static int broadcast(@NotNull String message, @NotNull String permission) {
|
||||
return server.broadcast(message, permission);
|
||||
}
|
||||
@@ -1318,6 +1348,7 @@ public final class Bukkit {
|
||||
@@ -1319,6 +1349,7 @@ public final class Bukkit {
|
||||
return server.createInventory(owner, type);
|
||||
}
|
||||
|
||||
|
@ -733,7 +733,7 @@ index 5029d98816c137fcc7068bd5596d6a38d96ee877..ba57a093a2df3c65036377e3093eedab
|
|||
/**
|
||||
* Creates an empty inventory with the specified type and title. If the type
|
||||
* is {@link InventoryType#CHEST}, the new inventory has a size of 27;
|
||||
@@ -1343,6 +1374,38 @@ public final class Bukkit {
|
||||
@@ -1344,6 +1375,38 @@ public final class Bukkit {
|
||||
* @see InventoryType#isCreatable()
|
||||
*/
|
||||
@NotNull
|
||||
|
@ -772,7 +772,7 @@ index 5029d98816c137fcc7068bd5596d6a38d96ee877..ba57a093a2df3c65036377e3093eedab
|
|||
public static Inventory createInventory(@Nullable InventoryHolder owner, @NotNull InventoryType type, @NotNull String title) {
|
||||
return server.createInventory(owner, type, title);
|
||||
}
|
||||
@@ -1361,6 +1424,7 @@ public final class Bukkit {
|
||||
@@ -1362,6 +1425,7 @@ public final class Bukkit {
|
||||
return server.createInventory(owner, size);
|
||||
}
|
||||
|
||||
|
@ -780,7 +780,7 @@ index 5029d98816c137fcc7068bd5596d6a38d96ee877..ba57a093a2df3c65036377e3093eedab
|
|||
/**
|
||||
* Creates an empty inventory of type {@link InventoryType#CHEST} with the
|
||||
* specified size and title.
|
||||
@@ -1373,10 +1437,30 @@ public final class Bukkit {
|
||||
@@ -1374,10 +1438,30 @@ public final class Bukkit {
|
||||
* @throws IllegalArgumentException if the size is not a multiple of 9
|
||||
*/
|
||||
@NotNull
|
||||
|
@ -811,7 +811,7 @@ index 5029d98816c137fcc7068bd5596d6a38d96ee877..ba57a093a2df3c65036377e3093eedab
|
|||
/**
|
||||
* Creates an empty merchant.
|
||||
*
|
||||
@@ -1384,7 +1468,20 @@ public final class Bukkit {
|
||||
@@ -1385,7 +1469,20 @@ public final class Bukkit {
|
||||
* when the merchant inventory is viewed
|
||||
* @return a new merchant
|
||||
*/
|
||||
|
@ -832,7 +832,7 @@ index 5029d98816c137fcc7068bd5596d6a38d96ee877..ba57a093a2df3c65036377e3093eedab
|
|||
public static Merchant createMerchant(@Nullable String title) {
|
||||
return server.createMerchant(title);
|
||||
}
|
||||
@@ -1501,22 +1598,47 @@ public final class Bukkit {
|
||||
@@ -1502,22 +1599,47 @@ public final class Bukkit {
|
||||
return server.isPrimaryThread();
|
||||
}
|
||||
|
||||
|
@ -1005,10 +1005,10 @@ index 803fa0019869127ee8c7e4fb1777a59c43e66f8a..c65f0d6569c130b4920a9e71ad24af64
|
|||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index 6d6810cc51732830ef139f7099fbc5a45b124e8e..5af7da1d3d62cada69240e2d22db2a32278b0074 100644
|
||||
index c0a3b44c728ec98ecce4d1e71746747d87582aa9..4d5c3af2e1f0030aa7415fbe9d11fe3580854fd5 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -58,13 +58,13 @@ import org.jetbrains.annotations.Nullable;
|
||||
@@ -59,13 +59,13 @@ import org.jetbrains.annotations.Nullable;
|
||||
/**
|
||||
* Represents a server implementation.
|
||||
*/
|
||||
|
@ -1024,7 +1024,7 @@ index 6d6810cc51732830ef139f7099fbc5a45b124e8e..5af7da1d3d62cada69240e2d22db2a32
|
|||
*/
|
||||
public static final String BROADCAST_CHANNEL_ADMINISTRATIVE = "bukkit.broadcast.admin";
|
||||
|
||||
@@ -72,7 +72,7 @@ public interface Server extends PluginMessageRecipient {
|
||||
@@ -73,7 +73,7 @@ public interface Server extends PluginMessageRecipient {
|
||||
* Used for all announcement messages, such as informing users that a
|
||||
* player has joined.
|
||||
* <p>
|
||||
|
@ -1033,7 +1033,7 @@ index 6d6810cc51732830ef139f7099fbc5a45b124e8e..5af7da1d3d62cada69240e2d22db2a32
|
|||
*/
|
||||
public static final String BROADCAST_CHANNEL_USERS = "bukkit.broadcast.user";
|
||||
|
||||
@@ -294,7 +294,9 @@ public interface Server extends PluginMessageRecipient {
|
||||
@@ -295,7 +295,9 @@ public interface Server extends PluginMessageRecipient {
|
||||
*
|
||||
* @param message the message
|
||||
* @return the number of players
|
||||
|
@ -1043,7 +1043,7 @@ index 6d6810cc51732830ef139f7099fbc5a45b124e8e..5af7da1d3d62cada69240e2d22db2a32
|
|||
public int broadcastMessage(@NotNull String message);
|
||||
|
||||
/**
|
||||
@@ -910,8 +912,33 @@ public interface Server extends PluginMessageRecipient {
|
||||
@@ -911,8 +913,33 @@ public interface Server extends PluginMessageRecipient {
|
||||
* @param permission the required permission {@link Permissible
|
||||
* permissibles} must have to receive the broadcast
|
||||
* @return number of message recipients
|
||||
|
@ -1077,7 +1077,7 @@ index 6d6810cc51732830ef139f7099fbc5a45b124e8e..5af7da1d3d62cada69240e2d22db2a32
|
|||
|
||||
/**
|
||||
* Gets the player by the given name, regardless if they are offline or
|
||||
@@ -1109,6 +1136,7 @@ public interface Server extends PluginMessageRecipient {
|
||||
@@ -1110,6 +1137,7 @@ public interface Server extends PluginMessageRecipient {
|
||||
@NotNull
|
||||
Inventory createInventory(@Nullable InventoryHolder owner, @NotNull InventoryType type);
|
||||
|
||||
|
@ -1085,7 +1085,7 @@ index 6d6810cc51732830ef139f7099fbc5a45b124e8e..5af7da1d3d62cada69240e2d22db2a32
|
|||
/**
|
||||
* Creates an empty inventory with the specified type and title. If the type
|
||||
* is {@link InventoryType#CHEST}, the new inventory has a size of 27;
|
||||
@@ -1134,6 +1162,36 @@ public interface Server extends PluginMessageRecipient {
|
||||
@@ -1135,6 +1163,36 @@ public interface Server extends PluginMessageRecipient {
|
||||
* @see InventoryType#isCreatable()
|
||||
*/
|
||||
@NotNull
|
||||
|
@ -1122,7 +1122,7 @@ index 6d6810cc51732830ef139f7099fbc5a45b124e8e..5af7da1d3d62cada69240e2d22db2a32
|
|||
Inventory createInventory(@Nullable InventoryHolder owner, @NotNull InventoryType type, @NotNull String title);
|
||||
|
||||
/**
|
||||
@@ -1148,6 +1206,22 @@ public interface Server extends PluginMessageRecipient {
|
||||
@@ -1149,6 +1207,22 @@ public interface Server extends PluginMessageRecipient {
|
||||
@NotNull
|
||||
Inventory createInventory(@Nullable InventoryHolder owner, int size) throws IllegalArgumentException;
|
||||
|
||||
|
@ -1145,7 +1145,7 @@ index 6d6810cc51732830ef139f7099fbc5a45b124e8e..5af7da1d3d62cada69240e2d22db2a32
|
|||
/**
|
||||
* Creates an empty inventory of type {@link InventoryType#CHEST} with the
|
||||
* specified size and title.
|
||||
@@ -1158,10 +1232,13 @@ public interface Server extends PluginMessageRecipient {
|
||||
@@ -1159,10 +1233,13 @@ public interface Server extends PluginMessageRecipient {
|
||||
* viewed
|
||||
* @return a new inventory
|
||||
* @throws IllegalArgumentException if the size is not a multiple of 9
|
||||
|
@ -1159,7 +1159,7 @@ index 6d6810cc51732830ef139f7099fbc5a45b124e8e..5af7da1d3d62cada69240e2d22db2a32
|
|||
/**
|
||||
* Creates an empty merchant.
|
||||
*
|
||||
@@ -1169,7 +1246,18 @@ public interface Server extends PluginMessageRecipient {
|
||||
@@ -1170,7 +1247,18 @@ public interface Server extends PluginMessageRecipient {
|
||||
* when the merchant inventory is viewed
|
||||
* @return a new merchant
|
||||
*/
|
||||
|
@ -1178,7 +1178,7 @@ index 6d6810cc51732830ef139f7099fbc5a45b124e8e..5af7da1d3d62cada69240e2d22db2a32
|
|||
Merchant createMerchant(@Nullable String title);
|
||||
|
||||
/**
|
||||
@@ -1265,20 +1353,41 @@ public interface Server extends PluginMessageRecipient {
|
||||
@@ -1266,20 +1354,41 @@ public interface Server extends PluginMessageRecipient {
|
||||
*/
|
||||
boolean isPrimaryThread();
|
||||
|
||||
|
@ -1220,7 +1220,7 @@ index 6d6810cc51732830ef139f7099fbc5a45b124e8e..5af7da1d3d62cada69240e2d22db2a32
|
|||
String getShutdownMessage();
|
||||
|
||||
/**
|
||||
@@ -1650,7 +1759,9 @@ public interface Server extends PluginMessageRecipient {
|
||||
@@ -1661,7 +1770,9 @@ public interface Server extends PluginMessageRecipient {
|
||||
* Sends the component to the player
|
||||
*
|
||||
* @param component the components to send
|
||||
|
@ -1230,7 +1230,7 @@ index 6d6810cc51732830ef139f7099fbc5a45b124e8e..5af7da1d3d62cada69240e2d22db2a32
|
|||
public void broadcast(@NotNull net.md_5.bungee.api.chat.BaseComponent component) {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
@@ -1659,7 +1770,9 @@ public interface Server extends PluginMessageRecipient {
|
||||
@@ -1670,7 +1781,9 @@ public interface Server extends PluginMessageRecipient {
|
||||
* Sends an array of components as a single message to the player
|
||||
*
|
||||
* @param components the components to send
|
||||
|
@ -4214,7 +4214,7 @@ index 03ca87a1cbace2459174bb7bb8847bda766e80c5..b37938745f916b5f0111b07b1a1c9752
|
|||
* Returns the name of the plugin.
|
||||
* <p>
|
||||
diff --git a/src/main/java/org/bukkit/scoreboard/Objective.java b/src/main/java/org/bukkit/scoreboard/Objective.java
|
||||
index ff3fcb2697eb00736238d0efdcaefe43043334d3..75acd6f8f3d774bb79e8e513125e801c5569a244 100644
|
||||
index 2ff3a11f1f9c115722ea224873e7eb6dc6dc63e6..474274fdffe4041bf4bfb146fcc66424eb5be78a 100644
|
||||
--- a/src/main/java/org/bukkit/scoreboard/Objective.java
|
||||
+++ b/src/main/java/org/bukkit/scoreboard/Objective.java
|
||||
@@ -19,14 +19,35 @@ public interface Objective {
|
||||
|
@ -4264,10 +4264,10 @@ index ff3fcb2697eb00736238d0efdcaefe43043334d3..75acd6f8f3d774bb79e8e513125e801c
|
|||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/scoreboard/Scoreboard.java b/src/main/java/org/bukkit/scoreboard/Scoreboard.java
|
||||
index 5c855dbd0da895392f7a6e92cdc90782baf614ad..1ada91d790abedbc9b3aeb6e96467a0d78560f15 100644
|
||||
index a15183f302de42956d8965efe5f0585fc2cd030e..ef3e729caf430b08cdf2d680d5a137a1ba56c1c5 100644
|
||||
--- a/src/main/java/org/bukkit/scoreboard/Scoreboard.java
|
||||
+++ b/src/main/java/org/bukkit/scoreboard/Scoreboard.java
|
||||
@@ -27,6 +27,48 @@ public interface Scoreboard {
|
||||
@@ -27,6 +27,92 @@ public interface Scoreboard {
|
||||
@Deprecated
|
||||
@NotNull
|
||||
Objective registerNewObjective(@NotNull String name, @NotNull String criteria) throws IllegalArgumentException;
|
||||
|
@ -4288,8 +4288,10 @@ index 5c855dbd0da895392f7a6e92cdc90782baf614ad..1ada91d790abedbc9b3aeb6e96467a0d
|
|||
+ * characters.
|
||||
+ * @throws IllegalArgumentException if an objective by that name already
|
||||
+ * exists
|
||||
+ * @deprecated use {@link #registerNewObjective(String, Criteria, net.kyori.adventure.text.Component)}
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ @Deprecated
|
||||
+ Objective registerNewObjective(@NotNull String name, @NotNull String criteria, @Nullable net.kyori.adventure.text.Component displayName) throws IllegalArgumentException;
|
||||
+ /**
|
||||
+ * Registers an Objective on this Scoreboard
|
||||
|
@ -4309,34 +4311,92 @@ index 5c855dbd0da895392f7a6e92cdc90782baf614ad..1ada91d790abedbc9b3aeb6e96467a0d
|
|||
+ * @throws IllegalArgumentException if renderType is null
|
||||
+ * @throws IllegalArgumentException if an objective by that name already
|
||||
+ * exists
|
||||
+ * @deprecated use {@link #registerNewObjective(String, Criteria, net.kyori.adventure.text.Component, RenderType)}
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ @Deprecated
|
||||
+ Objective registerNewObjective(@NotNull String name, @NotNull String criteria, @Nullable net.kyori.adventure.text.Component displayName, @NotNull RenderType renderType) throws IllegalArgumentException;
|
||||
+ /**
|
||||
+ * Registers an Objective on this Scoreboard
|
||||
+ *
|
||||
+ * @param name Name of the Objective
|
||||
+ * @param criteria Criteria for the Objective
|
||||
+ * @param displayName Name displayed to players for the Objective.
|
||||
+ * @return The registered Objective
|
||||
+ * @throws IllegalArgumentException if name is null
|
||||
+ * @throws IllegalArgumentException if name is longer than 32767
|
||||
+ * characters.
|
||||
+ * @throws IllegalArgumentException if criteria is null
|
||||
+ * @throws IllegalArgumentException if displayName is null
|
||||
+ * @throws IllegalArgumentException if displayName is longer than 128
|
||||
+ * characters.
|
||||
+ * @throws IllegalArgumentException if an objective by that name already
|
||||
+ * exists
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ Objective registerNewObjective(@NotNull String name, @NotNull Criteria criteria, @Nullable net.kyori.adventure.text.Component displayName) throws IllegalArgumentException;
|
||||
+ /**
|
||||
+ * Registers an Objective on this Scoreboard
|
||||
+ *
|
||||
+ * @param name Name of the Objective
|
||||
+ * @param criteria Criteria for the Objective
|
||||
+ * @param displayName Name displayed to players for the Objective.
|
||||
+ * @param renderType Manner of rendering the Objective
|
||||
+ * @return The registered Objective
|
||||
+ * @throws IllegalArgumentException if name is null
|
||||
+ * @throws IllegalArgumentException if name is longer than 32767
|
||||
+ * characters.
|
||||
+ * @throws IllegalArgumentException if criteria is null
|
||||
+ * @throws IllegalArgumentException if displayName is null
|
||||
+ * @throws IllegalArgumentException if displayName is longer than 128
|
||||
+ * characters.
|
||||
+ * @throws IllegalArgumentException if renderType is null
|
||||
+ * @throws IllegalArgumentException if an objective by that name already
|
||||
+ * exists
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ Objective registerNewObjective(@NotNull String name, @NotNull String criteria, @Nullable net.kyori.adventure.text.Component displayName, @NotNull RenderType renderType) throws IllegalArgumentException;
|
||||
+ Objective registerNewObjective(@NotNull String name, @NotNull Criteria criteria, @Nullable net.kyori.adventure.text.Component displayName, @NotNull RenderType renderType) throws IllegalArgumentException;
|
||||
+ // Paper end
|
||||
|
||||
/**
|
||||
* Registers an Objective on this Scoreboard
|
||||
@@ -44,8 +86,10 @@ public interface Scoreboard {
|
||||
* characters.
|
||||
* @throws IllegalArgumentException if an objective by that name already
|
||||
* exists
|
||||
+ * @deprecated in favour of {@link #registerNewObjective(String, String, net.kyori.adventure.text.Component)}
|
||||
@@ -47,6 +133,7 @@ public interface Scoreboard {
|
||||
* @deprecated use {@link #registerNewObjective(String, Criteria, String)}
|
||||
*/
|
||||
@NotNull
|
||||
+ @Deprecated // Paper
|
||||
Objective registerNewObjective(@NotNull String name, @NotNull String criteria, @NotNull String displayName) throws IllegalArgumentException;
|
||||
|
||||
/**
|
||||
@@ -66,8 +110,10 @@ public interface Scoreboard {
|
||||
* @throws IllegalArgumentException if renderType is null
|
||||
* @throws IllegalArgumentException if an objective by that name already
|
||||
* exists
|
||||
+ * @deprecated in favour of {@link #registerNewObjective(String, String, net.kyori.adventure.text.Component, RenderType)}
|
||||
@@ -70,6 +157,7 @@ public interface Scoreboard {
|
||||
* @deprecated use {@link #registerNewObjective(String, Criteria, String, RenderType)}
|
||||
*/
|
||||
@NotNull
|
||||
+ @Deprecated // Paper
|
||||
Objective registerNewObjective(@NotNull String name, @NotNull String criteria, @NotNull String displayName, @NotNull RenderType renderType) throws IllegalArgumentException;
|
||||
|
||||
/**
|
||||
@@ -88,8 +176,10 @@ public interface Scoreboard {
|
||||
* characters.
|
||||
* @throws IllegalArgumentException if an objective by that name already
|
||||
* exists
|
||||
+ * @deprecated in favour of {@link #registerNewObjective(String, Criteria, net.kyori.adventure.text.Component)}
|
||||
*/
|
||||
@NotNull
|
||||
+ @Deprecated // Paper
|
||||
Objective registerNewObjective(@NotNull String name, @NotNull Criteria criteria, @NotNull String displayName) throws IllegalArgumentException;
|
||||
|
||||
/**
|
||||
@@ -110,8 +200,10 @@ public interface Scoreboard {
|
||||
* @throws IllegalArgumentException if renderType is null
|
||||
* @throws IllegalArgumentException if an objective by that name already
|
||||
* exists
|
||||
+ * @deprecated in favour of {@link #registerNewObjective(String, Criteria, net.kyori.adventure.text.Component, RenderType)}
|
||||
*/
|
||||
@NotNull
|
||||
+ @Deprecated // Paper
|
||||
Objective registerNewObjective(@NotNull String name, @NotNull Criteria criteria, @NotNull String displayName, @NotNull RenderType renderType) throws IllegalArgumentException;
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/scoreboard/Team.java b/src/main/java/org/bukkit/scoreboard/Team.java
|
||||
index 0db7fe1b9fe5621ceed3f4f046691e359f5949dd..47b10df619ad2520b9bb673e2220f36391680f1b 100644
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue