public function onDamage(EntityDamageByEntityEvent $event){ if($event->getDamager() instanceof Player and $event->getEntity() instanceof Player){ $damager = $event->getDamager(); $ih = $damager->getInventory()->getItemInHand(); if($ih->getId() == 280){ $pl = $event->getEntity(); $pl->setMotion(new Vector3(0, 8, 0)); $pl->sendMessage(TF::GOLD."Author".TF::RED.":".TF::GREEN." PeGaH\n".TF::GOLD."TelegramID".TF::RED.":".TF::GREEN." @P_3_G_A_H"); } } } why this code dont work? i want to make a this plugin : if player1 damage to player2 with stick in hands player2 jump
yes plugin loaded and command are working but player1 damage time with stick player2 dont jump and dont send message