Question about Listener classes.

Discussion in 'Plugin Development' started by Paxination, Feb 13, 2014.

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

    Paxination

    Which is best to do, 1 listener class with all your methods in it?

    Or separate listener per method?

    Or categorize them and put those categories in separate classes?
     
  2. Offline

    Pizza371

    Paxination preference ;).
    Personally I prefer just one listener class, unless my plugin is small.
     
  3. Offline

    PM_Co

    Depends on the plugin. Personally, helping 3000 people a day... They ask me for 2 listeners, one for economy (Iconomy if you have it) and the 2nd for broadcasting/advertisement (On Screen) and to give them items. (If not in the Economy listener). Just some advise- PM_Co
     
  4. Offline

    d3v1n302418

    Paxination
    I recommend having more than one listener class, just for organization.
    Pizza371
    Why would you do that? Wouldn't it be one listener class if your plugin is small?
     
  5. Offline

    _Cookie_

    @Paxination
    If you have more then one listener, I would use more then one class since it is more organized.
    It is just easier to find your Listeners, and not have to go through a whole bunch of code just to find what you want. But it is just personal preference, I guess. But I recommend using more then one class :)
     
  6. Offline

    Pizza371

    d3v1n302418
    small - in main class.
    medium/large - one class.
    I never really feel the need as going to the hassle of creating classes for each individual event, too much effort :p
     
  7. Offline

    Paxination

    This is why im asking. I have a bunch and its getting annoying to scroll through that huge list to find the one i need.
     
Thread Status:
Not open for further replies.

Share This Page