Events Listeners

Hi here says the listeners info but where do I find all events to hook to please:

https://docs.spongepowered.org/master/en/plugin/event/listeners.html

like this does https://github.com/Lergin/Laborus/blob/master/src/main/java/de/lergin/sponge/laborus/listener/BreakBlockListener.java

How do I see all available option thanks.

All events can be found in the org.spongepowered.api.event packages.

The JavaDocs are your friend.

:open_mouth: Wow so many ty

How to implement in my code now? ;o

Can I do something like this:
@Listener
public void onGameInit(GameInitializationEvent event){

}

but with BanUserEvent instead of OnGameInit?

Yes, that’s how the event system works. The first argument to the method is the event type; the method is called when that event is posted.

1 Like