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

Updating nametag

Discussion in 'Development' started by Levi, Jun 10, 2018.

  1. Levi

    Levi Skeleton

    Messages:
    955
    GitHub:
    captainleviftw
    How can I update my kills on my name tag every time i get a kill?
    I use PureChat for nametags and I made a {kills} to be in PureChat config.

    PHP:
    in pureChat.php
    public function getKillsAPI(){
          return 
    KillCounter::getInstance();
        }
     
    $string str_replace("{kill}",$this->getKillsAPI()->getKills($player), $string);

    my plugin

    public static function getKills(Player $player)
        {
            
    $uuid strtolower($player->getUniqueId());
            return 
    self::$kills[$uuid];
        }
     
  2. Awzaw

    Awzaw Zombie Pigman Poggit Admin

    Messages:
    726
    GitHub:
    awzaw
    You are going to get warning points for duplicate threads any minute I reckon ...
     
  3. Levi

    Levi Skeleton

    Messages:
    955
    GitHub:
    captainleviftw
    my last post was adding players to array faster than purechat setting nametag how are they duplicate this is updating nametag
     
  4. Epic

    Epic Creeper

    Messages:
    4
    Just use your own nametag / chat system instead then :)
     
  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.