This disables PvP on the server. If u always to disable it only in some world's use this: PHP: public function onDamage(EntityDamageEvent $event) {$entity = $event->getEntity();$worlds = array("world1", "world2");foreach($worlds as $world) {if ($player->getLevel()->getName() === $world) {$event->setCancelled();}}} *This blocks the damage for every entity. If u want to block it only for players, u need to check if $entity is a Player