feat: compatible 1.8.8 chat

Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
MiaoWoo 2020-09-24 13:48:14 +08:00
parent 7962aa5da0
commit d0a0e2dd71

View File

@ -14,6 +14,10 @@ export class BukkitChat extends chat.Chat {
this.sendJson(sender, { text: message }, 2) this.sendJson(sender, { text: message }, 2)
} }
sendTitle(sender: any, title: string, subtitle: string = '', fadeIn: number = 20, time: number = 100, fadeOut: number = 20) { sendTitle(sender: any, title: string, subtitle: string = '', fadeIn: number = 20, time: number = 100, fadeOut: number = 20) {
sender.sendTitle(title, subtitle, fadeIn, time, fadeOut) try {
sender.sendTitle(title, subtitle, fadeIn, time, fadeOut)
} catch (error) {
sender.sendTitle(title, subtitle)
}
} }
} }