feat: add task and optimize command

Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
2019-09-21 15:04:25 +08:00
parent eb1bab7e76
commit 500384326f
4 changed files with 48 additions and 46 deletions

View File

@ -8,7 +8,7 @@ export class BukkitConsole extends MiaoScriptConsole {
this.error("第一个参数未实现 org.bukkit.command.CommandSender 无法发送消息!")
return;
}
if (''.toString.call(args[0]) === "[object Array]") {
if (Object.prototype.toString.call(args[0]) === "[object Array]") {
args[0].forEach(line => sender.sendMessage(this.prefix + line))
} else {
sender.sendMessage(this.prefix + args.join(' '));