Package net.tnemc.menu.core.icon
Class Icon
java.lang.Object
net.tnemc.menu.core.icon.Icon
- All Implemented Interfaces:
ConstraintHolder
- Direct Known Subclasses:
StateIcon
Icon
- Since:
- 1.5.0.0
- Author:
- creatorfromhell
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final List<IconAction>protected Consumer<MenuClickHandler>protected final net.tnemc.item.AbstractItemStack<?>protected final Function<MenuPlayer,net.tnemc.item.AbstractItemStack<?>> protected int -
Constructor Summary
ConstructorsConstructorDescriptionIcon(@NotNull net.tnemc.item.AbstractItemStack<?> item, @Nullable Function<MenuPlayer, net.tnemc.item.AbstractItemStack<?>> itemProvider) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAction(IconAction action) getClick()net.tnemc.item.AbstractItemStack<?>getItem(@Nullable MenuPlayer player) booleanonClick(MenuClickHandler handler) voidsetClick(Consumer<MenuClickHandler> click) voidsetSlot(int slot) voidintslot()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.tnemc.menu.core.constraints.ConstraintHolder
addConstraint, getConstraint, removeConstraint
-
Field Details
-
actions
-
constraints
-
item
protected final net.tnemc.item.AbstractItemStack<?> item -
slot
protected int slot -
itemProvider
-
click
-
-
Constructor Details
-
Icon
public Icon(@NotNull @NotNull net.tnemc.item.AbstractItemStack<?> item, @Nullable @Nullable Function<MenuPlayer, net.tnemc.item.AbstractItemStack<?>> itemProvider)
-
-
Method Details
-
getActions
-
slot
public int slot() -
setSlot
public void setSlot(int slot) -
constraints
- Specified by:
constraintsin interfaceConstraintHolder
-
getClick
-
setClick
-