Updated Upstream (Bukkit/CraftBukkit/Spigot) (#9301)

This commit is contained in:
Jake Potrebic
2023-06-12 16:51:45 -07:00
parent b835c02322
commit aa5e9d1d49
61 changed files with 322 additions and 419 deletions

View File

@@ -928,6 +928,24 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ @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 0000000000000000000000000000000000000000..00000000000000000000000000000000
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
/**
@@ -0,0 +0,0 @@ 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);
}
@@ -0,0 +0,0 @@ public final class Bukkit {
* Gets the default message that is displayed when the server is stopped.
*
* @return the shutdown message
@@ -1209,16 +1226,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
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;
@@ -0,0 +0,0 @@ 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,15 +1247,28 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ * @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;
@@ -0,0 +0,0 @@ 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);
/**
@@ -0,0 +0,0 @@ public interface Server extends PluginMessageRecipient {
@NotNull
Inventory createInventory(@Nullable InventoryHolder owner, int size) throws IllegalArgumentException;
@@ -1282,15 +1302,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
@NotNull
Inventory createInventory(@Nullable InventoryHolder owner, int size, @NotNull String title) throws IllegalArgumentException;
+ // Paper start
/**
* Creates an empty merchant.
*
@@ -0,0 +0,0 @@ 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,8 +1309,17 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ * @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);
@@ -1316,6 +1336,20 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ * @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 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ @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.
*