TrMenu
PurchaseGithubLicense
English
English
  • Home
  • Start
    • Install
    • Setup
  • Migrate
  • MENU
    • Structure
      • Title
      • Layout
      • Options
      • Bindings
      • Events
      • Buttons
      • Built-in Scripts
      • Tasks
    • Icons
      • Update
      • Refresh
      • Display
        • Material
        • Name
        • Lore
        • Amount
        • Glow
        • Flags
        • NBT
      • Actions
      • Priority
      • Condition
      • Inherit
  • ACTIONS
    • Types
      • Command (as Player)
      • Command (as OP)
      • Command (as CONSOLE)
      • Player's chat
      • Message
      • Tellraw
      • ActionBar
      • Title/SubTitle
      • Sound
      • Bungee Server
      • JavaScript
      • Input Catcher
        • Re-Enter
      • Useful
        • Delay
        • Break
      • Items
        • Take-Items
        • Give-Item
        • Enchant-Item
        • Repair-Item
      • Economy
        • Give-Money
        • Take-Money
        • Set-Money
        • Give-Points
        • Take-Points
        • Set-Points
      • Menu
        • Close
        • Close (Silent)
        • Open
        • Page
        • Set-Args
        • Set-Title
        • Refresh
      • Datas
        • Set-Meta
        • Rem-Meta
        • Set-Data
        • Rem-Data
    • Options
      • Delay
      • Condition
      • Chance
      • All Players
    • Action
  • SCRIPT
    • Expressions
      • stringEquals
      • stringEqualsIgnoreCase
      • isNumber
      • isOperator
      • isPlayerOperator
      • hasPermission
      • hasLevel
      • hasMoney
      • hasPoints
      • hasItem
    • Scripts
  • FUNCTIONS
    • Arguments
    • Item Identifiers
    • Script Placeholder
    • Register Commands
    • Shortcuts
    • Commands
  • HOOK
    • PlaceholderAPI
    • Cronus
    • Vault
    • PlayerPoints
    • HeadDatabase
    • Oraxen
    • SkinsRestorer
  • API
    • TrMenuAPI
    • Events
      • MenuOpenEvent
      • MenuCloseEvent
      • MenuClickEvent
    • MenuFactory
Powered by GitBook
On this page
  • Example
  • Note

Was this helpful?

  1. MENU
  2. Structure

Bindings

Bind the menu to commands and/or items

Example

#Ways to open the menu. 
Bindings:
  # Defines the commands used to open this menu.
  Commands:
    - '(?i)example(-)?(gui)?(s)?'
   #Defines the items which will open this menu when clicked.
  Items:
    #Any compass
    - 'material:compass'
    #Clocks with the lore `OPEN_MENU` 
    - 'material:clock,lore:OPEN_MENU'
    #Player Heads with the specified texture
    - 'texture:eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNDRmNDUyZDk5OGVhYmFjNDY0MmM2YjBmZTVhOGY0ZTJlNjczZWRjYWUyYTZkZmQ5ZTZhMmU4NmU3ODZlZGFjMCJ9fX0='

Note

  • Commands suppoprt RegEx ! For example, with (?i)example(-)?(gui)?(s)?:

    • (?i) will make the command ignore the case: /example and /eXamPle would work.

    • (gui)? and (s)? make gui and s optionnal in the command: /example , /exampleguiand /exampleguis would work.

  • Binded commands support spaces and arguments, the plugin will automatically match and read the real arguments without

  • To understand the syntax of binded items, please see the following wiki page:

PreviousOptionsNextEvents

Last updated 4 years ago

Was this helpful?