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

Entity\NPC

Discussion in 'Plugin Help' started by NiLen, Jun 21, 2021.

  1. NiLen

    NiLen Spider

    Messages:
    8
    Hi there! How to create a simple zombie?
     
  2. minijaham

    minijaham Skeleton

    Messages:
    801
    GitHub:
    minijaham
    Simply spawn it in(already registered in pmmp by default)
    On entityDamageEvent, cancel the event if it is a zombie to prevent it from being damaged.
    setImmobile to true so it cannot move.
     
    Agent likes this.
  3. NiLen

    NiLen Spider

    Messages:
    8
    I meant how to spawn a simple zombie using code(PHP)
     
  4. minijaham

    minijaham Skeleton

    Messages:
    801
    GitHub:
    minijaham
    PHP:
    // PM3
    $entity Entity::createEntity("Zombie"$level$nbt);

    // PM4
    new Zombie
     
    Agent 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.