How to get OnlinePlayers in a Certain Group

Discussion in 'Plugin Development' started by sofakingcool, Oct 11, 2011.

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

    sofakingcool

    is it possible to get the onlineplayers that are on in a certain group? like when someone types /who it will show my custom groups

    ex.
    Admins: Sofakingcool
    Mods: example
    players: example
    Total Players on: 3
     
  2. Offline

    Celeixen

    You would need to hook into a permissions plugin because the default bukkit system doesn't use permission groups.

    You could create a config where the admin inputs all the player names into the correct groups.
     
  3. Offline

    AinSophAur

    I think you should be able to read it from the permissions.yml itself.
     
  4. Offline

    wwsean08

    but as celeixen mentioned the default permissions.yml doesn't use groups, so you can't do what the OP wants to do that way.
     
  5. Offline

    sofakingcool

    how would i set this up, would i need a playlistener? start me off a little with some code
     
  6. Offline

    wwsean08

    for(Player player : Bukkit.getServer().getOnlinePlayers()){
    //find out if the player is in a certain group
    //display him if he is in the group you want
    }
     
Thread Status:
Not open for further replies.

Share This Page