function
Creates a new function with the given name
Returns the created function which can be called using Func.call
Example:
val func = namespace.function("test") {
cmd("say Hello Func!")
}
namespace.onLoad {
cmd(func.call()) // generates 'function namespace:test'
}
Content copied to clipboard
See also
Creates a new function with a random UUID as the name
Returns the created function which can be called using Func.call
Example:
val func = namespace.function {
cmd("say Hello Func!")
}
namespace.onLoad {
cmd(func.call()) // generates 'function namespace:<uuid>'
}
Content copied to clipboard