Interface MenuEntry


  • public interface MenuEntry
    A menu entry in a right-click menu.
    • Method Detail

      • getOption

        java.lang.String getOption()
        The option text added to the menu. (ie. "Walk here", "Use")
      • setOption

        MenuEntry setOption​(java.lang.String option)
      • getTarget

        java.lang.String getTarget()
        The target of the action. (ie. Item or Actor name)

        If the option does not apply to any target, this field will be set to empty string.

      • setTarget

        MenuEntry setTarget​(java.lang.String target)
      • getIdentifier

        int getIdentifier()
        An identifier value for the target of the action.
      • setIdentifier

        MenuEntry setIdentifier​(int identifier)
      • getType

        MenuAction getType()
        The action the entry will trigger.
      • getParam0

        int getParam0()
        An additional parameter for the action.
      • setParam0

        MenuEntry setParam0​(int param0)
      • getParam1

        int getParam1()
        A second additional parameter for the action.
      • setParam1

        MenuEntry setParam1​(int param1)
      • isForceLeftClick

        boolean isForceLeftClick()
        If this is true and you have single mouse button on and this entry is the top entry the right click menu will not be opened when you left click This is used for shift click
      • setForceLeftClick

        MenuEntry setForceLeftClick​(boolean forceLeftClick)
      • isDeprioritized

        boolean isDeprioritized()
        Deprioritized menus are sorted in the menu to be below the other menu entries.
        Returns:
      • setDeprioritized

        MenuEntry setDeprioritized​(boolean deprioritized)
      • onClick

        MenuEntry onClick​(java.util.function.Consumer<MenuEntry> callback)
        Set a callback to be called when this menu option is clicked
        Parameters:
        callback -
        Returns:
      • isItemOp

        boolean isItemOp()
        Test if this menu entry is an item op. "Use" and "Examine" are not considered item ops.
        Returns:
      • getItemOp

        int getItemOp()
        If this menu entry is an item op, get the item op id
        Returns:
        1-5
      • getItemId

        int getItemId()
        If this menu entry is an item op, get the item id
        Returns:
        See Also:
        ItemID, NullItemID
      • getWidget

        @Nullable
        Widget getWidget()
        Get the widget this menu entry is on, if this is a menu entry with an associated widget. Such as eg, CC_OP.
        Returns: