So, I am making a KitPvP plugin dedicated towards my server. On death, I want to make an explosion that will knock players back, but will not break any blocks or cause any damage. I tried looking at these but I still couldn't figure it out: ---------------------------------------------------------------------------------------------------------------------- https://github.com/pmmp/PocketMine-...1fc63b3ab7/src/pocketmine/level/Explosion.php ----------------------------------------------------------------------------------------------------------------------- https://github.com/pmmp/PocketMine-...95/src/pocketmine/entity/object/PrimedTNT.php ----------------------------------------------------------------------------------------------------------------------- Can anyone help me with this? Thanks alot in advance!
Look at the function explodeB and remove the part that creates EntityDamageEvents and attacks using them and the part that ignites nearby blocks.
I got everything besides the knockback (which is ok since I don't really need it for KitPvP), thank you! PHP: $level = $player->getLevel(); $level->addParticle(new HugeExplodeSeedParticle($player->getPosition())); $level->broadcastLevelSoundEvent($player->getPosition(), LevelSoundEventPacket::SOUND_EXPLODE);
For future reference, the knockback is applied here: https://github.com/pmmp/PocketMine-...78423/src/pocketmine/level/Explosion.php#L201