Scoreboard update no work:

Discussion in 'Spigot Plugin Development' started by xTheMAG, May 10, 2017.

  1. Make sure each score is unique. Also I rather to use teams instead of Scores. (hint; Look at my signature :D)
     
  2. What do you mena by "Update don't work"?
     
  3. i do but i have more placeholder :p
     
  4. Make sure its unique and make sure you delete the score and reset it but I think its better to use teams.
     
  5. I can do onlineCounter.addEntry("<ONLINE>");
     
  6. What do you mean? Have you read the wiki? The wiki explains it well.
     
  7. I can do:

    public void createPlaceholder(Player p, String nume, String replace) {
    Scoreboard board = sb.get(p);
    Objective objective = board.getObjective("test");
    org.bukkit.scoreboard.Team t = board.registerNewTeam(nume);
    t.addEntry(nume);
    t.setPrefix(replace);
    }
     
  8. createPlaceholder(p, "<COINS>", status.getCoins() + "");
     
  9. Use scores fir things you dont update and use teams for things you update. With a team you can set a Prefix, Displayname & Suffix. In there you can also replace placeholders.
     
  10. How can i reset or delete score?
     
  11. getScoreboard and use #resetScores("scoreEntryName");
    Little code I found on Bukkit;

    Code (Text):

    //Online-Players
                if(onlinePlayers != Bukkit.getOnlinePlayers().size()) {
                    obj.getScoreboard().resetScores("§7Online: §f§l" + onlinePlayers);
                }
                obj.getScore("§7Online: §f§l" + Bukkit.getOnlinePlayers().size()).setScore(40);
                onlinePlayers = Bukkit.getOnlinePlayers().size();
     
  12. No work for me :p
     
  13. Very helpful... We can't help with such a short answer with no information provided... Also, like I said couple times. Read my wiki and use Score for objects that dont change and use teams for objects that change.
     
  14. I do that give me error team already exsist you can help me please.i add you on skype
     
  15. The team already exist.. Isn't that self explainable? (Dunno how to say it).
     
  16. Add me on skype: marginean.andrei.gabriel
     
  17. I wont add you. It explains itself.. The team already exist.. (Hint, maybe only register once or unregister it? ....)