Package net.tnemc.menu.core.icon.impl
Class StateIcon
java.lang.Object
net.tnemc.menu.core.icon.Icon
net.tnemc.menu.core.icon.impl.StateIcon
- All Implemented Interfaces:
ConstraintHolder
The
StateIcon
class represents an icon with a dynamic state that is determined by a state handler.- Since:
- 1.5.0.0
- Author:
- creatorfromhell
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprivate final String
The function responsible for determining the state of the icon based on its current state.private final String
Fields inherited from class net.tnemc.menu.core.icon.Icon
actions, click, constraints, item, itemProvider, slot
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
net.tnemc.item.AbstractItemStack<?>
getItem
(@Nullable MenuPlayer player) Retrieves the currentitem
of the icon by applying the state handler.boolean
onClick
(MenuClickHandler handler) Methods inherited from class net.tnemc.menu.core.icon.Icon
addAction, constraints, getActions, getClick, setClick, setSlot, setSlot, 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
-
states
-
stateID
-
defaultState
-
stateHandler
The function responsible for determining the state of the icon based on its current state.
-
-
Constructor Details
-
StateIcon
-
-
Method Details
-
getStates
-
addState
-