Interface InventoryUtils
public interface InventoryUtils
-
Method Summary
Modifier and TypeMethodDescriptionvoidopenCustomInventory(@NotNull org.bukkit.entity.Player player, @NotNull org.bukkit.inventory.Inventory inventory) Opens anInventoryas a custom inventory.voidopenCustomInventory(@NotNull org.bukkit.entity.Player player, @NotNull org.bukkit.inventory.Inventory inventory, @NotNull net.md_5.bungee.api.chat.BaseComponent[] title) Opens anInventoryas a custom inventory with a title that differs from the actual title of theInventory.voidupdateOpenInventoryTitle(@NotNull org.bukkit.entity.Player player, @NotNull net.md_5.bungee.api.chat.BaseComponent[] title) Changes the title of theInventorythe player is currently viewing.
-
Method Details
-
openCustomInventory
void openCustomInventory(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull org.bukkit.inventory.Inventory inventory) Opens anInventoryas a custom inventory. Internally, this creates a CraftContainer which can save theInventoryView, unlike when using nms Containers, which is the default way for opening Inventories of TileEntities.- Parameters:
player- ThePlayerto open theInventoryforinventory- TheInventory
-
openCustomInventory
void openCustomInventory(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull org.bukkit.inventory.Inventory inventory, @NotNull @NotNull net.md_5.bungee.api.chat.BaseComponent[] title) Opens anInventoryas a custom inventory with a title that differs from the actual title of theInventory. Internally, this creates a CraftContainer which can save theInventoryView, unlike when using nms Containers, which is the default way for opening Inventories of TileEntities.- Parameters:
player- ThePlayerto open theInventoryforinventory- TheInventorytitle- The title of the inventory
-
updateOpenInventoryTitle
void updateOpenInventoryTitle(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull net.md_5.bungee.api.chat.BaseComponent[] title) Changes the title of theInventorythe player is currently viewing.- Parameters:
player- ThePlayertitle- The new title
-