Hello there, I am just trying to get a command that forwards the entered command to console like this: Code: /example <command> I got that working some time ago for API 3.0.0, but now the class pocketmine\command\ConsoleCommandSender seems to be gone. Therefore my code: PHP: $this->getServer()->dispatchCommand(new ConsoleCommandSender(), trim(implode(" ", $args))); results in the following error. Code: Error: "Class "pocketmine\command\ConsoleCommandSender" not found" (EXCEPTION) in "plugins/(plugin)/src/(author)/(plugin)/Main" at line (line)
In case someone reading this didn't get what I'm asking for: How could I change my code to now implement such a command using up-to-date versions of Pocketmine?
You wrongly imported ConsoleCommandSender This is right: PHP: use pocketmine\console\ConsoleCommandSender;
No... No I did not. That exact same line is where it belongs. But as you can see here: https://github.com/pmmp/PocketMine-MP/tree/stable/src/command There is no class ConsoleCommandSender there anymore.