Il plugin ha una cartella commands
che conterrĂ tutti i tuoi comandi. Puoi creare un numero infinito di comandi. Un comando conterrĂ il nome del comando, i suoi alias, i suoi permessi e il nome dell'inventario da aprire.
Puoi inserire diversi comandi per file e creare un numero illimitato di file.
Copy |- commands
|- punish
- punish.yml
|- example
- example.yml
- commands.yml
Sintassi
Copy commands:
basic_command:
command: basic_command
inventory: basic_inventory
advanced_command:
command: advanced_command
permission: "admin.use"
aliases:
- zai
inventory: advanced_inventory
pro_command:
command: pro_command
inventory: pro_inventory
openbook:
command: openbook
actions:
- type: book
author: "Maxlego08" # Book author
title: "&cTest" # Book title
lines: # Book pages
1: # First page
- ' #34ebe8zMenu'
- ''
- ''
- '<hover:show_text:"#34eba8Open an url !"><click:open_url:"https://minecraft-inventory-builder.com/">#f0af24Open URL<reset>'
punish:
command: punish
permission: "admin.punish"
aliases:
- sanction
inventory: example_punish
arguments:
- name: target
- name: reason
auto-completion:
- cheat
- chat
- skin
- other
actions:
- type: message
messages:
- "&7You will put a punishment to the player &f&n%target%&r &7with the reason&8: &f%reason%"
Comandi
Comando principaale
Alias
Copy aliases:
- <aliase 1>
- <aliase 2>
- ...
Gli alias del comando
Azioni
Permessi
Copy permission: <permission>
Il permesso che il giocatore deve avere per aprire il menu.
Inventario
Copy inventory: <inventory name>
Nome dell'inventario che verrĂ aperto.
Puoi anche specificare il nome del plugin in questo modo:
Copy inventory: "<plugin name>:<inventory name>"
Arguments
Copy arguments:
- <arg1>
- <arg2>
- ...
Ti permette di aggiungere arguments per i tuoi comandi. Puoi usare i arguments con questo placeholder: %zmenu_argument_<argument name>%
Esempio
Copy commands:
punish:
command: punish
permission: "admin.punish"
aliases:
- sanction
inventory: example_punish
arguments:
- name: target
- name: reason
auto-completion:
- cheat
- chat
- skin
- other
actions:
- type: message
messages:
- "&7You will put a punishment to the player &f&n%target%&r &7with the reason&8: &f%reason%"
With the placeholders you will be able to retrieve the arguments:
Ăˆ possibile definire se il argument è facoltativo e se ha un inventario specifico.
Esempio
Copy arguments: # argument name, true or false, plugin name : inventory name
- name,false,zmenu:example2
Hai:
true o false, scegli se il argument è obbligatorio o no
nome dell'inventario. Puoi impostare il nome dell'inventario e del plugin