Below code...? PHP: function test(EntityDamageByEntityEvent $ev){if($entity instanceof Human){if($entity->getEntityId() == 5){//Here?}} Correct this...?
No... PHP: public function onSlapPEMapModderIDKWhyThough(EntityDamageEvent $event){ $entity = $event->getEntity(); if($event instanceof EntityDamageByEntityEvent){ //Maybe not needed IDK $damager = $event->getDamager(); if($entity instanceof Human && $entity->getId() === 5){ $entity->setOnFire(2); //Blah... } }}
The function name is getId(), not getEntityId(). I would also want to remind you that the entity ID changes every runtime and every time entity is loaded.