-
- All Implemented Interfaces:
public final class McorouhlinInventoryDSL class to describe inventory more clearly
-
-
Method Summary
Modifier and Type Method Description final Unitdefault(Function1<Integer, ItemStack> item)Set default items on this inventory slots. final Unitdefault(ItemStack item)final UnitonOpen(Function1<InventoryOpenEvent, Unit> action)Action performed when the inventory is opened. final UnitonClose(Function1<InventoryCloseEvent, Unit> action)Action performed when the inventory is closed. final UnitonPreClick(Function1<InventoryClickEvent, Unit> action)Action performed pre the slot handler, when the inventory is clicked. final UnitonPostClick(Function1<InventoryClickEvent, Unit> action)Action performed post the slot handler, when the inventory is clicked. final Unitslot(Integer index, ItemStack item, Function1<InventoryClickEvent, Unit> handler)Set item to index in this inventory. final Unitslot(Integer index, Function1<Integer, ItemStack> itemBuilder, Function1<InventoryClickEvent, Unit> handler)final Unitslots(Iterable<Integer> indices, ItemStack item, Function1<InventoryClickEvent, Unit> handler)Set item to indices in this inventory. final Unitslots(Iterable<Integer> index, Function1<Integer, ItemStack> itemBuilder, Function1<InventoryClickEvent, Unit> handler)-
-
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, Function1<Integer, ItemStack> itemBuilder, Function1<InventoryClickEvent, Unit> handler)
-
slots
final Unit slots(Iterable<Integer> indices, ItemStack item, Function1<InventoryClickEvent, Unit> handler)
-
-
-
-