public function onEntityCollide(Entity $entity)
{
$ProtectL = 0;
if (!$entity->hasEffect(Effect::FIRE_RESISTANCE)) {
$ev = new EntityDamageByBlockEvent($this, $entity, EntityDamageEvent::CAUSE_FIRE, 1);
if ($entity->attack($ev->getFinalDamage(), $ev) === true) {
$ev->useArmors();
}
$ProtectL = $ev->getFireProtectL();
}
$ev = new EntityCombustByBlockEvent($this, $entity, 8, $ProtectL);
if ($entity instanceof Arrow) {
$ev->setCancelled();
}
Server::getInstance()->getPluginManager()->callEvent($ev);
if (!$ev->isCancelled()) {
$entity->setOnFire($ev->getDuration());
}
}