fix: type instance error

Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
MiaoWoo 2019-09-25 10:10:35 +08:00
parent ae1519ea4f
commit 032f4d98ae

View File

@ -4,7 +4,7 @@ let Bukkit = org.bukkit.Bukkit;
export class BukkitConsole extends MiaoScriptConsole { export class BukkitConsole extends MiaoScriptConsole {
sender(sender, ...args) { sender(sender, ...args) {
if (!(sender instanceof org.bukkit.command.CommandSender)) { if (!(sender instanceof Java.type('org.bukkit.command.CommandSender'))) {
this.error("第一个参数未实现 org.bukkit.command.CommandSender 无法发送消息!") this.error("第一个参数未实现 org.bukkit.command.CommandSender 无法发送消息!")
return; return;
} }