Interface InventoryUtils


public interface InventoryUtils
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    openCustomInventory(@NotNull org.bukkit.entity.Player player, @NotNull org.bukkit.inventory.Inventory inventory)
    Opens an Inventory as a custom inventory.
    void
    openCustomInventory(@NotNull org.bukkit.entity.Player player, @NotNull org.bukkit.inventory.Inventory inventory, @NotNull net.md_5.bungee.api.chat.BaseComponent[] title)
    Opens an Inventory as a custom inventory with a title that differs from the actual title of the Inventory.
    void
    updateOpenInventoryTitle(@NotNull org.bukkit.entity.Player player, @NotNull net.md_5.bungee.api.chat.BaseComponent[] title)
    Changes the title of the Inventory the player is currently viewing.
  • Method Details

    • openCustomInventory

      void openCustomInventory(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull org.bukkit.inventory.Inventory inventory)
      Opens an Inventory as a custom inventory. Internally, this creates a CraftContainer which can save the InventoryView, unlike when using nms Containers, which is the default way for opening Inventories of TileEntities.
      Parameters:
      player - The Player to open the Inventory for
      inventory - The Inventory
    • 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 an Inventory as a custom inventory with a title that differs from the actual title of the Inventory. Internally, this creates a CraftContainer which can save the InventoryView, unlike when using nms Containers, which is the default way for opening Inventories of TileEntities.
      Parameters:
      player - The Player to open the Inventory for
      inventory - The Inventory
      title - 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 the Inventory the player is currently viewing.
      Parameters:
      player - The Player
      title - The new title