how do u check if the command sent is /op PHP: i tried$player = $event->getPlayer();$message = $event->getMessage();if (!strpos($message, "/op")) { $player->sendMessage("ok"); }else{ $player->sendMessage("kick"); }
Use PlayerCommandPreprocessEvent (what a long event name ) and check if explode(" ", $message, 2)[0] equals "/op".