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

Solved invisibility animals

Discussion in 'Development' started by KHAV, May 22, 2018.

  1. KHAV

    KHAV Baby Zombie

    Messages:
    152
    GitHub:
    xkhhv
    Hello

    I know if i want to make the player invisibility i use:
    PHP:
          $this->vanish[] = $player->getName();
          
    $player->setDataFlag(Entity::DATA_FLAGSEntity::DATA_FLAG_INVISIBLEtrue);
          
    $player->setNameTagVisible(false);
    But how i can make the animals invisibility?
     
  2. Muqsit

    Muqsit Chicken

    Messages:
    1,548
    GitHub:
    muqsit
    Why not use $player->setInvisible(true)? Same goes for any other entity.
     
    KHAV and Sandertv like 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.