CommandUtils

object CommandUtils : CloseableUtils

命令相关工具类

Author

M8Test, [email protected], https://m8test.com

Functions

Link copied to clipboard
fun execute(command: String, environment: Map<String, Any>): Result

执行命令

Link copied to clipboard
fun newWatcher(watcherBuilder: CommandWatcher.() -> Unit): CommandWatcher

新建一个 CommandWatcher

Link copied to clipboard
fun register(origin: Any, command: Command): Result

注册命令

Link copied to clipboard
fun registerWatcher(origin: Any, watcher: CommandWatcher): Result

注册一个命令监听器.

Link copied to clipboard
fun unregister(origin: Any, command: Command): Result

取消注册命令

Link copied to clipboard
fun unregisterWatcher(origin: Any, watcher: CommandWatcher): Result

取消注册一个命令监听器