BossBar through reload

Discussion in 'Spigot Plugin Development' started by Astro, May 23, 2016.

  1. I'm looking to find the simplest way to utilize the new BossBar function in the 1.9 API and have it save through reload, what I'd need to save is what player the BossBar is given to, and the BossBar's progress and then load it back in after reload. I have a few ideas running through my head but I'd like more opinions on the least laggy and best way to go about it.
     
  2. Well, show us the ways youve tried so far.
     
    • Agree Agree x 2
  3. Currently as of now, I haven't tried anything. I just want opinions/ideas on how other people would go about it, I'm not looking to be spoonfed, just looking for ideas.

    The idea I have running through my head would be saving all the bars to a global list formatted something like barName:barColor:barTitle etc then save that to a config as a string for each bar and load it from the config post reload. It sounds like work and I don't know if it'd be laggy or not.

    Another idea would be saving a HashMap<List<Player>, BossBar> but that just sounds super intensive to me and I think the first option would be more likely.
     
  4. MiniDigger

    Supporter

    I don't see your problem here.
    just save all the stuff to the config and load it when the player joins.
     
  5. It's not really as much of a problem as it is
    >.>