purgebars fixed again

This commit is contained in:
Aubri Seebauer committed 2023-04-28 20:42:15 -04:00
1 parent 9ba06d70a6
commit c87d2dd35e
1 file changed
+1 -1
@@ -148,7 +148,7 @@ public class AdminCommands implements CommandExecutor {
private static boolean purgebars(CommandSender sender, String[] args) {
for (Iterator<KeyedBossBar> it = Bukkit.getBossBars(); it.hasNext(); ) {
KeyedBossBar b = it.next();
if(b.getKey().getKey().contains(Main.getInstance().getName())) {
if(b.getKey().getNamespace().contains(Main.getInstance().getName())) {
b.setVisible(false);
b.removeAll();
Bukkit.removeBossBar(b.getKey());