You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
For many hours I tried to find a solution to make my PurePerms rank appear in the chat, but I can't. I don't know what to do with it and that's why I'm contacting you because I'm just a beginner in php. I hope you understood my question, if you need to specify anything, ask me. If I ask on the wrong page, I apologize in advance.
Code:
(use CortexPE \ HRKChat \ event \ PlaceholderResolveEvent; is more in the other code which if you want I can send too. I wrote the whole code in the GroupJoin plugin, I hope it doesn't matter)
/**
* @param PlaceholderResolveEvent $ev
*
* @priority LOWEST
*/
public function onPlaceholderResolve(PlaceholderResolveEvent $ev, Player $player): void {
if($ev->getPlaceholderName() === "PureChat.players.Rank") {
$ev->setValue((string)$ev->getUserDataMgr()->getGroup($player)->getName());
}
}
[Server] dvodany has joined to server!
[21:06:08] [Server thread/INFO]: The admin dvodany joined the server.
[21:06:10] [Server thread/ERROR]: [HRKChat] Unresolved placeholder 'PurePerms.players.Rank'
[21:06:10] [Server thread/INFO]: [21] [Admin] dvodany NULL > Test
From left to right:
Ping
Rank
Name
PurePerms rank
Message
I am sorry for my bad English.
The text was updated successfully, but these errors were encountered:
dvodany
changed the title
How to add PurePerms placeholder?
How to add PurePerms as placeholder?
Mar 17, 2021
dvodany
changed the title
How to add PurePerms as placeholder?
How to add PurePerms players group as placeholder?
Mar 17, 2021
dvodany
changed the title
How to add PurePerms players group as placeholder?
How to add PurePerms player's group as placeholder?
Mar 17, 2021
Hi,
For many hours I tried to find a solution to make my PurePerms rank appear in the chat, but I can't. I don't know what to do with it and that's why I'm contacting you because I'm just a beginner in php. I hope you understood my question, if you need to specify anything, ask me. If I ask on the wrong page, I apologize in advance.
Code:
(use CortexPE \ HRKChat \ event \ PlaceholderResolveEvent; is more in the other code which if you want I can send too. I wrote the whole code in the GroupJoin plugin, I hope it doesn't matter)
/**
* @param PlaceholderResolveEvent $ev
*
* @priority LOWEST
*/
HRKChat config.yml:
chatFormat:
And this was shown in the console:
From left to right:
Ping
Rank
Name
PurePerms rank
Message
I am sorry for my bad English.
The text was updated successfully, but these errors were encountered: