Fix BossBar#addViewer for the first player boss bar

This commit is contained in:
themode 2020-09-19 18:13:00 +02:00
parent e6f66b9816
commit d80c2e0658

View File

@ -50,7 +50,8 @@ public class BossBar implements Viewable {
return false;
}
// Check max boss bar count
if (getBossBars(player).size() >= MAX_BOSSBAR) {
final Set<BossBar> playerBossBars = getBossBars(player);
if (playerBossBars != null && playerBossBars.size() >= MAX_BOSSBAR) {
return false;
}
// Add to the map