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

Is registering and adding class of command possible?

Discussion in 'Development' started by OguzhanUmutlu, Jan 7, 2021.

?

Is registering and adding class of command possible?

  1. Yes, i am sending code...

  2. Impossible

  3. Its not possible in 3.0.0

  4. Idk

Results are only viewable after voting.
  1. OguzhanUmutlu

    OguzhanUmutlu Witch

    Messages:
    63
    GitHub:
    OguzhanUmutlu
    Is registering and adding class of command possible? :confused:
     
  2. OguzhanUmutlu

    OguzhanUmutlu Witch

    Messages:
    63
    GitHub:
    OguzhanUmutlu
    Normally i am creating file for commands. I don't wanna create file. Is it possible?

    WITHOUT PLUGIN.YML
    WITHOUT COMMAND.PHP
     
    Last edited: Jan 9, 2021
  3. EndermannbugZJFC

    EndermannbugZJFC Slime

    Messages:
    84
    GitHub:
    endermanbugzjfc
    PHP:
    new PluginCommand('command'Plugin main class);
    // Register this command to command map
    // The onCommand() method gets trigger when the command runs
     
  4. Primus

    Primus Zombie Pigman

    Messages:
    749
    You can always handle the user input from chat messages yourself.
     
    OguzhanUmutlu likes this.
  5. OguzhanUmutlu

    OguzhanUmutlu Witch

    Messages:
    63
    GitHub:
    OguzhanUmutlu
    Thanks ;)
    I am gonna use CommandPreProcessEvent if i understood true
     
    Primus likes this.
  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.