Instead of only the combo warp having altered kb, all of the warps have kb lower than the default kb. What is the issue with the code? <?php namespace RRdescry\VaserPractice\Managers\ArenaManager\Modules\FFA; use pocketmine\event\entity\EntityDamageByEntityEvent; use pocketmine\event\entity\EntityDamageEvent; use pocketmine\event\Listener; use pocketmine\math\Vector3; use pocketmine\Player; use RRdescry\VaserPractice\Main; class FFAListener implements Listener { public function onAttackEntity(EntityDamageEvent $event): void { $entity = $event->getEntity(); if($entity instanceof Player){ if(Main::$instance->playerManager->players[$entity->getName()]["InArena"][0] == true){ $arena = Main::$instance->playerManager->players[$entity->getName()]["InArena"][0]; if($arena instanceof FFAArena && $arena->name == "Combo"){ if($event instanceof EntityDamageByEntityEvent){ if($entity->distance(new Vector3($entity->getFloorX(), $entity->getFloorY(), $entity->getFloorZ())) < 5){ $event->setKnockBack($event->getKnockBack() * 1); }else{ $event->setKnockBack(0.4); } } } } } } }
Have a check for the world, not whatever PHP: $arena = Main::$instance->playerManager->players[$entity->getName()]["InArena"][0];if($arena instanceof FFAArena && $arena->name == "Combo"){ this is, because whatever it's supposed to do, clearly it's not working.