Solved Using groups from group manager in my plugin

Discussion in 'Plugin Development' started by banjo-226, Apr 29, 2015.

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

    banjo-226

    Hi, I'm making a command and I want my plugin to be able to get a specific group or groups and list the people online in them.
    For example: If I was an admin online my server and did /staff it'd bring up [STAFF]: Banjo226, [other admins]

    Something like that :p
    I have no clue how to do it either o-o
     
  2. Offline

    robertforyou

    Use Vault, because you will have: "chat.getPrimaryGroup(player)" for get the group name and "player.getGroupPrefix(player.getWorld(), player)" for get the Prefix of they group
     
  3. You can do it with a permission, and get all players with that permission and if you wanna show their rank you can use player.getDisplayName()
     
  4. Offline

    banjo-226

    @MaTaMoR_ Good idea, I'll give it a try

    EDIT: How would I actually display the people online with the permission though?
     
    Last edited: Apr 29, 2015
  5. Offline

    BrickBoy55

    @banjo-226

    Loop through the players, check if they have the permission, then add them to a list.
     
  6. Offline

    banjo-226

  7. Offline

    BrickBoy55

    @banjo-226

    No problem.
    Set the prefix of this thread to solved if it is solved.
     
Thread Status:
Not open for further replies.

Share This Page