Commands - DeOpping/GUI GitHub Wiki

There are many different things you can do in commands for each item!


<Required> (Optional)

Example

contents:
 'action-item':
   material: STONE
   amount: 1
   slots: '0'
   commands:
   - 'LEFT;player;me Hello!' # Will make the player run '/me Hello!' if they left click!
   - 'RIGHT;console;eco give {PLAYER} 10' # Will give the player $10 if they right click!

Syntax

There are a few different syntaxes you can use:

contents:
 'action-item':
   material: STONE
   amount: 1
   slots: '0'
   commands:
   - '(CommandType) <Command>' # This will default the click type to 'LEFT' and the sender to 'player'
   - '<Sender>;(CommandType) <Command>' # This will default the click type to 'LEFT'
   - '<ClickType>;<Sender>;<Command>'

Sender Types

There can only be two types of senders; 'player' or 'console' (not case-sensitive)!

Command Types

There are a variety of command types you can use:

contents:
 'action-item':
   material: STONE
   amount: 1
   slots: '0'
   commands:
   - '<Command>'
   - '[message] <Message>' # This will send a message to the player!
   - '[menu] <MenuName>' # This will open another menu from the 'menus' folder! The menu name is just the file name!
   - '[update]' # This will update the menu, basically what it would look like after clicking the item!
   - '[close]' # This will close the menu!

Click Types

You can use any click type! This means the command will only execute if the player clicks the item a specific way!

Find all click types here!

⚠️ **GitHub.com Fallback** ⚠️