1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

How do I override the /help command?

Discussion in 'Help' started by kenygamer, Jan 17, 2018.

  1. kenygamer

    kenygamer Banned Banned

    Messages:
    106
    GitHub:
    kenygamer
    Some time ago, you could do
    PHP:
    public function onPlayerCommandPreprocess(\pocketmine\event\player\PlayerCommandPreprocessEvent $event) : void{
      
    $player $event->getPlayer();
      
    $command explode(" "$event->getMessage());

      if(
    $command === "/help"){
        
    $player->sendMessage("Overriding /help");
        
    $event->setCancelled();
       }
    }
    to override the /help command. The other way would be to unregister the command.

    Since /help is client side, what I can do?
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.