Skip to content
This repository was archived by the owner on Nov 28, 2025. It is now read-only.

Commit a048b19

Browse files
committed
(quick fix) fix bossbar not keeping track of viewers
1 parent f069ca8 commit a048b19

File tree

1 file changed

+2
-0
lines changed
  • src/main/kotlin/io/github/dockyardmc/bossbar

1 file changed

+2
-0
lines changed

src/main/kotlin/io/github/dockyardmc/bossbar/Bossbar.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,13 @@ class Bossbar(
5050
override fun addViewer(player: Player) {
5151
val createPacket = ClientboundBossbarPacket(BossbarPacketAction.ADD, this)
5252
player.sendPacket(createPacket)
53+
viewers.add(player)
5354
}
5455

5556
override fun removeViewer(player: Player) {
5657
val removePacket = ClientboundBossbarPacket(BossbarPacketAction.REMOVE, this)
5758
player.sendPacket(removePacket)
59+
viewers.remove(player)
5860
}
5961
}
6062

0 commit comments

Comments
 (0)