java.lang.Object
tech.guilhermekaua.spigotboot.inventoryapi.internal.layout.OrderedSlotsLayout
All Implemented Interfaces:
Layout

@Internal public final class OrderedSlotsLayout extends Object implements Layout
Explicit-order Layout backing Layout.ofSlots(int...): the i-th given index is the i-th fill position.
  • Constructor Details

    • OrderedSlotsLayout

      public OrderedSlotsLayout(int... slots)
      Creates a layout that fills slots in exactly the given order.
      Parameters:
      slots - the slot indices in fill order; each must be within 0-53 and unique
      Throws:
      IllegalArgumentException - if an index is negative, >= 54 or duplicated
  • Method Details

    • slots

      @NotNull public @NotNull List<Integer> slots()
      Description copied from interface: Layout
      Returns the slot positions in fill order.
      Specified by:
      slots in interface Layout
      Returns:
      an unmodifiable ordered list of slot indices