DisplayName of scoreboard as DisplayName of the Player

Discussion in 'Plugin Development' started by nite, Aug 23, 2014.

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

    nite

    How do I set the DisplayName of a Scoreboard to the DisplayName of the player?
     
  2. Offline

    Regablith

    objective.setDisplayName(player.getDisplayName);
     
  3. Offline

    nite

    Cannot resolve symbol 'player'
     
  4. Offline

    SkyleTyler1337

    could we see the method used?
     
  5. Offline

    ElliottOlson

    nite How are you getting the player's name? Are you calling it from a method, or passing it into the method you are setting the scoreboard with?

    If you want it to be set with everyone and show their own name for each person. Using the 'for' method (Player player : Bukkit.getOnlinePlayers()), will get their name.
     
Thread Status:
Not open for further replies.

Share This Page