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

Sub Commands

Discussion in 'Development' started by JblusMC, Aug 13, 2018.

  1. JblusMC

    JblusMC Spider

    Messages:
    14
    hello, I do not remember how to do sub commands, unfortunately, my plugins with the subcommands that I did, I'm no longer, so can you tell me how we do it already?
     
  2. corytortoise

    corytortoise Skeleton

    Messages:
    825
    GitHub:
    corytortoise
    For command arguments, assuming you have onCommand correctly in your PluginBase file, and you've registered the command in plugin.yml, you just use the $args array from onCommand. It's an array, so $args[0] is the subcommand, if the command sender used one.
     
    Muqsit likes this.
  3. JblusMC

    JblusMC Spider

    Messages:
    14
    OK, thanks
     
  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.