Jump to content

event.execute always giving me an NPE


Recommended Posts

Posted
2 hours ago, Alek said:

Event execute() is an internal method used by the event executor. You can use either

bot.getEventExecutor().execute(event) or the wrapper method which is simply "execute(Event)"

therefore

execute(e); will work

Hi,

Might be a good idea to put this in the docs.
Also, since you probably can't hide this method from the public API, could be a good idea to return an error with a message containing what you just explained whenever the method is called 'inappropriately'.

I remember this part of the API causing me so many headaches back in the day.

Bye

  • Like 2

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...