mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-04 09:10:00 +00:00
Add support for quoting command arguments
Un-escape quotes in inputted strings
This commit is contained in:
parent
825d4f9702
commit
319735db3a
@ -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);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user