Format question

Discussion in 'Plugin Development' started by Chr0mosom3, Apr 12, 2020.

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


    Hello there, I have a question about formating my plugin,

    Should I have a playerJoin class with the player join event in it, and whenever I need to do anything with the playerJoinEvent do the code in that class, or create a seperate event instance in every single place I need it?
  2. Offline


    @MrDaniel I'm not sure i understand your question exactly but, i usually create one class e.g. "PlayerListener", then have all the events related to the player in there.
  3. Your 1st method could cause too many conflicts. I'd go for the 2nd method.
  4. Offline


    @zThana Are you sure?
    I rather create one instance on enable and pass this. Though in like 99% of cases you don't need to access the event from outside, rather you need to pass variables to the event.
  5. I usually go for the same, depending on the content really.
Thread Status:
Not open for further replies.

Share This Page