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
Modifier 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
ConstructorDescriptionIcon
(@NotNull net.tnemc.item.AbstractItemStack<?> item, @Nullable Function<MenuPlayer, net.tnemc.item.AbstractItemStack<?>> itemProvider) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAction
(IconAction action) getClick()
net.tnemc.item.AbstractItemStack<?>
getItem
(@Nullable MenuPlayer player) boolean
onClick
(MenuClickHandler handler) void
setClick
(Consumer<MenuClickHandler> click) void
setSlot
(int slot) void
int
slot()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
constraints
in interfaceConstraintHolder
-
getClick
-
setClick
-