Development Assistance Getting PEX Group Prefix Colors

Discussion in 'Plugin Help/Development/Requests' started by bcurtiswx, Feb 6, 2016.

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

    bcurtiswx

    I seem to not understand how to get the colors from a users displayname to use. Also (for this question's case) I'm trying to grab the users group prefix from PEX _with_ the colors. But when I player.sendMessage with what what I think should have the colors, it doesn't.

    Code:
    Player player = (Player) sender;
    PermissionUser user = PermissionsEx.getUser(player);
    if(player.hasPermission("mcego.adm.receive")){
            p.sendMessage(ChatColor.GREEN + "(ADMINS) " + ChatColor.RESET + ChatColor.translateAlternateColorCodes('&', user.getParentIdentifiers(player.getWorld().getName()) + " " + player.getPlayerListName() + ": " + message));
    }
    
    How do I get the colors from the displayname and/or pex group prefix?

    I am new to this. Thanks for any help.

    Maybe there's a way in EssentialsChat to do this?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Feb 6, 2016
Thread Status:
Not open for further replies.

Share This Page