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:
    11
    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_ Witch

    Messages:
    62
    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.

Share This Page

  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.