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
FieldsModifier and TypeFieldDescriptionprivate final StringThe function responsible for determining the state of the icon based on its current state.private final StringFields inherited from class net.tnemc.menu.core.icon.Icon
actions, click, constraints, item, itemProvider, slot -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidnet.tnemc.item.AbstractItemStack<?>getItem(@Nullable MenuPlayer player) Retrieves the currentitemof the icon by applying the state handler.booleanonClick(MenuClickHandler handler) Methods inherited from class net.tnemc.menu.core.icon.Icon
addAction, constraints, getActions, getClick, setClick, setSlot, setSlot, slotMethods 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
-
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
-