/**
* @param EntityDamageByEntityEvent $event
* @priority HIGH
* @ignoreCancelled true
*/
public function onFight(EntityDamageByEntityEvent $event)
{
if (!$this->isFactionWorld($event->getEntity()->getLevel()->getName())) {
return;
}
$victim = $event->getEntity();
$attacker = $event->getDamager();
if (!$attacker instanceof Player or !$victim instanceof Player) {
return;
}
/** @noinspection PhpUnusedLocalVariableInspection */
$at = $this->getFList()->getFaction(Chunk::fromObject($victim));
$attackf = $this->getFList()->getFaction($attacker);
$victimf = $this->getFList()->getFaction($victim);
/** @noinspection PhpUnusedLocalVariableInspection */
$state = $this->getFList()->getFactionsState($attackf, $victimf);
// TODO
}