Merge pull request #1383 from pmmp/quoted-command-args

Quoted command args & allow playernames with spaces
This commit is contained in:
Dylan K. Taylor
2017-09-15 14:04:48 +01:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@ -223,7 +223,7 @@ class SimpleCommandMap implements CommandMap{
} }
public function dispatch(CommandSender $sender, string $commandLine) : bool{ public function dispatch(CommandSender $sender, string $commandLine) : bool{
$args = explode(" ", $commandLine); $args = array_map("stripslashes", str_getcsv($commandLine, " "));
$sentCommandLabel = ""; $sentCommandLabel = "";
$target = $this->matchCommand($sentCommandLabel, $args); $target = $this->matchCommand($sentCommandLabel, $args);