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

Solved Help with on command

Discussion in 'Development' started by MCAMD, Sep 12, 2018.

  1. MCAMD

    MCAMD Creeper

    Messages:
    3
    GitHub:
    elwakilz
    In the game when i type /easyshop
    Neither auto complete nor command working
    Any help

    Here is code

    PHP:
      public function onCommand(CommandSender $playerCommand $commandstring $label, array $args) : bool{
        switch(
    strtolower($command)){
          case 
    "easyshop":
            
    $this->sendMainShop($player);
            return 
    true;
        }
      }
     
    Last edited: Sep 12, 2018
  2. DaPigGuy

    DaPigGuy Slime

    Messages:
    86
    GitHub:
    DaPigGuy
    The only reason it wouldn't show in auto complete would be because you did not register the command.
     
  3. Minetron26

    Minetron26 Witch

    Messages:
    55
    GitHub:
    minetron26
    Yes, you must register the command in the plugin.yml file
     
  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.