confuser / BarAPI

DEPRECATED Control Minecraft boss bar programatically
http://dev.bukkit.org/bukkit-plugins/bar-api/
Other
24 stars 48 forks source link

Bossbar text doesn't change, bossbar itself does #41

Closed WoutDev closed 9 years ago

WoutDev commented 10 years ago

Issue: I have a timer that decreases the bossbar each time with x% and change the text of the bossbar. I tested it with three accounts online at the same moment: 1.7.9, 1.7.10 and 1.8. On the 1.7.9 and 1.7.10 there is no problem, everything updates smoothly but on 1.8 the text doesn't update (but the health updates)

No errors at the console.

Animated gif: How it needs to be: http://gyazo.com/dfb3684dd504d400fa65e84588fdf7d1 How it is: http://gyazo.com/fe5ae151ef589e8057f387ef42b20848

The two gifs are two different accounts online at the same time. One account is 1.7.9 (works perfectly) and the other account is 1.8. (Doesn't update the text).

Can I do something about to fix this, or is this BarAPI itself (or the just something client-side)?

I'm using the latest build of BarAPI downloaded from: http://ci.frostcast.net/job/BarAPI/lastBuild/

useSpigotHack is true on the config.

WoutDev commented 10 years ago

I'm now for an temp fix removing the bar from the player and then later set it again, just if someone has this too; you can fix it by removing the bar and then set it again. That will basicly update the text.

confuser commented 10 years ago

Show the code you are using that has this problem please

WoutDev commented 10 years ago
final float percent = (count * 100.0f) / GameConstants.WAIT_TIME;
Bukkit.getScheduler().runTask(Main.instance, new Runnable() {
     @Override
     public void run() {
          BarAPI.setMessage(ChatColor.GOLD + "The game will start in: " + ChatColor.RED +(GameConstants.WAIT_TIME - count), 100 - percent);
     }
});

I'm using an task because without it, barapi somethimes throws and error.

Like you see, its just the setMessage method (basic API use).

confuser commented 10 years ago

Are you calling the methods in another thread?

confuser commented 10 years ago

Could you please provide the error it sometimes throws?

confuser commented 9 years ago

If this is still an issue, feel free to re-open

WoutDev commented 9 years ago

Yes, this is still an issue. The text doesn't change, using the same code as above and using build 30 of jenkins.

No error, the text just won't change. Also, if the enderdragon is not in view of the player (e.g. looking in the water) then the enderbar won't show.

WoutDev commented 9 years ago

Or I am blind, or I can't see the reopen button...

games647 commented 9 years ago

Same for me. I have to remove the bar first in order to change the text.