Nvm, i figured out how to show faction names with the var {faction} and i added a thing to it so it only shows if your in a faction PHP: if (($fp = $pm->getPlugin("FactionsPro")) !== null) { if(!$fp->isInFaction($player->getPlayer())){ $vars["{faction}"] = $fp->getPlayerFaction($player->getName()); }}
If you want the formated string as you defined in PureChats config.yml you will need to extract the rank from "nametag" or "chat" contents because PureChat doesn't have an extra setting for only the rank. When you have the nametag you could remove the display name from the end by using string operations. (Note: This will only work correctly if all of your nametag definitions are ending with "... {display_name}". You could try this (not tested!): PHP: if (($pp = $pm->getPlugin("PurePerms")) !== null) { $levelName = $player->getLevel()->getFolderName(); $group = $pp->getUserDataMgr()->getGroup($player, $levelName); if (($pc = $pm->getPlugin("PureChat")) !== null) { $nameTag = $pc->getConfig()->getNested("groups." . $group->getName() . "worlds.$levelName.nametag"); $displayName = $player->getDisplayName(); if(substr($nameTag,-strlen($displayName))===$displayName){ $groupName = substr($nameTag, 0, strlen($nameTag)-strlen($displayName)); // will probably still contain a blank at the end $vars["{rank}"] = trim($groupName); } else { $vars["{rank}"] = $group->getName(); } } else { $vars["{rank}"] = $group->getName(); }} If it's enough for you to get the plain unformated rank you could try this (not tested!): : PHP: if (($pp = $pm->getPlugin("PurePerms")) !== null) { $group = $pp->getUserDataMgr()->getGroup($player, $player->getLevel()->getFolderName()); $vars["{rank}"] = $group->getName();} I would recommend to cache the retrieved rank and let BasicHUD read it from cache because the popup task will execute this script probably every second for every player.