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
  • Normal Example
  • Conditionnal Example
  • Multi-Conditions Example
  • Note

Was this helpful?

  1. ACTIONS

Action

Actions can be used in the actions section of the buttons, in menu events, tasks, input catchers, etc...

Normal Example

actions:
 - 'tell: Hello, %player_name%'

Conditionnal Example

actions:
  condition: 'hasMoney.100'
  actions:
  - 'tell: You have enough money.'
  deny-actions:
  - 'tell: You don''t have enough money.'

Multi-Conditions Example

    actions:
      all:
        - condition: 'utils.chance(0.1)'
          priority: 3
          actions:
            - 'tell: Prize 1'
            - 'return'
        - condition: 'utils.chance(0.5)'
          priority: 2
          actions:
            - 'tell: Prize 2'
            - 'return'
        - condition: 'true'
          priority: 1
          actions:
            - 'tell: Prize 3'

Note

  • When using multiples groups of conditions, you can set priorities to define the order to check the conditions

  • If a break/return/cancel action is executed, the entire group will stop

  • There are many aliases for nodes names such as:

requirement: 'hasPoints.100'
execute: 'tell: You have 100 points'
deny: 'tell: You dont have 100 points'
PreviousAll PlayersNextExpressions

Last updated 4 years ago

Was this helpful?