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

Solved Entity in Command

Discussion in 'Development' started by iCirgio, Jan 9, 2018.

  1. iCirgio

    iCirgio Slime

    Messages:
    92
    GitHub:
    lolnova
    Making a vanish plugin and I found out about
    PHP:
                     $sender->setDataFlag(Entity::DATA_FLAGSEntity::DATA_FLAG_INVISIBLEfalse);
    But as the sender instance of Player and not entity it doesn't work so how could I get it to work?
     
  2. Muqsit

    Muqsit Chicken

    Messages:
    1,548
    GitHub:
    muqsit
    It does work, Player extends Human extends Creature extends Living extends Entity.

    The following code un-vanishes the sender
    PHP:
    $sender->setDataFlag(Entity::DATA_FLAGSEntity::DATA_FLAG_INVISIBLEfalse);
    If you change the third argument to true, it vanishes the sender.
     
    OnTheVerge likes this.
  3. iCirgio

    iCirgio Slime

    Messages:
    92
    GitHub:
    lolnova
    Works ty
     
  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.