Listen for ALL events

Discussion in 'Plugin Development' started by Alex5657, Jun 15, 2013.

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

    bitWolfy


    That's how my Statistics does it as well, and it works just fine.
     
  2. Offline

    Technius

    This should be possible with a bit of Reflection hackery. Evil Reflection hackery. To be specific, overriding Bukkit's final PluginManager variable with a custom subclass of SimplePluginManager. Then overriding the callEvent method.
     
  3. Offline

    Sagacious_Zed Bukkit Docs

  4. Offline

    Alex5657

    I am a developer for skyblock.net. The official skyblock server. Noobcrew is very picky about his developers and I am currently one of the 2. And you are telling me that this:
    Is not hate?

    I do not want to talk to you anymore. You seem either immature or just someone who's life is so miserable that he just wants to tell everybody how terrible they are. Good bye. Have a nice life.
     
    Pew446, caseif and ZeusAllMighty11 like this.
  5. Offline

    metalhedd

    Alex5657

    You're free to have whatever opinion of me you choose. I'm quite happy with my life, thanks. I don't consider any of the things you've bolded to be hate.. the first is simply my opinion of people who keep their ideas a secret, and being a complete noob isn't an insult, nor is it hate. I have no problem with complete noobs.

    the rest are equally valid opinions that I currently hold of your plugin and the idea you've described here. I've done nothing but try to guide you in the right direction, because if you spend a little time on these forums you'll see that there are hundreds of posts every day by people who think they know what they're doing and clearly don't. You might be different, but I can't take you at your word for it.
     
  6. Offline

    Alex5657

    Alright, here is my solution:

    Use AspectJ http://forums.bukkit.org/threads/tu...eflection-aspectj-tracing.98400/#post-1319605

    to grab the argument passed into the method of callEvent(). And thats it! That simple! :)

    Hope that helped the other "crazy" people requiring this in their plugins :)

    I know you cant take my word for it. Nor will I try to prove to you that I am not a noob, that is just unnecessary. Lets leave it there, shall we? ;)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 2, 2016
  7. Offline

    metalhedd

    Sure, let me just go back to my miserable existence telling everyone they're terrible...
     
  8. Offline

    Alex5657

    Please dont make a big deal about it. I overreacted. It happens you know. Sorry, mate.
     
  9. Offline

    Minnymin3

    Alex5657

    I still don't get why you need to call all events unless your doing something with all the handlers (which I don't get why you would ever need to do that) or getting all the names (I guess if you are logging EVERY SINGLE EVENT) or checking if they are asynchous (I could see why you might want this but you don't need to call all events to do this). Doing a section of code on every event would cause SO much lag considering an entity spawns about once every few ticks, a player moves many times a second, and many other things like players clicking their inventory, entities moving, entities targeting a player, etc...

    Theres pretty much no way that you would need to check on all of these events with the few things you can get from the Event superclass. If there is a reason, I (and most of the other people who replied to this post) would love to know why and then people would probably love to help you (I know you already found a solution).
     
  10. Offline

    Lanuk

    Right, I am going to trust you are correct when you said this was the only way to do it, but even so, it will cause a lot of lag. Actually, in the past, I tried doing something similar to what you are doing now. I spent days after days trying to get it to work, when I suddenly realized that there was actually a better way to do it that I had NEVER even thought of before. If you are willing to privately release your idea to me, or maybe an official plugin dev that is willing to help, maybe a better solution can be thought out. Otherwise, good luck, and please PM me when the server is out! I am realllllyy curious haha.
     
  11. Offline

    bitWolfy

    Guys, guys, guys. This is obviously solved, the OP found the answer to his question. If he wants to listen to every single event for some reason, let him.
     
    GreySwordz and Hoolean like this.
  12. Offline

    GreySwordz

    metalhedd I was simply saying that I met him while I was a moderator for a server he was developer on. As I know him, I thought adding my opinion in saying that he DOES need to call every event might help. As bitWolfy said, let's end this, and no hard feelings :)
     
  13. Offline

    Hoolean

     
  14. Offline

    gomeow

    Dis thread...
     
  15. Offline

    Gravity

    Locked.
     
Thread Status:
Not open for further replies.

Share This Page