Class ActionItem
java.lang.Object
me.hsgamer.hscore.minecraft.gui.common.item.ActionItem
The action item
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply(ActionItem actionItem) Apply the action itemvoidcallAction(ViewerEvent event) Call the action<E extends ViewerEvent>
ActionItemextendAction(Class<E> eventClass, BiConsumer<E, Consumer<ViewerEvent>> operator) Extend the actionextendAction(BiConsumer<ViewerEvent, Consumer<ViewerEvent>> operator) Extend the action@Nullable Consumer<ViewerEvent> Get the action@Nullable ObjectgetItem()Get the item<E extends ViewerEvent>
ActionItemSet the actionsetAction(@Nullable Consumer<ViewerEvent> action) Set the actionSet the item
-
Constructor Details
-
ActionItem
public ActionItem()
-
-
Method Details
-
getItem
Get the item- Returns:
- the item
-
setItem
Set the item- Parameters:
item- the item- Returns:
- this object
-
getAction
Get the action- Returns:
- the action
-
setAction
Set the action- Parameters:
action- the action- Returns:
- this object
-
extendAction
Extend the action- Parameters:
operator- the operator with the event and the old action- Returns:
- this object
-
setAction
Set the action- Type Parameters:
E- the event type- Parameters:
eventClass- the event classaction- the action- Returns:
- this object
-
extendAction
public <E extends ViewerEvent> ActionItem extendAction(Class<E> eventClass, BiConsumer<E, Consumer<ViewerEvent>> operator) Extend the action- Type Parameters:
E- the event type- Parameters:
eventClass- the event classoperator- the operator with the event and the old action- Returns:
- this object
-
callAction
Call the action- Parameters:
event- the event
-
apply
Apply the action item- Parameters:
actionItem- the action item- Returns:
- this object
-