How can I get a Player (or Entity) fall damage event ? Is there a way to get this in on EntityDamage ??
There are subclasses of the EntityDamageEvent, maybe there could be one. But remember: You always need to detect the parent "EntityDamageEvent" and after that, check with an "instaceof" statement the subclass
PHP: public function onDamage(EntityDamageEvent $ev){ $isFall = $ev->getCause() === EntityDamageEvent::CAUSE_FALL; // TODO handle the event}
PHP: public function onDamage(EntityDamageEvent $event){ if($event->getCause() === EntityDamageEvent::CAUSE_FALL){ $event->setCancelled(); }}