From 3e69fc42d9f79e587f1e08170bda8d5d1db1b4ee Mon Sep 17 00:00:00 2001 From: MiaoWoo Date: Thu, 24 Sep 2020 13:48:14 +0800 Subject: [PATCH] feat: compatible 1.8.8 chat Signed-off-by: MiaoWoo --- packages/bukkit/src/chat.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/bukkit/src/chat.ts b/packages/bukkit/src/chat.ts index 71a97dc8..9de0f1ea 100644 --- a/packages/bukkit/src/chat.ts +++ b/packages/bukkit/src/chat.ts @@ -14,6 +14,10 @@ export class BukkitChat extends chat.Chat { this.sendJson(sender, { text: message }, 2) } 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) + } } }