Solved Boss Bar not updating health

Discussion in 'Plugin Development' started by voltywolty, Oct 24, 2021.

  1. Offline

    voltywolty

    I'm currently making it where if someone is in a certain area, it decreases a boss bars health. I've printed the health in console and it is decreasing, however it is not updating on the bar.

    I'm calling a function called changeBarHealth, however the bar's health is still not changing. Below, I am providing the ShrineBarManager class and the ShrineManager class.

    ShrineBarManager: https://www.toptal.com/developers/hastebin/arirubebep.java
    ShrineManager: https://www.toptal.com/developers/hastebin/edisunepuf.kotlin

    The changeBarHealth is being called in ShrineManager under the decreaseShrineHealth method.
     
    Last edited: Oct 26, 2021
  2. Offline

    voltywolty

    Still can't figure this out... does anyone know what the problem is?
     
  3. Offline

    Kars

    You should debug it yourself without your complicated code. Check if the bossbar will decrease if you call your changeBarHealth function from a controlled testing environment. This way you will know what the problem is.
     
  4. Offline

    voltywolty

    Well I have a printed statement that shows the shrine health that gets displayed on the bar, which it decreases, it’s just the bar that won’t update to show the health.
     
  5. Offline

    Kars

    @voltywolty do as i said anyway to confirm you can create a bossbar that updates in a controlled environment.
    You are likely updating the wrong bossbar or something.
     

Share This Page