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(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
|
int getId()
Slot applyFromItem(Item item)
item - the itemboolean hasItem()
@Nonnull Slot setItem(@Nonnull ItemStack item)
item - the new itemSlot clear()
@Nonnull Slot clearBindings(ClickType type)
@Nonnull Slot bind(@Nonnull Consumer<InventoryClickEvent> handler, @Nonnull ClickType... types)
@Nonnull <T extends Runnable> Slot bindAllRunnables(@Nonnull Iterable<Map.Entry<ClickType,T>> handlers)
Copyright © 2020. All rights reserved.