Blockbench Reference Docs
    Preparing search index...

    Function addAction

    • Adds an action to the menu structure

      Parameters

      • action: Action

        Action to add

      • Optionalpath: string

        Path pointing to the location. Use the ID of each level of the menu, or index or group within a level, separated by a point. For example, file.export.0 places the action at the top position of the Export submenu in the File menu.

      Returns void

    • Adds an action to the menu structure

      Parameters

      • action: any

        Action to add

      • path: any

        Path pointing to the location. Use the ID of each level of the menu, or index or group within a level, separated by a point. For example, file.export.0 places the action at the top position of the Export submenu in the File menu.

      Returns void