Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //В основном классе
- class Main
- {
- public function onEnable()
- {
- $this->getServer()->getCommandMap()->register('MSCommand', new YouCommand());
- }
- }
- //А это класс самой команды
- class YouCommand extends \pocketmine\command\Command
- {
- public function __construct()
- {
- parent::__construct('command', 'Описание команды', 'Подсказка к команде', []);
- }
- public function execute(CommandSender $sender, $label, array $args)
- {
- //все действия с командой
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment