Oh right. I thought they were talking about the first post. I'm disappointed about myself for not being able to find that...
Here lol PHP: public function onDamage(EntityDamageEvent $event){$entity = $event->getEntity(); if($event instanceof EntityDamageByEntityEvent){$fizz = new BlazeShootSound($entity);$entity->getLevel()->addSound($fizz);$entity->knockBack($entity, 0, 1, 0, 1); } // KnockBack in PVP} public function onDamage(EntityDamageByBlockEvent $event){$entity = $event->getEntity(); if($event instanceof EntityDamageByEntityEvent){$entity->knockBack($entity, 0, 1, 0, 1); } // KnockBack from block damage, not explosion friendly because you'll fly away}
Also the threads starter should import TextFormat IF you really want that colour when it is loaded like this?lol Idk if it is correct because I am a new starter...XD BTW hope I can open my server on 1st,August.... PHP: use pocketmine\utils\TextFormat as Color;
Yes and no, but a plugin that deals knock back when you are attacked rather than when you've moved across a specific block