Scoreboard below_name

Discussion in 'Spigot Plugin Development' started by Arthurhoeke, May 10, 2015.

  1. Hi,
    I want to create a scoreboard below_name, and it works for me, but it automaticly puts 0 before the string. How can I edit this 0 to any number I want?

    Code:
    Code (Text):
                              test = b.registerNewObjective("lives", "dummy");
                                test.setDisplaySlot(DisplaySlot.BELOW_NAME);
                                test.setDisplayName("Level");
                               
                                test.getScore(Bukkit.getOfflinePlayer("Level")).setScore(5);
                                test.getScore("Level").setScore(5);
     
  2. Yeah you just have to set the player's score and it will be updated.
     
  3. How to set the player's score?
     
  4. Have you tried... getScore(OfflinePlayer)?
     
  5. Yes
    test.getScore(Bukkit.getOfflinePlayer("Level")).setScore(5);
     
  6. Hmm, I dont work with scoreboards, but I think it has something todo with the getOfflinePlayer() part
     
  7. I remember doing this is 1.7 but its no longer working in 1.8 for some strange reason.
     
  8. I meant with players.
     
  9. Yeah done that, but didn't work