Hello, I want to know how to disable a just order on a map as: /ban enabled on the world PVP /ban off the world SPAWN thank you in advance
PHP: public function onCommandChat(PlayerCommandPreprocessEvent $event){ $player = $event->getPlayer(); $cmd = explode(" ",strtolower($event->getmessage())); if($cmd[0] == "/ban" or $cmd[0] == "/othercommand" or $cmd[0] == "/othercommand" or $cmd[0] == "/othercommand" or $cmd[0] == "/othercommand"){ if($player->getLevel()->getName() == "Level"){ $player->sendMessage("§4Not Allowed in This world sorry"); $event->setCancelled(true); } } } I have not test code