Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-7562

score methods are not working

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • None
    • 1.20.4
    • Bukkit.scoreboard.score
    • Yes

      I'm in 1.20.4 manipulating scoreboard: 

      ```java
      score score = Bukkit.getScoreboardManager().getMainScoreboard().getObjective("OpNum0").getScore("MommyPlease_UwU");
      score.setScore(200);
      int entityScore = score.getScore();
      if (score.isScoreSet()){Bukkit.broadcastMessage("scoreboard");}
      ```

      this code: 
      get the right score
      changes the score to 200
      entityScore is equal to 0 
      and nothing is in the chat (so score is not considered to set)

      I may be wrong and this is an issue from my, but I really don't see what I do wrong.

            Unassigned Unassigned
            Loli.exe I won't
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: