Solved Get class/method calling a specific event

Discussion in 'Spigot Plugin Development' started by Islandscout, Jun 1, 2017.

  1. I'm working on a big plugin and I happened to come across a minor issue (though it really is bothering me because I cannot locate the source): my plugin is calling an event when I do not intend it to. I really do not want to iterate through every class to locate the issue.

    Is there a way to get the specific class/method that called the event? I know the specific event being fired, btw.
     
  2. I am not sure but you could try to throw a new Exception and get the stack trace. There may be information about that.
     
  3. Mas

    Mas

    Just search in your project for all the times the specific event is called and work from there by adding debugs etc.
     
  4. Throwing the exception did the trick. Thanks.