I have a bossbar that keeps track of each players Stone Mined using the scoreboard. It works properly if 1 person is on the server. If 2 or more people are on, it will only display for one person. I am not sure why, as I have tried different target selectors with the same results.
Any ideas for a fix?
Edit: Did NOT fix it. Here is the issue. Having a bossbar that reads a players scoreboard works and all. With my current setup, the best I can achieve is whoever is closest to 0,0. But it displays that players score for EVERYBODY with the BreakStone score.
Edit #2: I found out that bossbar is global. If I want to have my setup run, I will need to make a Bossbar for every player and update my function file. I want to try to trick the system into loading a players scoreboard value, display it to them, then move to the next person online and do it again. Might cause a flickering bar, but might be the only method of pulling it off.
(The changes that need to be made are the bottom 2 lines of code)
Maybe AT or AS arguments could be used. But I have been trying all sorts of combinations with no progress.
MAYBE I could have a tag or score be passed around as a 0 or 1 to each player per tick. Then run the Command while they have a 1, pass the 1 to the next player, rinse and repeat.
tag @a[scores={BreakStone=1..}] add fatigue
tag @a[scores={BreakStone=0}] remove fatigue
scoreboard players set @a[scores={drinkMilk=1..}] BreakStone 1
scoreboard players set @a[scores={drinkMilk=1..}] drinkMilk 0
effect clear @a[scores={BreakStone=1..31}] minecraft:mining_fatigue
effect give @a[scores={BreakStone=32..63}] minecraft:mining_fatigue 99999 0 true
effect clear @a[scores={BreakStone=63}] minecraft:mining_fatigue
effect give @a[scores={BreakStone=64..95}] minecraft:mining_fatigue 99999 1 true
effect clear @a[scores={BreakStone=95}] minecraft:mining_fatigue
effect give @a[scores={BreakStone=96..127}] minecraft:mining_fatigue 99999 2 true
effect clear @a[scores={BreakStone=127}] minecraft:mining_fatigue
effect give @a[scores={BreakStone=128..}] minecraft:mining_fatigue 99999 3 true
scoreboard players add @a[tag=fatigue] fatCool 1
scoreboard players set @a[tag=!fatigue] fatCool 0
scoreboard players remove @a[scores={fatCool=200..}] BreakStone 1
scoreboard players set @a[scores={fatCool=200..}] fatCool 0
#### below is where the issue lies ###
bossbar set gameplay:hard_stone players @p[scores={BreakStone=1..128}]
execute store result bossbar gameplay:hard_stone value run scoreboard players get @p BreakStone
Did NOT fix it. Here is the issue. Having a bossbar that reads a players scoreboard works and all. With my current setup, the best I can achieve is whoever is closest to 0,0. But it displays that players score for everybody.
I have a bossbar that keeps track of each players Stone Mined using the scoreboard. It works properly if 1 person is on the server. If 2 or more people are on, it will only display for one person. I am not sure why, as I have tried different target selectors with the same results.
Any ideas for a fix?
Edit: Did NOT fix it. Here is the issue. Having a bossbar that reads a players scoreboard works and all. With my current setup, the best I can achieve is whoever is closest to 0,0. But it displays that players score for EVERYBODY with the BreakStone score.
Edit #2: I found out that bossbar is global. If I want to have my setup run, I will need to make a Bossbar for every player and update my function file. I want to try to trick the system into loading a players scoreboard value, display it to them, then move to the next person online and do it again. Might cause a flickering bar, but might be the only method of pulling it off.
(The changes that need to be made are the bottom 2 lines of code)
Maybe AT or AS arguments could be used. But I have been trying all sorts of combinations with no progress.
MAYBE I could have a tag or score be passed around as a 0 or 1 to each player per tick. Then run the Command while they have a 1, pass the 1 to the next player, rinse and repeat.
Edited original post to better reflect what I am trying to do and to also help you help me easier.
It has something to do with this line. Is there any way to get it to display for all players instead of just 1?
Fixed it. Use the score range you want instead of tags.
Did NOT fix it. Here is the issue. Having a bossbar that reads a players scoreboard works and all. With my current setup, the best I can achieve is whoever is closest to 0,0. But it displays that players score for everybody.
This is definitely the bane of my existence.
MAJOR UPDATE!!!
Read Edit #2.
Can someone help me come up with ideas on strategies to work around the limitations of the boss bar?
I feel bad for you replying to your own replies.
I'd say, I have 2 options for you:
1. Create 1 bossbar for each player. Hope it's a max of 4.
2. Just make 1 bossbar, but make the target swap every 10 seconds.