Command
Use the command requirement in a KubeJS recipe
Use one of these methods to add a Command Requirement to the recipe.
.runCommandOnStart("command")
.runCommandOnStart("command", permissionLevel)
.runCommandOnStart("command", log)
.runCommandOnStart("command", permissionLevel, log)
.runCommandEachTick("command")
.runCommandEachTick("command", permissionLevel)
.runCommandEachTick("command", log)
.runCommandEachTick("command", permissionLevel, log)
.runCommandOnEnd("command")
.runCommandOnEnd("command", permissionLevel)
.runCommandOnEnd("command", log)
.runCommandOnEnd("command", permissionLevel, log)The
commandparam must be a string starting by/which will be run as a command.The
permissionLevelparam must be a positive integer. Default :2The
logparam must be a boolean, if true the command will be logged in admin chat as a system command. Default :false
Example
onEvent('recipes', event => {
event.recipes.custommachinery.custom_machine("custommachinery:power_crusher", 100)
.runCommandOnEnd("/time set 0")
})Last updated