Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Commands Folder

Comments in 'Plugin Development' started by BlubberBoy333, May 30, 2015.

  1. BlubberBoy333
    Offline

    BlubberBoy333 Active Member

    Joined:
    Aug 31, 2014
    Posts:
    177
    Minecraft User:
    Blubberboy333
    I'm making a new plugin that is going to have multiple commands in it. I want to have a commands folder in the source file so I can easily call the commands, and not have to write a bunch of code for each command on one file. My only problem is, I don't know how to call the commands when I need to . Can someone help me out with this?
  2. EvolSoft
    Offline

    EvolSoft Notable Member Plugin Developer

    Joined:
    Sep 10, 2014
    Posts:
    821
    Plugins:
    15
    Minecraft User:
    Flavius12
    Do you mean something like registering commands at runtime (instead of writing them on plugin.yml)?
  3. BlubberBoy333
    Offline

    BlubberBoy333 Active Member

    Joined:
    Aug 31, 2014
    Posts:
    177
    Minecraft User:
    Blubberboy333
    Yeah, like how there is a commands folder in the EssentialsPE plugin
  4. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    In EssentialsPE, the command classes are registered as command classes (rather than using PluginCommand, the class used for commands registered at plugin.yml) in onEnable via Server->getCommandMap()->registerAll()

Share This Page

Advertisement