feature-sites/CustomCommandBuilder

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 befornodevaluesdefault
4 space{Command_Name}:NOTHINGNO DEFAULT
8 spaceenabled:true/falsefalse
8 spaceparameterNeed:a number0
8 spaceconditions:an array[]
8 spacecommands:an array[]
8 spaceoutputs:an array[]


Informationstable

defaultIf you dont use the node this value set
space beforso many spaces (blanks) befor the node
orderThe order is NOT important


Informations-Nodes

nodeinformationdefault_ _ _ _example values
enabledIf true the command is able to execute and false you are not able to executetruetrue
parameterNeedThe 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 use01
conditionsThe conditions for the command[]['hasMoney(10)']
commandsThe commands which will executed[]['takeMoney(10)']
outputsThe 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

parameterinformations
%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