How do I addon to a player's prefix

Discussion in 'Plugin Development' started by ForbiddenGaming, Sep 19, 2015.

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

    ForbiddenGaming

    How do I addon to a player's prefix? Like can I use the plugin to forcibly add on to a player's prefix with its plugin. For example if I use groupmanager (/mangaddv (group) prefix), is there anyway to run that command through console to the player initiating the command to addon to their prefix? Also, if that is possible, how can I get their rank so like an if statement:
    if(player.hasrank (rank)) {
    }
    ik dats not correct ^
    But is there anyway I can get their rank and implement it into an if statement?
     
  2. Moved to Plugin Development.
     
  3. Offline

    RoboticPlayer

    You would need to hook in to the Permissions manager that you are using (I think you can also hook into Vault).
     
  4. The prefix can vary based on other plugins you are using. But for the other thing you mentioned, rather than trying to make something take effect through a rank, why not just make it permission based so that any group plugin works?
    if(p.hasPermission("perm.ission")){
    }
    "perm.ission" can be whatever you want it to be and when I put "p", that is simply whatever thing you are trying to check for the permission. If you want that to be the sender of the command it would need this above it:
    Player p = (Player)sender;
     
    Last edited: Sep 20, 2015
  5. If you have multiple permissions / groups you may have to check/remove any other permission involved with prefix's from the player
     
Thread Status:
Not open for further replies.

Share This Page