| Modifier and Type | Method and Description |
|---|---|
Slot |
applyFromItem(Item item)
Applies an item model to this slot.
|
Slot |
bind(ClickType type,
Consumer<InventoryClickEvent> handler) |
Slot |
bind(ClickType type,
Runnable handler) |
Slot |
bind(Consumer<InventoryClickEvent> handler,
ClickType... types) |
Slot |
bind(Runnable handler,
ClickType... types) |
<T extends Consumer<InventoryClickEvent>> |
bindAllConsumers(Iterable<Map.Entry<ClickType,T>> handlers) |
<T extends Runnable> |
bindAllRunnables(Iterable<Map.Entry<ClickType,T>> handlers) |
Slot |
clear()
Clears all attributes of the slot.
|
Slot |
clearBindings()
Clears all bindings on this slot.
|
Slot |
clearBindings(ClickType type)
Clears all bindings on this slot for a given click type.
|
Slot |
clearItem()
Clears the item in this slot
|
int |
getId()
Gets the id of this slot
|
ItemStack |
getItem()
Gets the item in this slot
|
Gui |
gui()
Gets the GUI this slot references
|
boolean |
hasItem()
Gets if this slot has an item
|
Slot |
setItem(ItemStack item)
Sets the item in this slot
|
@Nonnull public Gui gui()
Slotpublic int getId()
Slotpublic Slot applyFromItem(Item item)
SlotapplyFromItem in interface Slotitem - the item@Nullable public ItemStack getItem()
Slotpublic boolean hasItem()
Slot@Nonnull public Slot setItem(@Nonnull ItemStack item)
Slotpublic Slot clear()
Slot@Nonnull public Slot clearItem()
Slot@Nonnull public Slot clearBindings()
SlotclearBindings in interface Slot@Nonnull public Slot clearBindings(ClickType type)
SlotclearBindings in interface Slot@Nonnull public Slot bind(@Nonnull ClickType type, @Nonnull Consumer<InventoryClickEvent> handler)
@Nonnull public Slot bind(@Nonnull Consumer<InventoryClickEvent> handler, @Nonnull ClickType... types)
@Nonnull public <T extends Runnable> Slot bindAllRunnables(@Nonnull Iterable<Map.Entry<ClickType,T>> handlers)
bindAllRunnables in interface Slot@Nonnull public <T extends Consumer<InventoryClickEvent>> Slot bindAllConsumers(@Nonnull Iterable<Map.Entry<ClickType,T>> handlers)
bindAllConsumers in interface SlotCopyright © 2020. All rights reserved.