Solved PermissionsEx getting rank name?!

Discussion in 'Plugin Development' started by nastasescu, Sep 11, 2014.

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

    nastasescu

    Is possible to get PermissionsEx ranks names? I need for a scoreboard.
     
  2. Offline

    RRServer

    Taken from Pex's Github : https://github.com/PEXPlugins/PermissionsEx/wiki/Integrating-with-PEX

    PermissionUser user = PermissionsEx.getUser(player);

    // Check permission in specific world
    user.has(permission, world); // we recommend to use player.has(permission) in common cases

    // Get player permissions
    String[] permissions = user.getPermissions(world);

    // Returns player's groups in particular world
    String[] groups = user.getParentIdentifiers(world);

    // Set player groups for specific world, use world = null for all worlds
    user.setParentsIdentifier(groups, world);

    // Add player group in all worlds
    user.addGroup(groupName);

    // returns player prefix in specific world
    String prefix = user.getPrefix(world);

    // Returns player option (setting) in specific world
    String playerOption = user.getOption("player-option", world);
     
    nastasescu likes this.
  3. RRServer
    I believe he was requesting to display ALL of the available PermissionsEx ranks on the server, not just ranks of some player.

    nastasescu
    There doesn't seem to be documentation of the PermissionsEx API anywhere, unless the examples shown above are the only available API methods.

    If so, you can fetch the ranks by reading the PermissionsEx group/rank configuration file.
     
  4. Offline

    fireblast709

    PermissionEx -> PermissionManager -> getGroups()
     
  5. Offline

    nastasescu

    RRServer thanks for api! I appreciate it.
    Resolved.
     
Thread Status:
Not open for further replies.

Share This Page