Um.. I have a question.. how to use a pocketmine\command\CommandMap::register(); ... Please give me to do that...
PHP: namespace your\name\space;use pocketmine\command as cmd;class MyCommand extends cmd\Command implements cmd\PluginIdentifiableCommand{ private $plugin; public function __construct(MainClass $plugin){ parent::__construct("cmdname", "description", "usage", ["aliases"]); $this->setPermission("your.command.permission.node"); $this->plugin = $plugin; } public function getPlugin(){ return $this->plugin; } public function execute(cmd\CommandSender $sender, $label, array $args){ // your code here }} PHP: namespace your\name\space;use pocketmine\plugin\PluginBase;class MainClass extends PluginBase{ public function onEnable(){ $this->getServer()->getCommandMap()->register(new MyCommand($this)); }}