execute if entity @e[tag=gravedigger] run function survivalplus:bossbar/gravedigger
execute unless entity @e[tag=gravedigger] run bossbar set gravedigger visible false

execute if entity @e[tag=husk_king] run function survivalplus:bossbar/husk_king
execute unless entity @e[tag=husk_king] run bossbar set husk_king visible false

execute if entity @e[tag=ice_king] run function survivalplus:bossbar/ice_king
execute unless entity @e[tag=ice_king] run bossbar set ice_king visible false

execute if entity @e[tag=undead_king] run function survivalplus:bossbar/undead_king
execute unless entity @e[tag=undead_king] run bossbar set undead_king visible false

execute if entity @e[tag=ngboss] run function survivalplus:bossbar/ngboss
execute unless entity @e[tag=ngboss] run bossbar set ngboss visible false