How can I get the tag name of a group? Code: #Here it takes the name of the group $rank = $this->api->getUserDataMgr()->getGroup($p)->getName(); #But how do I get the tag from this group? #example: group is "Owner" Tag is "§7[§6Owner§7]"
PHP: /** @var PureChat $pc *//** @var Player $player */$pc = $this->getServer()->getPluginManager()->getPlugin("PureChat");$tag = $pc->getSuffix($player);//or$tag = $pc->getPrefix($player);
Code: public function onEnable{ $pc = $this->getServer()->getPluginManager()->getPlugin("PureChat"); } public function onJoin(PlayerJoinEvent $event){ $player = $event->getPlayer(); $tag = $pc->getPrefix($player); //LINE 47 }
learn OOP, please, just learn OOP. anyways: PHP: public $pc;public function onEnable(){ $this->pc = $this->getServer()->getPluginManager()->getPlugin("PureChat");}public function onJoin(PlayerJoinEvent $ev): void{ $player = $ev->getPlayer(); $this->pc->getPrefix($player);}
i didn't say he shouldn't post here just because he needed help, I suggested him to learn OOP so he does not make posts similar to this again