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

Nametags

Discussion in 'Development' started by MioTaku, Oct 9, 2017.

  1. MioTaku

    MioTaku Witch

    Messages:
    69
    GitHub:
    uselesswaifu
    How to change nametag that only one player can see the change
     
  2. themestl

    themestl Spider Jockey

    Messages:
    39
    GitHub:
    themestl
    PHP:
    //You need to set your metadate's
    $dataProperties = [
    self::DATA_FLAGS => [self::DATA_TYPE_LONG0],
    self::DATA_AIR => [self::DATA_TYPE_SHORT400],
    self::DATA_MAX_AIR => [self::DATA_TYPE_SHORT400],
    self::DATA_NAMETAG => [self::DATA_TYPE_STRING"Put your nametag here! :)"],
    self::DATA_LEAD_HOLDER_EID => [self::DATA_TYPE_LONG, -1],
    self::DATA_SCALE => [self::DATA_TYPE_FLOAT1]
    ];
    $entity->sendData($player$dataProperties);
    Also maybe PMMP have a method to get metadate's.
     
    MioTaku likes this.
  3. Muqsit

    Muqsit Chicken

    Messages:
    1,548
    GitHub:
    muqsit
    Sending the default data properties isn't required, you can just send the data properties you want to update ;) (in this case, it's just the entity nametag)
    PHP:
    $player->sendData($player2, [
        
    Entity::DATA_NAMETAG => [Entity::DATA_TYPE_STRING"Some nametag"]
    ]);
     
    MioTaku and jasonwynn10 like this.
  4. themestl

    themestl Spider Jockey

    Messages:
    39
    GitHub:
    themestl
    Wow. I'll know, thanks
     
    MioTaku likes this.
  5. MioTaku

    MioTaku Witch

    Messages:
    69
    GitHub:
    uselesswaifu
    Thanks Zombie Pigman
     
    Muqsit and SkySeven like this.
  6. SkySeven

    SkySeven Baby Zombie

    Messages:
    145
    GitHub:
    SkySevenMC
    Zombie Pigman ,)
     
  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.