From f1765a6658c347d5f82fc90c202d62dd2fe947c8 Mon Sep 17 00:00:00 2001 From: ChomeNS <95471003+ChomeNS@users.noreply.github.com> Date: Sun, 1 Oct 2023 09:57:59 +0700 Subject: [PATCH] some more bossbar manager improve --- .../chayapak/chomens_bot/plugins/BossbarManagerPlugin.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/BossbarManagerPlugin.java b/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/BossbarManagerPlugin.java index 7063892..c03a45c 100644 --- a/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/BossbarManagerPlugin.java +++ b/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/BossbarManagerPlugin.java @@ -4,6 +4,7 @@ import com.github.steveice10.mc.protocol.data.game.BossBarColor; import com.github.steveice10.mc.protocol.packet.ingame.clientbound.ClientboundBossEventPacket; import com.github.steveice10.packetlib.Session; import com.github.steveice10.packetlib.event.session.ConnectedEvent; +import com.github.steveice10.packetlib.event.session.DisconnectedEvent; import com.github.steveice10.packetlib.packet.Packet; import land.chipmunk.chayapak.chomens_bot.Bot; import land.chipmunk.chayapak.chomens_bot.data.BossBar; @@ -163,6 +164,11 @@ public class BossbarManagerPlugin extends Bot.Listener { } } + @Override + public void disconnected(DisconnectedEvent event) { + serverBossBars.clear(); + } + private void playerJoined () { if (!enabled || actionBar || !bot.options.useCore) return;