| Modifier and Type | Method and Description |
|---|---|
Slot |
applyFromItem(Item item)
Applies an item model to this slot.
|
Slot |
bind(org.bukkit.event.inventory.ClickType type,
Consumer<org.bukkit.event.inventory.InventoryClickEvent> handler) |
Slot |
bind(org.bukkit.event.inventory.ClickType type,
Runnable handler) |
Slot |
bind(Consumer<org.bukkit.event.inventory.InventoryClickEvent> handler,
org.bukkit.event.inventory.ClickType... types) |
Slot |
bind(Runnable handler,
org.bukkit.event.inventory.ClickType... types) |
<T extends Consumer<org.bukkit.event.inventory.InventoryClickEvent>> |
bindAllConsumers(Iterable<Map.Entry<org.bukkit.event.inventory.ClickType,T>> handlers) |
<T extends Runnable> |
bindAllRunnables(Iterable<Map.Entry<org.bukkit.event.inventory.ClickType,T>> handlers) |
Slot |
clear()
Clears all attributes of the slot.
|
Slot |
clearBindings()
Clears all bindings on this slot.
|
Slot |
clearBindings(org.bukkit.event.inventory.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
|
org.bukkit.inventory.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(org.bukkit.inventory.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 org.bukkit.inventory.ItemStack getItem()
Slotpublic boolean hasItem()
Slot@Nonnull public Slot setItem(@Nonnull org.bukkit.inventory.ItemStack item)
Slotpublic Slot clear()
Slot@Nonnull public Slot clearItem()
Slot@Nonnull public Slot clearBindings()
SlotclearBindings in interface Slot@Nonnull public Slot clearBindings(org.bukkit.event.inventory.ClickType type)
SlotclearBindings in interface Slot@Nonnull public Slot bind(@Nonnull org.bukkit.event.inventory.ClickType type, @Nonnull Consumer<org.bukkit.event.inventory.InventoryClickEvent> handler)
@Nonnull public Slot bind(@Nonnull org.bukkit.event.inventory.ClickType type, @Nonnull Runnable handler)
@Nonnull public Slot bind(@Nonnull Consumer<org.bukkit.event.inventory.InventoryClickEvent> handler, @Nonnull org.bukkit.event.inventory.ClickType... types)
@Nonnull public Slot bind(@Nonnull Runnable handler, @Nonnull org.bukkit.event.inventory.ClickType... types)
@Nonnull public <T extends Runnable> Slot bindAllRunnables(@Nonnull Iterable<Map.Entry<org.bukkit.event.inventory.ClickType,T>> handlers)
bindAllRunnables in interface SlotCopyright © 2022. All rights reserved.