Your title says “Help!!!” and you ask a question like that ;-; Any previous attempts? Rename your title to something more descriptive
If you’re trying to give the player OP when he/she gets hit by another player, try this code: PHP: use pocketmine\event\entity\EntityDamageByEntityEvent; // don’t forget to add the event’s class (and register the Listener)public function onEntityDamage(EntityDamageByEntityEvent $event) { $damager = $event->getDamager(); $entity = $event->getEntity(); if($damager instanceof Player && $entity instanceof Player) { // if damager and hit entity are players $entity->setOp(); // gives the hit player OP }}