/** * @param RCMD $command * @return bool */ public function addCommand(RCMD $command) { if (!$this->isCommandRegistered($command->getName())) { $this->plugin->getServer()->getCommandMap()->register($command->getName(), $command); return true; } return false; }
/** * @param RCMD $command */ public function removeCommand(RCMD $command) { if ($this->isCommandStored($command->getName())) { unset($this->commands[strtolower($command->getName())]); } }