Solved Most efficient way to create/set/remove multiple scoreboards?

Discussion in 'Plugin Development' started by ItsComits, Oct 30, 2017.

Thread Status:
Not open for further replies.
  1. Offline

    ItsComits

    Hello, As the title say I am wanting to find out the most efficient way to create/set/remove multiple scoreboards. Would I save all the scoreboards in a map or 1 map per scoreboard? Any help is greatly appreciated. :D
     
  2. Offline

    Zombie_Striker

    @ItsComits
    What exactly are you trying to achieve?
     
  3. Offline

    ItsComits

    @Zombie_Striker I am making a game that has up to 3 scoreboards. Before Countdown, Countdown and when the game starts. I am wanting to make these scoreboards as efficient as possible.
     
  4. Offline

    MightyOne

    you mean to present the all necessary information but also very compact?
     
  5. Offline

    ItsComits

    @MightyOne Yes. I was thinking about creating a scoreboard for each enum, Then within that class get all the necessary data that will be presented on the scoreboard from a config. Then create a method to check/set/remove the scoreboard etc. I am unsure if there is a better way of doing this.
     
  6. Offline

    MightyOne

    Sorry i though you meant the content you want to show on the scoreboard. I dont know a lot about scoreboards and therefore do not know it is a good idea to store them anywhere. I mean i heard that it has to be reset sometimes but why not storing them in an ArrayList?
     
  7. Offline

    ItsComits

    @MightyOne Would I not need to store the scoreboard in a map so that I can add & remove players from the scoreboard?
     
  8. Offline

    MightyOne

    You just need pointers to your scoreboards. So it is totally unimportant if you store 3 ScoreBoards in a List or a Map. If you had 100 at the same time i would start to think about efficiency but not with 3 scoreoards
     
  9. Offline

    ItsComits

    @MightyOne The thing is, I might be adding allot more scoreboards in the future so I am trying to be as efficient as possible
     
  10. Offline

    MightyOne

    How do you want to access them? I mean you said you would use them in a specific order so maybe the arraylist is the best solution for you
     
  11. Offline

    ItsComits

    @MightyOne So I would use the ArrayList like a check so that the scoreboards will go into a specific order?
     
  12. Offline

    MightyOne

    why not
     
Thread Status:
Not open for further replies.

Share This Page