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

Name tag visibility

Discussion in 'Development' started by SavionLegendZzz, Sep 18, 2019.

  1. SavionLegendZzz

    SavionLegendZzz Slime

    Messages:
    75
    GitHub:
    savionlegends
    I know you can make name tags invisible and such, but is it possible to make them visible/invisible to a certain player only?
     
  2. TobiasDev

    TobiasDev Spider

    Messages:
    13
    GitHub:
    tobiasg-de
    You might want to set the specific packets for that to just the player you want the tag to be invisible for
     
  3. HeyDeniis_

    HeyDeniis_ Baby Zombie

    Messages:
    137
    Use the SetActorDataPacket, set in the metadata whether the tag will be enabled or disabled d send the package to the player you want
    PHP:
    $pk = new SetActorDataPacket();
    $pk->entityRuntimeId $player->getId();
    $pk->metadata = [Entity::DATA_ALWAYS_SHOW_NAMETAG => [Entity::DATA_TYPE_BYTE1]];
    $playerTo->dataPacket($pk);
     
    HimbeersaftLP likes this.
  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.