Problem with removing a score from an objective of a Scoreboard

Discussion in 'Plugin Development' started by Paulo_Desticraft, Jun 22, 2013.

Thread Status:
Not open for further replies.
  1. Hi all,

    I'm actually developping a plugin whitch contains scoreboards. I have one scoreboard for each player and I wish remove two scores ("Bombes :" and "Power :") from a player scoreboard objective when he dies. Here is my code :

    Code:java
    1. public void removePersonnalInfosOfAPersonnalBoard(Player player){
    2. Scoreboard board = plugin.getParty().getPartyBoards().get(player);
    3. board.resetScores(Bukkit.getOfflinePlayer(ChatColor.DARK_RED + "Bombes :"));
    4. board.resetScores(Bukkit.getOfflinePlayer(ChatColor.GOLD + "Power :"));
    5. plugin.getParty().getPartyBoards().put(player, board);
    6. }


    The problem is that it doesn't remove these two things. Moreover, when I try to remove the name of the player from the scoreboard objective, it works :/

    I hope you could help me, thanks by advance.

    Paulo.
     
  2. Offline

    RainoBoy97

    player.setScoreboard(board);

    Should do the trick :)
     
  3. Thanks for your help, however it doesn't work, even with :

    Code:java
    1. player.setScoreboard(plugin.getScroreboardManager().getMainScoreboard());
    2. player.setScoreboard(board);


    Does anyone know ? :s
     
  4. Any other idea ?
     
  5. Offline

    ritipinheiro

  6. Offline

    ritipinheiro

  7. Offline

    Darkllama23

  8. Offline

    thecreator153

    You spelled scoreboard wrong
     
  9. I just rewrote it on this forum, that is not the problem.
     
Thread Status:
Not open for further replies.

Share This Page