public function onDeath(PlayerDeathEvent $event) { if ($this->isEnabled() == true) { $event->setCancelled(); } }