Class ChestListHolder

java.lang.Object
com.enhancedechest.gui.ChestListHolder
All Implemented Interfaces:
org.bukkit.inventory.InventoryHolder

public final class ChestListHolder extends Object implements org.bukkit.inventory.InventoryHolder
Marker holder for the simple 27-slot /eclist inventory menu — the alternative to the Dialog-API list, selected with enderchest.list-menu: inventory. Unlike EnderChestHolder this backs a read-only chooser, not a storage chest: clicking a chest icon opens that chest and every other interaction is cancelled, so the display items can neither be taken nor items dumped into the empty cells. Listeners identify it with inventory.getHolder() instanceof ChestListHolder.
  • Constructor Details

    • ChestListHolder

      public ChestListHolder(UUID owner, @Nullable @Nullable org.bukkit.Location sourceBlock, Map<Integer,Integer> slotIndex)
  • Method Details

    • chestIndexAt

      @Nullable public @Nullable Integer chestIndexAt(int slot)
      1-based chest index for a clicked menu slot, or null if that slot holds no chest icon.
    • getInventory

      @NotNull public @NotNull org.bukkit.inventory.Inventory getInventory()
      Specified by:
      getInventory in interface org.bukkit.inventory.InventoryHolder