Updated Upstream (Bukkit/CraftBukkit/Spigot) (#9301)
This commit is contained in:
parent
b48e2e352e
commit
c287e921a9
904 changed files with 1598 additions and 1695 deletions
|
@ -753,10 +753,10 @@ index 0000000000000000000000000000000000000000..6e94562d79206d88b74b53814f9423f1
|
|||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index f8051479fbf0b63f671a343cdb375429a3f7bd2f..fe86d25bfc444ad7143fb60e88bc46ad749c8579 100644
|
||||
index ff86f4f5d7f460e8986c4a4fa483f5b5a1d3a1b6..cd9566aeace9e2e1e01fb014b0c50ba93af305d7 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -379,7 +379,9 @@ public final class Bukkit {
|
||||
@@ -388,7 +388,9 @@ public final class Bukkit {
|
||||
*
|
||||
* @param message the message
|
||||
* @return the number of players
|
||||
|
@ -766,7 +766,7 @@ index f8051479fbf0b63f671a343cdb375429a3f7bd2f..fe86d25bfc444ad7143fb60e88bc46ad
|
|||
public static int broadcastMessage(@NotNull String message) {
|
||||
return server.broadcastMessage(message);
|
||||
}
|
||||
@@ -1095,6 +1097,19 @@ public final class Bukkit {
|
||||
@@ -1104,6 +1106,19 @@ public final class Bukkit {
|
||||
server.shutdown();
|
||||
}
|
||||
|
||||
|
@ -786,7 +786,7 @@ index f8051479fbf0b63f671a343cdb375429a3f7bd2f..fe86d25bfc444ad7143fb60e88bc46ad
|
|||
/**
|
||||
* Broadcasts the specified message to every user with the given
|
||||
* permission name.
|
||||
@@ -1104,6 +1119,21 @@ public final class Bukkit {
|
||||
@@ -1113,6 +1128,21 @@ public final class Bukkit {
|
||||
* permissibles} must have to receive the broadcast
|
||||
* @return number of message recipients
|
||||
*/
|
||||
|
@ -808,7 +808,7 @@ index f8051479fbf0b63f671a343cdb375429a3f7bd2f..fe86d25bfc444ad7143fb60e88bc46ad
|
|||
public static int broadcast(@NotNull String message, @NotNull String permission) {
|
||||
return server.broadcast(message, permission);
|
||||
}
|
||||
@@ -1342,6 +1372,7 @@ public final class Bukkit {
|
||||
@@ -1351,6 +1381,7 @@ public final class Bukkit {
|
||||
return server.createInventory(owner, type);
|
||||
}
|
||||
|
||||
|
@ -816,7 +816,7 @@ index f8051479fbf0b63f671a343cdb375429a3f7bd2f..fe86d25bfc444ad7143fb60e88bc46ad
|
|||
/**
|
||||
* 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;
|
||||
@@ -1367,6 +1398,38 @@ public final class Bukkit {
|
||||
@@ -1376,6 +1407,38 @@ public final class Bukkit {
|
||||
* @see InventoryType#isCreatable()
|
||||
*/
|
||||
@NotNull
|
||||
|
@ -855,7 +855,7 @@ index f8051479fbf0b63f671a343cdb375429a3f7bd2f..fe86d25bfc444ad7143fb60e88bc46ad
|
|||
public static Inventory createInventory(@Nullable InventoryHolder owner, @NotNull InventoryType type, @NotNull String title) {
|
||||
return server.createInventory(owner, type, title);
|
||||
}
|
||||
@@ -1385,6 +1448,7 @@ public final class Bukkit {
|
||||
@@ -1394,6 +1457,7 @@ public final class Bukkit {
|
||||
return server.createInventory(owner, size);
|
||||
}
|
||||
|
||||
|
@ -863,7 +863,7 @@ index f8051479fbf0b63f671a343cdb375429a3f7bd2f..fe86d25bfc444ad7143fb60e88bc46ad
|
|||
/**
|
||||
* Creates an empty inventory of type {@link InventoryType#CHEST} with the
|
||||
* specified size and title.
|
||||
@@ -1397,10 +1461,30 @@ public final class Bukkit {
|
||||
@@ -1406,10 +1470,30 @@ public final class Bukkit {
|
||||
* @throws IllegalArgumentException if the size is not a multiple of 9
|
||||
*/
|
||||
@NotNull
|
||||
|
@ -894,7 +894,7 @@ index f8051479fbf0b63f671a343cdb375429a3f7bd2f..fe86d25bfc444ad7143fb60e88bc46ad
|
|||
/**
|
||||
* Creates an empty merchant.
|
||||
*
|
||||
@@ -1408,7 +1492,20 @@ public final class Bukkit {
|
||||
@@ -1417,7 +1501,20 @@ public final class Bukkit {
|
||||
* when the merchant inventory is viewed
|
||||
* @return a new merchant
|
||||
*/
|
||||
|
@ -915,7 +915,7 @@ index f8051479fbf0b63f671a343cdb375429a3f7bd2f..fe86d25bfc444ad7143fb60e88bc46ad
|
|||
public static Merchant createMerchant(@Nullable String title) {
|
||||
return server.createMerchant(title);
|
||||
}
|
||||
@@ -1525,22 +1622,47 @@ public final class Bukkit {
|
||||
@@ -1534,12 +1631,43 @@ public final class Bukkit {
|
||||
return server.isPrimaryThread();
|
||||
}
|
||||
|
||||
|
@ -928,6 +928,24 @@ index f8051479fbf0b63f671a343cdb375429a3f7bd2f..fe86d25bfc444ad7143fb60e88bc46ad
|
|||
+ @NotNull public static net.kyori.adventure.text.Component motd() {
|
||||
+ return server.motd();
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Set the message that is displayed on the server list.
|
||||
+ *
|
||||
+ * @param motd The message to be displayed
|
||||
+ */
|
||||
+ public static void motd(final net.kyori.adventure.text.@NotNull Component motd) {
|
||||
+ server.motd(motd);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Gets the default message that is displayed when the server is stopped.
|
||||
+ *
|
||||
+ * @return the shutdown message
|
||||
+ */
|
||||
+ public static net.kyori.adventure.text.@Nullable Component shutdownMessage() {
|
||||
+ return server.shutdownMessage();
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
/**
|
||||
|
@ -941,18 +959,17 @@ index f8051479fbf0b63f671a343cdb375429a3f7bd2f..fe86d25bfc444ad7143fb60e88bc46ad
|
|||
public static String getMotd() {
|
||||
return server.getMotd();
|
||||
}
|
||||
|
||||
+ // Paper start
|
||||
+ /**
|
||||
+ * Gets the default message that is displayed when the server is stopped.
|
||||
+ *
|
||||
+ * @return the shutdown message
|
||||
+ */
|
||||
+ public static net.kyori.adventure.text.@Nullable Component shutdownMessage() {
|
||||
+ return server.shutdownMessage();
|
||||
+ }
|
||||
+ // Paper end
|
||||
/**
|
||||
@@ -1548,7 +1676,9 @@ public final class Bukkit {
|
||||
* Set the message that is displayed on the server list.
|
||||
*
|
||||
* @param motd The message to be displayed
|
||||
+ * @deprecated in favour of {@link #motd(net.kyori.adventure.text.Component)}
|
||||
*/
|
||||
+ @Deprecated // Paper
|
||||
public static void setMotd(@NotNull String motd) {
|
||||
server.setMotd(motd);
|
||||
}
|
||||
@@ -1557,8 +1687,10 @@ public final class Bukkit {
|
||||
* Gets the default message that is displayed when the server is stopped.
|
||||
*
|
||||
* @return the shutdown message
|
||||
|
@ -1132,7 +1149,7 @@ index c559f38fdb92cfee9f2e0ffb7088d1cf74a7f73d..a42f1d53340e4073038d46b7fabf5d44
|
|||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index 6f97c680535fabf88509a49ec21704eb527b2add..b516021b6772d8266ed72b73170510ca7bfedba7 100644
|
||||
index d3684494b81d06b82eab72c6cfbd76d36dfc0e97..e359bc68007fbe62270ee62be762f844cbafe2d9 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -60,13 +60,13 @@ import org.jetbrains.annotations.Nullable;
|
||||
|
@ -1160,7 +1177,7 @@ index 6f97c680535fabf88509a49ec21704eb527b2add..b516021b6772d8266ed72b73170510ca
|
|||
*/
|
||||
public static final String BROADCAST_CHANNEL_USERS = "bukkit.broadcast.user";
|
||||
|
||||
@@ -320,7 +320,9 @@ public interface Server extends PluginMessageRecipient {
|
||||
@@ -327,7 +327,9 @@ public interface Server extends PluginMessageRecipient {
|
||||
*
|
||||
* @param message the message
|
||||
* @return the number of players
|
||||
|
@ -1170,7 +1187,7 @@ index 6f97c680535fabf88509a49ec21704eb527b2add..b516021b6772d8266ed72b73170510ca
|
|||
public int broadcastMessage(@NotNull String message);
|
||||
|
||||
/**
|
||||
@@ -938,8 +940,33 @@ public interface Server extends PluginMessageRecipient {
|
||||
@@ -945,8 +947,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
|
||||
|
@ -1204,21 +1221,11 @@ index 6f97c680535fabf88509a49ec21704eb527b2add..b516021b6772d8266ed72b73170510ca
|
|||
|
||||
/**
|
||||
* Gets the player by the given name, regardless if they are offline or
|
||||
@@ -1137,6 +1164,7 @@ public interface Server extends PluginMessageRecipient {
|
||||
@@ -1144,6 +1171,35 @@ public interface Server extends PluginMessageRecipient {
|
||||
@NotNull
|
||||
Inventory createInventory(@Nullable InventoryHolder owner, @NotNull InventoryType type);
|
||||
|
||||
+ // Paper start
|
||||
/**
|
||||
* 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;
|
||||
@@ -1162,6 +1190,36 @@ public interface Server extends PluginMessageRecipient {
|
||||
* @see InventoryType#isCreatable()
|
||||
*/
|
||||
@NotNull
|
||||
+ Inventory createInventory(@Nullable InventoryHolder owner, @NotNull InventoryType type, net.kyori.adventure.text.@NotNull Component title);
|
||||
+ // Paper end
|
||||
+
|
||||
+ /**
|
||||
+ * 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;
|
||||
|
@ -1240,16 +1247,29 @@ index 6f97c680535fabf88509a49ec21704eb527b2add..b516021b6772d8266ed72b73170510ca
|
|||
+ * @return The new inventory.
|
||||
+ * @throws IllegalArgumentException if the {@link InventoryType} cannot be
|
||||
+ * viewed.
|
||||
+ * @deprecated in favour of {@link #createInventory(InventoryHolder, InventoryType, net.kyori.adventure.text.Component)}
|
||||
+ *
|
||||
+ * @see InventoryType#isCreatable()
|
||||
+ */
|
||||
+ @Deprecated // Paper
|
||||
+ @NotNull
|
||||
+ Inventory createInventory(@Nullable InventoryHolder owner, @NotNull InventoryType type, net.kyori.adventure.text.@NotNull Component title);
|
||||
+ // Paper end
|
||||
+
|
||||
/**
|
||||
* 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;
|
||||
@@ -1165,9 +1221,11 @@ public interface Server extends PluginMessageRecipient {
|
||||
* @return The new inventory.
|
||||
* @throws IllegalArgumentException if the {@link InventoryType} cannot be
|
||||
* viewed.
|
||||
+ * @deprecated in favour of {@link #createInventory(InventoryHolder, InventoryType, net.kyori.adventure.text.Component)}
|
||||
*
|
||||
* @see InventoryType#isCreatable()
|
||||
*/
|
||||
+ @Deprecated // Paper
|
||||
@NotNull
|
||||
Inventory createInventory(@Nullable InventoryHolder owner, @NotNull InventoryType type, @NotNull String title);
|
||||
|
||||
/**
|
||||
@@ -1176,6 +1234,22 @@ public interface Server extends PluginMessageRecipient {
|
||||
@@ -1183,6 +1241,22 @@ public interface Server extends PluginMessageRecipient {
|
||||
@NotNull
|
||||
Inventory createInventory(@Nullable InventoryHolder owner, int size) throws IllegalArgumentException;
|
||||
|
||||
|
@ -1272,7 +1292,7 @@ index 6f97c680535fabf88509a49ec21704eb527b2add..b516021b6772d8266ed72b73170510ca
|
|||
/**
|
||||
* Creates an empty inventory of type {@link InventoryType#CHEST} with the
|
||||
* specified size and title.
|
||||
@@ -1186,10 +1260,13 @@ public interface Server extends PluginMessageRecipient {
|
||||
@@ -1193,18 +1267,32 @@ public interface Server extends PluginMessageRecipient {
|
||||
* viewed
|
||||
* @return a new inventory
|
||||
* @throws IllegalArgumentException if the size is not a multiple of 9
|
||||
|
@ -1282,15 +1302,6 @@ index 6f97c680535fabf88509a49ec21704eb527b2add..b516021b6772d8266ed72b73170510ca
|
|||
@NotNull
|
||||
Inventory createInventory(@Nullable InventoryHolder owner, int size, @NotNull String title) throws IllegalArgumentException;
|
||||
|
||||
+ // Paper start
|
||||
/**
|
||||
* Creates an empty merchant.
|
||||
*
|
||||
@@ -1197,7 +1274,18 @@ public interface Server extends PluginMessageRecipient {
|
||||
* when the merchant inventory is viewed
|
||||
* @return a new merchant
|
||||
*/
|
||||
+ @NotNull Merchant createMerchant(net.kyori.adventure.text.@Nullable Component title);
|
||||
+ // Paper start
|
||||
+ /**
|
||||
+ * Creates an empty merchant.
|
||||
|
@ -1298,14 +1309,23 @@ index 6f97c680535fabf88509a49ec21704eb527b2add..b516021b6772d8266ed72b73170510ca
|
|||
+ * @param title the title of the corresponding merchant inventory, displayed
|
||||
+ * when the merchant inventory is viewed
|
||||
+ * @return a new merchant
|
||||
+ * @deprecated in favour of {@link #createMerchant(net.kyori.adventure.text.Component)}
|
||||
+ */
|
||||
+ @NotNull Merchant createMerchant(net.kyori.adventure.text.@Nullable Component title);
|
||||
+ // Paper start
|
||||
/**
|
||||
* Creates an empty merchant.
|
||||
*
|
||||
* @param title the title of the corresponding merchant inventory, displayed
|
||||
* when the merchant inventory is viewed
|
||||
* @return a new merchant
|
||||
+ * @deprecated in favour of {@link #createMerchant(net.kyori.adventure.text.Component)}
|
||||
*/
|
||||
@NotNull
|
||||
+ @Deprecated // Paper
|
||||
Merchant createMerchant(@Nullable String title);
|
||||
|
||||
/**
|
||||
@@ -1293,20 +1381,41 @@ public interface Server extends PluginMessageRecipient {
|
||||
@@ -1300,27 +1388,56 @@ public interface Server extends PluginMessageRecipient {
|
||||
*/
|
||||
boolean isPrimaryThread();
|
||||
|
||||
|
@ -1316,6 +1336,20 @@ index 6f97c680535fabf88509a49ec21704eb527b2add..b516021b6772d8266ed72b73170510ca
|
|||
+ * @return the server's MOTD
|
||||
+ */
|
||||
+ net.kyori.adventure.text.@NotNull Component motd();
|
||||
+
|
||||
+ /**
|
||||
+ * Set the message that is displayed on the server list.
|
||||
+ *
|
||||
+ * @param motd The message to be displayed
|
||||
+ */
|
||||
+ void motd(final net.kyori.adventure.text.@NotNull Component motd);
|
||||
+
|
||||
+ /**
|
||||
+ * Gets the default message that is displayed when the server is stopped.
|
||||
+ *
|
||||
+ * @return the shutdown message
|
||||
+ */
|
||||
+ net.kyori.adventure.text.@Nullable Component shutdownMessage();
|
||||
+ // Paper end
|
||||
+
|
||||
/**
|
||||
|
@ -1328,14 +1362,15 @@ index 6f97c680535fabf88509a49ec21704eb527b2add..b516021b6772d8266ed72b73170510ca
|
|||
+ @Deprecated // Paper
|
||||
String getMotd();
|
||||
|
||||
+ // Paper start
|
||||
+ /**
|
||||
+ * Gets the default message that is displayed when the server is stopped.
|
||||
+ *
|
||||
+ * @return the shutdown message
|
||||
+ */
|
||||
+ net.kyori.adventure.text.@Nullable Component shutdownMessage();
|
||||
+ // Paper end
|
||||
/**
|
||||
* Set the message that is displayed on the server list.
|
||||
*
|
||||
* @param motd The message to be displayed
|
||||
+ * @deprecated in favour of {@link #motd(net.kyori.adventure.text.Component)}
|
||||
*/
|
||||
+ @Deprecated // Paper
|
||||
void setMotd(@NotNull String motd);
|
||||
|
||||
/**
|
||||
* Gets the default message that is displayed when the server is stopped.
|
||||
*
|
||||
|
@ -1347,7 +1382,7 @@ index 6f97c680535fabf88509a49ec21704eb527b2add..b516021b6772d8266ed72b73170510ca
|
|||
String getShutdownMessage();
|
||||
|
||||
/**
|
||||
@@ -1688,7 +1797,9 @@ public interface Server extends PluginMessageRecipient {
|
||||
@@ -1702,7 +1819,9 @@ public interface Server extends PluginMessageRecipient {
|
||||
* Sends the component to the player
|
||||
*
|
||||
* @param component the components to send
|
||||
|
@ -1357,7 +1392,7 @@ index 6f97c680535fabf88509a49ec21704eb527b2add..b516021b6772d8266ed72b73170510ca
|
|||
public void broadcast(@NotNull net.md_5.bungee.api.chat.BaseComponent component) {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
@@ -1697,7 +1808,9 @@ public interface Server extends PluginMessageRecipient {
|
||||
@@ -1711,7 +1830,9 @@ public interface Server extends PluginMessageRecipient {
|
||||
* Sends an array of components as a single message to the player
|
||||
*
|
||||
* @param components the components to send
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue