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

Commands in extra classes

Comments in 'Plugin Development' started by DeltaDrizz, Jul 28, 2015.

  1. DeltaDrizz
    Offline

    DeltaDrizz New Member

    Joined:
    Jul 28, 2015
    Posts:
    2
    Minecraft User:
    DrizzleBeat_98
    Hey, I would ask if you can put your commands in extra classes and 'register' them which such an method in Bukkit?

    Example:
    TestCommand.php: class TestCommand implements....{
    onCommand(){}
    }

    Main php File(bukkit way)
    onEnable() {
    getCommand("test").setExecutor(new TestCommand());

    This is only simplified code, I'm searching for such a thing in PM :)
  2. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Yes. basically the same classes and methods; you can find them in the docs.

    @since July 2014

Share This Page

Advertisement