Package dev.twilite.game.menu
Class MenuOption
java.lang.Object
dev.twilite.game.menu.MenuOption
A ready-to-submit game menu action.
Menu options are produced by wrappers such as NPCs, objects, items, and interface
components. Calling enqueue() sends the option through the client's
doAction path.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic MenuOption.Builderbuilder(String text, ActionType type) Starts building a menu option.booleanenqueue()Enqueues this option with the current client.intid()Returns the primary value used by the client menu option.target()Resolves the entity targeted by this option when it has an entity typecode.text()Returns the visible option text.type()Returns the option action type.
-
Method Details
-
enqueue
public boolean enqueue()Enqueues this option with the current client. Returnstruewhen a client was available and the action was queued. -
text
Returns the visible option text. -
type
Returns the option action type. -
id
public int id()Returns the primary value used by the client menu option. -
target
Resolves the entity targeted by this option when it has an entity typecode.