Overriding /help

Discussion in 'Development' started by Brant, Mar 25, 2020.

  1. Brant

    Brant Slime

    Messages:
    97
    GitHub:
    tetroyt
    i have made a customhelp GUI plugin and i want it to over ride the default /help command, right now it only shows the default help message when i type /help, but i know my plugin works because ive tried it with a different command

    Here is what i have so far

    PHP:
        public function onEnable()
        {
        if(!
    InvMenuHandler::isRegistered()){
            
    InvMenuHandler::register($this);
       }
     }

        public function 
    onCommand(CommandSender $senderCommand $cmdstring $label, array $args) : bool{
            switch(
    strtolower($cmd->getName()))
            {
                case 
    "help":

                        
    $warpmenu InvMenu::create(InvMenu::TYPE_CHEST);
     
  2. Brant

    Brant Slime

    Messages:
    97
    GitHub:
    tetroyt
    didnt work
     
  3. Levi

    Levi Skeleton

    Messages:
    866
    GitHub:
    captainleviftw
    Unregister the default help command and create your own
     
  4. wolfdale

    wolfdale Zombie

    Messages:
    396
    The help command is client side, the client will not send the command to server
     

Share This Page

  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.