Getting online players (perms)

Discussion in 'Plugin Development' started by KingKongC, Jan 18, 2013.

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

    KingKongC

    i would like to know if its possible to get a players online status if they have a permission (eg. myplugin.staffteam) and then list them all on a message one per line .

    I do some pawn programming (SAMP) and it is with foreach since java has not got this i would love some help on how to do it
     
  2. Offline

    ImTheFool

    Not completely sure if this is what you're looking for, but something like this?

    Code:
    for (Player p : Bukkit.getOnlinePlayers())
        if (p.hasPermission("myplugin.staffteam"))
            Bukkit.broadcastMessage(p.getDisplayName());
    
     
  3. Offline

    KingKongC

    Yes like that but i would like it to list each player that has that permission

    EG. ======| Online Staff |======
    Name
    Name
    Name
    And if possible get the rank from EssentialsGroups
     
  4. Offline

    fireblast709

    for the rank, use Vault.
     
  5. Offline

    KingKongC

    Im new to doing this could i be linked to a tutorial for both if possible?
     
Thread Status:
Not open for further replies.

Share This Page