Package com.enhancedechest.gui
Class ChestListHolder
java.lang.Object
com.enhancedechest.gui.ChestListHolder
- All Implemented Interfaces:
org.bukkit.inventory.InventoryHolder
Marker holder for one page of the simple
/eclist inventory menu — the alternative to the Dialog-API
list, selected with enderchest.chest-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 Summary
ConstructorsConstructorDescriptionChestListHolder(UUID owner, @Nullable org.bukkit.Location sourceBlock, Map<Integer, Integer> slotIndex, Map<Integer, Integer> navSlots, List<ChestSummary> chests, int page) -
Method Summary
Modifier and TypeMethodDescription@Nullable IntegerchestIndexAt(int slot) 1-based chest index for a clicked menu slot, or null if that slot holds no chest icon.@NotNull org.bukkit.inventory.Inventory@Nullable IntegernavTargetAt(int slot) 0-based page a clicked slot turns to, or null if that slot is not a page arrow.
-
Constructor Details
-
ChestListHolder
-
-
Method Details
-
chestIndexAt
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:
getInventoryin interfaceorg.bukkit.inventory.InventoryHolder