Question about Packages and Cmd-ex classes

Discussion in 'Plugin Development' started by Fiddy_percent, Jul 30, 2014.

Thread Status:
Not open for further replies.
  1. Offline


    If I put my classes (which are all in one Package) into different packages to organize them will I have to change how I get those in different packages or is it all the same?

    And is is bad to have more then one command ex class because I have way to many commands to just put in one class I have to scroll down forever D:
  2. Offline


    If you move your classes to different packages you will need to update your imports if they are used in other classes. If you are using an IDE, which I imagine you would be, then it should either do this for you or provide easy functionally to do this for you (shortcut key for example).

    It's perfectly fine to divide your commands among multiple classes. You can register multiple command listener in you onEnable or build a command manager, so you have one class which implements CommandExecutor and that calls other classes for different sub commands, or how ever you wish to manage your commands.
    Fiddy_percent likes this.
  3. Offline


  4. Offline


    Having big classes isn't such a big deal though, unless it makes sense to separate the class (i.e. chair having a leg subclass, or main having a commands subclass), because you can just ctrl-f to find the method/command you want.
Thread Status:
Not open for further replies.

Share This Page