public interface Slot
Gui.
All changes made to this object are applied to the backing Gui instance, and vice versa.| 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
|
int getId()
Slot applyFromItem(Item item)
item - the item@Nullable org.bukkit.inventory.ItemStack getItem()
boolean hasItem()
@Nonnull Slot setItem(@Nonnull org.bukkit.inventory.ItemStack item)
item - the new itemSlot clear()
@Nonnull Slot clearBindings(org.bukkit.event.inventory.ClickType type)
@Nonnull Slot bind(@Nonnull org.bukkit.event.inventory.ClickType type, @Nonnull Consumer<org.bukkit.event.inventory.InventoryClickEvent> handler)
@Nonnull Slot bind(@Nonnull org.bukkit.event.inventory.ClickType type, @Nonnull Runnable handler)
@Nonnull Slot bind(@Nonnull Consumer<org.bukkit.event.inventory.InventoryClickEvent> handler, @Nonnull org.bukkit.event.inventory.ClickType... types)
@Nonnull Slot bind(@Nonnull Runnable handler, @Nonnull org.bukkit.event.inventory.ClickType... types)
@Nonnull <T extends Runnable> Slot bindAllRunnables(@Nonnull Iterable<Map.Entry<org.bukkit.event.inventory.ClickType,T>> handlers)
Copyright © 2022. All rights reserved.