The plugin has an commands folder that will contain all your commands. You can create an infinite number of commands. A command will contain the name of the command, its aliases, its permission and the name of the inventory to open.
You can put several commands per file and create an unlimited number of files.
commands:basic_command:command:basic_commandinventory:basic_inventoryadvanced_command:command:advanced_commandpermission:"admin.use"aliases: - zaiinventory:advanced_inventorypro_command:command:pro_commandinventory:pro_inventoryopenbook:command:openbookactions: - type:bookauthor:"Maxlego08"# Book authortitle:"&cTest"# Book titlelines:# Book pages1:# First page - ' #34ebe8zMenu' - '' - '' - '<hover:show_text:"#34eba8Open an url !"><click:open_url:"https://minecraft-inventory-builder.com/">#f0af24Open URL<reset>'
punish:command:punishpermission:"admin.punish"aliases: - sanctioninventory:example_punisharguments: - name:target - name:reasonauto-completion: - cheat - chat - skin - otheractions: - type:messagemessages: - "&7You will put a punishment to the player &f&n%target%&r &7with the reason&8: &f%reason%"
Command
command:<command>
Main command
Aliases
aliases: - <aliase 1> - <aliase 2> - ...
The aliases of the command.
Action
actions: - ...
You can use actions that will always be performed when executing the order.
Permission
permission:<permission>
The permission the player must have to open the inventory.
Inventory
inventory:<inventory name>
Name of the inventory that will be opened.
You can also specify the name of the plugin this way:
inventory:"<plugin name>:<inventory name>"
Arguments
arguments: - <arg1> - <arg2> - ...
Allows you to add arguments to your commands. You can use the arguments with the following placeholder: %zmenu_argument_<argument name>%
Example
commands:punish:command:punishpermission:"admin.punish"aliases: - sanctioninventory:example_punisharguments: - name:target - name:reasonauto-completion: - cheat - chat - skin - otheractions: - type:messagemessages: - "&7You will put a punishment to the player &f&n%target%&r &7with the reason&8: &f%reason%"
You can define an action and auto-completion list for each action.
You can define whether an argument and required or not with the value isRequired, Iâll show you that in the example below.
You can not execute the actions of the main command with the value performMainAction
Here you have the command /punish <target> <reason> . So you can run the command this way: /punish Maxlego08 Cheat (fly).
With the placeholders you will be able to retrieve the arguments:
You can define whether the argument is optional and whether the argument has a specific inventory.
Example with no required argument:
commands:warp:command:warpaliases: - warpsinventory:warparguments: - name:warpisRequired:false# Set the argument as optionalperformMainAction:false# Does not open inventoryauto-completion: - minapvp - cajas - dungeon - encantamientos - jugadores - mercado - minas - rankupactions: - type:player_commandcommands: - "essentials:warp %zmenu_argument_warp% %player%"
This example opens a warp inventory, then with an argument to teleport the player to the desired warp using an aliase of essentials.