i have an plugin of level,when player updated to next level,the server will touch off consolecommand but $this->getServer()->dispatchCommand(new ConsoleCommandSender(), "key lv".$name." 1"); when sky sky 870 updated Lv2 the console will touch off the command but the player name have space cause the command wiil not give the player key carefully. how to change space to __?
PHP: $this->getServer()->dispatchCommand(new ConsoleCommandSender(), 'key lv "'.$name.'" 1'); Your welcome