Add support for quoting command arguments

Un-escape quotes in inputted strings
This commit is contained in:
Dylan K. Taylor 2017-09-12 22:18:16 +01:00
parent 825d4f9702
commit 319735db3a

View File

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