This commit is contained in:
Chayapak 2023-06-18 21:14:29 +07:00
parent afaf32ec00
commit 2ae561b0cb

View file

@ -139,9 +139,12 @@ public class BossbarManagerPlugin extends Bot.Listener {
}
public void remove (String name) {
for (Map.Entry<UUID, BotBossBar> bossBar : bossBars.entrySet()) {
final Map<UUID, BotBossBar> mapCopy = new HashMap<>(bossBars);
for (Map.Entry<UUID, BotBossBar> bossBar : mapCopy.entrySet()) {
if (bossBar.getValue().id.equals(bossBarPrefix + name)) bossBars.remove(bossBar.getValue().uuid);
}
bot.core().run("minecraft:bossbar remove " + bossBarPrefix + name);
}