I would like to use a bossbar, with value set with execute store result bossbar
, to hold the 'mana' value for each player in my datapack (which is held in a scoreboard so it can be manipulated in the background by various functions).
However, I can't find an option for which player's value to set, and can only find a setting for which players the bossbar is visible for. Are bossbar values global or would I need to make one bossbar per player that I want to display a mana amount for?
If bossbar values are global, what alternatives are there for making some type of bar type display? I don't want to use scoreboard numbers because they are ugly. I'm open to particles, resource packs, anything but mods really.
Best Answer
You can make one bossbar per mana level, rather than per player. To make a mana system where you can have between 0 and 4 mana you would have to first create the bossbars, set their values, and set their maximal values. You only need to do this once:
You would then repeatedly (each tick) set the players for each bossbar.
I'm assuming that the mana value is held in a scoreboard objective with the objective name
mana
. If that is not the case for you, then you may have to modify these commands.