Remove all scores/entries from a scoreboard

Discussion in 'Spigot Plugin Development' started by Faraaz, Jun 11, 2017.

  1. Hi Everyone,

    How do I remove all the entries/scores from a scoreboard/sidebar?

    [​IMG]

    Thanks,
    Faraaz
     
  2. I don't know, if this code would to the trick, but you can try it out:
    Code (Text):

    scoreboard.clearSlot(DisplaySlot.SIDEBAR);
     
     
  3. Thanks for the answer. So this completely creates the board of any set scores?
     
  4. You can read what the method does from the java, here is a link.

    It says "Clears any objective in the specified slot", but i'm not sure what that does mean exactly, you would need to check if the Objective is being unregistered or only the Scores are being removed.
     
    • Useful Useful x 1
    • Useful Useful x 1