This commit is contained in:
Chayapak 2023-08-06 10:28:29 +07:00
parent 24973518ea
commit c64973d0bf

View file

@ -3,6 +3,7 @@ package land.chipmunk.chayapak.chomens_bot.plugins;
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.packet.Packet;
import land.chipmunk.chayapak.chomens_bot.Bot;
import land.chipmunk.chayapak.chomens_bot.data.BossBar;
@ -147,6 +148,15 @@ public class BossbarManagerPlugin extends Bot.Listener {
}
}
@Override
public void connected(ConnectedEvent event) {
for (Map.Entry<UUID, BotBossBar> _bossBar : bossBars.entrySet()) {
final BotBossBar bossBar = _bossBar.getValue();
addBossBar(bossBar.id, bossBar);
}
}
private void playerJoined () {
if (!enabled || actionBar || !bot.options.useCore) return;