mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-04 14:12:20 -07:00
MenuType API addition InventoryView Builders (#11816)
This commit is contained in:
@@ -40,6 +40,7 @@ import org.bukkit.inventory.InventoryHolder;
|
||||
import org.bukkit.inventory.ItemCraftResult;
|
||||
import org.bukkit.inventory.ItemFactory;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.MenuType;
|
||||
import org.bukkit.inventory.Merchant;
|
||||
import org.bukkit.inventory.Recipe;
|
||||
import org.bukkit.inventory.meta.ItemMeta;
|
||||
@@ -1925,7 +1926,10 @@ public final class Bukkit {
|
||||
* @param title the title of the corresponding merchant inventory, displayed
|
||||
* when the merchant inventory is viewed
|
||||
* @return a new merchant
|
||||
* @deprecated The title parameter is no-longer needed when used with
|
||||
* {@link MenuType#MERCHANT} and {@link MenuType.Typed#builder()}.
|
||||
*/
|
||||
@Deprecated(since = "1.21.4")
|
||||
public static @NotNull Merchant createMerchant(net.kyori.adventure.text.@Nullable Component title) {
|
||||
return server.createMerchant(title);
|
||||
}
|
||||
@@ -1936,7 +1940,8 @@ public final class Bukkit {
|
||||
* @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)}
|
||||
* @deprecated in favour of {@link #createMerchant(net.kyori.adventure.text.Component)}. The title parameter is
|
||||
* no-longer needed when used with {@link MenuType#MERCHANT} and {@link MenuType.Typed#builder()}
|
||||
*/
|
||||
@NotNull
|
||||
@Deprecated // Paper
|
||||
@@ -1944,6 +1949,16 @@ public final class Bukkit {
|
||||
return server.createMerchant(title);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an empty merchant.
|
||||
*
|
||||
* @return a new merchant
|
||||
*/
|
||||
@NotNull
|
||||
public static Merchant createMerchant() {
|
||||
return server.createMerchant();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the amount of consecutive neighbor updates before skipping
|
||||
* additional ones.
|
||||
|
Reference in New Issue
Block a user