Solved Can I make this better?

Discussion in 'Plugin Development' started by MCnumi, Jul 6, 2016.

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

    MCnumi

    So I'm making a plugin that involves a lot of EntityDamageByEntity Events, should I have them all in different classes, under different event handlers? Or have one large class, with many, many EntityDamageByEntity under one eventhandler?

    I feel like this would also make it lighter on the server, as it wouldn't go through every single class, looking for the correct event whenevet someone hits anothet player.

    Any feedback?
     
  2. @MCnumi You really should just stop posting on 2 sites, Bukkit and Spigot are very different communities, Spigot tends to spoonfeed and can be very toxic. We are all about helping and making people understand by not spoonfeeding. 2 communities = 2 different opinions and can just leave to a very weird plugin.

    Anyway, why are you using a bunch of the same events? Why not just have 1 and have everything in there?
     
  3. Offline

    MCnumi

    Because in my opinion, both communities have a lot of feedback to give, and by posting only on spigot or only on bukkit, I am getting only one perspective. Maybe that sounds odd to you, but there are people on spigot that may know more on this single topic than bukkit, or vice versa. Not only that, but bukkiy has a relatively small community. So you guys may not be available, while some people on spigot may be.. it's not i just crosspost and not respond to one. I appreciate the feedback on that though. Also, I think the reason you believe spigot is toxic is because of the amount of people that use it. The bigger a community, the more toxic people there will be, however in all my time in Spigot I have only met 2 people that were irritating. And I have also met many helpful people from both sites, including you.

    And to address your second question, I have many different eventhandlers for different instances, like a player that uses looting, a player that uses sharpness ect. But I just read a thread on spigot touching the surface of this topic, and realized that it mat have been dumb to keep doing what I was doing.


    EDIT: For anyone else who has this problem and needs the answer, make a custom PlayerDamageByPlayer event and put all events into one class under this one eventhandler.
     
    Last edited: Jul 6, 2016
Thread Status:
Not open for further replies.

Share This Page