Package 

Class McorouhlinInventory

  • All Implemented Interfaces:

    
    public final class McorouhlinInventory
    
                        

    DSL class to describe inventory more clearly

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final Unit default(Function1<Integer, ItemStack> item) Set default items on this inventory slots.
      final Unit default(ItemStack item)
      final Unit onOpen(Function1<InventoryOpenEvent, Unit> action) Action performed when the inventory is opened.
      final Unit onClose(Function1<InventoryCloseEvent, Unit> action) Action performed when the inventory is closed.
      final Unit onPreClick(Function1<InventoryClickEvent, Unit> action) Action performed pre the slot handler, when the inventory is clicked.
      final Unit onPostClick(Function1<InventoryClickEvent, Unit> action) Action performed post the slot handler, when the inventory is clicked.
      final Unit slot(Integer index, ItemStack item, Function1<InventoryClickEvent, Unit> handler) Set item to index in this inventory.
      final Unit slot(Integer index, Function1<Integer, ItemStack> itemBuilder, Function1<InventoryClickEvent, Unit> handler)
      final Unit slots(Iterable<Integer> indices, ItemStack item, Function1<InventoryClickEvent, Unit> handler) Set item to indices in this inventory.
      final Unit slots(Iterable<Integer> index, Function1<Integer, ItemStack> itemBuilder, Function1<InventoryClickEvent, Unit> handler)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • default

         final Unit default(Function1<Integer, ItemStack> item)

        Set default items on this inventory slots.

      • onOpen

         final Unit onOpen(Function1<InventoryOpenEvent, Unit> action)

        Action performed when the inventory is opened.

      • onClose

         final Unit onClose(Function1<InventoryCloseEvent, Unit> action)

        Action performed when the inventory is closed.

      • onPreClick

         final Unit onPreClick(Function1<InventoryClickEvent, Unit> action)

        Action performed pre the slot handler, when the inventory is clicked.

      • onPostClick

         final Unit onPostClick(Function1<InventoryClickEvent, Unit> action)

        Action performed post the slot handler, when the inventory is clicked.

      • slot

         final Unit slot(Integer index, ItemStack item, Function1<InventoryClickEvent, Unit> handler)

        Set item to index in this inventory.

        The handler is performed when this slot is clicked.