Custom-Command-Builder
Example
commands:
justdoit:
enabled: true
parameterNeed: 0
conditions: ['hasMoney(10)','hasCoins(2)']
commands: ['takeMoney(10)','takeCoins(2)','consoleExec(broadcast %player% JUST DO IT!)']
outputs: ['playerLog(YOU JUST DO IT!)','consoleLog(%player% has just do it!)']
| space befor | node | values | default |
| 4 space | {Command_Name}: | NOTHING | NO DEFAULT |
| 8 space | enabled: | true/false | false |
| 8 space | parameterNeed: | a number | 0 |
| 8 space | conditions: | an array | [] |
| 8 space | commands: | an array | [] |
| 8 space | outputs: | an array | [] |
Informationstable
| default | If you dont use the node this value set |
| space befor | so many spaces (blanks) befor the node |
| order | The order is NOT important |
Informations-Nodes
| node | information | default_ _ _ _ | example values |
| enabled | If true the command is able to execute and false you are not able to execute | true | true |
| parameterNeed | The number of arguments after the command for example /c {Command_Name} {arg1} {args2}... Important if you use %1% placeholder to force that the number of arguments will use | 0 | 1 |
| conditions | The conditions for the command | [] | ['hasMoney(10)'] |
| commands | The commands which will executed | [] | ['takeMoney(10)'] |
| outputs | The output after execute all commands | [] | ['playerLog(You lose 10$ hahahaha)']' |
Information parameter
You can use placeholder in commands and outputs but only at playerExec(), consoleExec(), playerLog(), consoleLog() subcommands
| parameter | informations |
| %PLAYER% | Is the placeholder for the name of the command executor |
| %WORLD% | Is the placeholder for the worldname of the command executor |
| %1%, %2%, ... | Are placeholder for arguments which entered with the command (NEED parameterNeed to setup. If you have only %1% you set parameterNeed to 1 if you have more you set parameterNeed to the highest parameternumber) |
Information subcommands
in conditions
- hasMoney(<NUMBER>)
- check if the player has the money or more
- hasCoins(<NUMBER>)
- check if the player has the coins or more [extern CoinsPlugin needed]
in commands
- takeMoney(<NUMBER>)
- take the money from the player. Numbers bigger then the tested hasMoney dont suggested
- takeCoins(<NUMBER>)
- take the coins from the player. Numbers bigger then the tested hasCoins dont suggested [extern CoinsPlugin needed]
- playerExec(<STRING>)
- execute a command as player, no '/' needed (permissions requied)
- consoleExec(<STRING>)
- execute a command as console, no '/' needed (permissions not requied)
in outputs
- playerLog(<STRING>)
- Create a output at the players chat
- consoleLog(<STRING>)
- Create a output at the console