1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Changing Player Tag to His PurePerm Tag

Discussion in 'Plugin Help' started by WEATHERCRAFTYT1, Oct 20, 2020.

  1. WEATHERCRAFTYT1

    WEATHERCRAFTYT1 Baby Zombie

    Messages:
    121
    Hello I was wondering this code in my teams plugin
    Code:
    $player->setNameTag($player);
    Lets just say my PurePerm tag is
    Owner> Player
    When this code runs I get this
    Player
    What I want is to give the Player it’s original rank.
    Any way to make this happen
     
  2. IvanCraft623

    IvanCraft623 Baby Zombie

    Messages:
    105
    GitHub:
    IvanCraft623
    Use:

    PHP:
    $player $event->getPlayer();
    $levelName  $this->getServer()->getPluginManager()->getPlugin("PureChat")->getConfig()->get("enable-multiworld-chat") ? $player->getLevel()->getName() : null;
    $nametag $this->getServer()->getPluginManager()->getPlugin("PureChat")->getNametag($player$levelName);
    $player->setNameTag($nametag);
    I hope I've helped! :D
     
    Primus likes this.
  3. WEATHERCRAFTYT1

    WEATHERCRAFTYT1 Baby Zombie

    Messages:
    121
    No u really helped thanks!!
     
  4. IvanCraft623

    IvanCraft623 Baby Zombie

    Messages:
    105
    GitHub:
    IvanCraft623
    Mark it as Solved :D
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.