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

If entity exists

Discussion in 'Facepalm' started by LucGamesDE, Jun 6, 2017.

  1. LucGamesDE

    LucGamesDE Baby Zombie

    Messages:
    170
    I want to add a addEntityPacket to a player if the packet with id $id not exists. What I tried didn't work.
    PHP:
    if($p->level->getEntity($id) != null) {
    //Packet exists
    } else {
    //Don't exists
    }
     
  2. LucGamesDE

    LucGamesDE Baby Zombie

    Messages:
    170
    One question. Why was this a bad post???
     
  3. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    I have no idea what you're trying to ask.
     
  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.