Giving this issue when pvp The Code: PHP: public function DisablePvP(Player $player){ $plugin = $this->plugin; $plugin->getServer()->setConfigInt("difficulty", 0); $pk = new SetDifficultyPacket(); $pk->difficulty = $plugin->getServer()->getDifficulty(); $player->dataPacket($pk); } Code: if($args[0] == "on"){ $this->ActivatePvP(); $pl->sendMessage(T::BLUE."PvP Activated"); }else if($args[0] == "off"){ $this->DisablePvP(); $pl->sendMessage(T::RED."PvP Deactivated");
What do you see that's wrong with calling the function? PHP: public function DisablePvP(Player $player){ Code: $this->DisablePvP();