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

Overriding /help

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

  1. Brant

    Brant Baby Zombie

    Messages:
    104
    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 Baby Zombie

    Messages:
    104
    GitHub:
    tetroyt
    didnt work
     
  3. Levi

    Levi Skeleton

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

    wolfdale Zombie Pigman

    Messages:
    535
    GitHub:
    diamond-gold
    The help command is client side, the client will not send the command to server
     
  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.