Vault - Removing all groups from player.

Discussion in 'Plugin Development' started by Regablith, Nov 9, 2014.

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

    Regablith

    Hey. So I am working with the Vault API, making my own /setrank command and when I give a player a group it does not remove the other ones. So I can do /setrank Regablith admin and it will still have me listed as (Example) Admin and Donator.

    This is what I currently have. Which does not remove their current group.
    Code:java
    1.  
    2. for(String groups : Core.p.getGroups()) {
    3. if(Core.p.playerInGroup(player, groups))
    4. Core.p.playerRemoveGroup("world", player, groups);
    5. }
    6. Core.p.playerAddGroup(player, rankName);
    7.  
     
  2. You defined "playerRemoveGroup" somewhere and it would be helpful if you would write the definition here because I don't know what "playerRemoveGroup" manages (manages in code). Thanks ;D
     
  3. Offline

    Regablith

  4. Offline

    Regablith

Thread Status:
Not open for further replies.

Share This Page