Solved Why is this a Error?

Discussion in 'Plugin Development' started by TECGaming360, Aug 17, 2014.

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

    TECGaming360

    Code:java
    1. /**
    2.   * Loads all the scoreboards from config for specified player.
    3.   * @param p Player to load scoreboards for.
    4.   */
    5. public void loadScoreboardsSinglePlayer(Player p)
    6. {
    7.  
    8. Scoreboard newBoard = self.sbManager.getNewScoreboard();
    9.  
    10. Objective objective = newBoard.registerNewObjective("LineNumber", "dummy");
    11. objective.setDisplaySlot(DisplaySlot.SIDEBAR);
    12.  
    13. objective.setDisplayName("§3Powerup Stats");
    14.  
    15. Score score = objective.getScore(Bukkit.getServer().getOfflinePlayer("§6Coins: "));
    16. score.setScore(getPlayerCoins(p));
    17.  
    18. p.setScoreboard(newBoard);
    19. }


    There error is the line:
    Code:java
    1. Score score = objective.getScore(Bukkit.getServer().getOfflinePlayer("§6Coins: "));


    "
    Multiple markers at this line
    - The method getOfflinePlayer(String) from the type Server is
    deprecated
    - The method getScore(OfflinePlayer) from the type Objective is
    deprecated
    "
     
  2. Offline

    krazytraynz

    It's not an error, it's a deprecation warning. Your code should work fine.
     
  3. Offline

    TECGaming360

    Ok thank you. Just checking if this would cause a big problem!
     
Thread Status:
Not open for further replies.

Share This Page