Solved Getting all players with a rank and putting it on a sign

Discussion in 'Plugin Development' started by Pacothegint, Nov 11, 2014.

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

    Pacothegint

    Ok so I want to make it so that I can place a sign with lets say Owner and it will find all players in the group and place them on the sign

    [Owner]
    Playername
    Playername
    Playername
    ect.
     
  2. Offline

    reider45

  3. Offline

    Pacothegint

    Thanks that will help for the sign portion. How would I get all the players in the group I want?
     
  4. Offline

    nitrousspark

    Pacothegint
    Iterate over all online or offline players and check if their display name contains [Owner]. If it does, put it on the sign.
     
  5. Offline

    Pacothegint

    nitrousspark
    can you give an an example? I haven't had to do iterations in a while.
     
  6. Offline

    nitrousspark

    Code:
    for (Player player : Bukkit.getOnlinePlayers()) {//stuff}
     
  7. Offline

    ColonelHedgehog

    Just fair warning, you will not be able to fit long names on the signs.
     
Thread Status:
Not open for further replies.

Share This Page