Event handling and parameters

Hi guys!
Yesterday i decided to port a plugin i was previously developing on bukkit/spigot to sponge, and i sort of hit a wall with translating the logic behind the bukkit event handling vs the sponge one.
In particular, i’m having a hard time understanding how sponge expects me to retrieve the event parameters that i’d expect on a bukkit event (for examble: on a block break event, the location of the block). Can anyone help me?
Btw, i’m working with api v.5.0.0

Here’s a good read


Actually, just all the plugin development docs in general make a good read.

And that’s where i headed first! Luckily i understood better the logic behind listeners, but i’m still not confident enough.
The thing is, when i encounter a new event i have to print every time the NamedCauses map to see with which classes i have to work, and kind of reverse engineer to what i need in that particular listener.
You might say “Filters are your friends”, but if i don’t know what i can filter and how’s presented to me, it can be a little tricky to figure out what i should do

Assumption is how I go about it.

public void breakBlock(ChangeBlockEvent.Break e, @First Player p) {

Anything that should be in the cause, assume is in the cause. If it’s not there, print the cause. If it’s totally missing the functionality, make an issue in GitHub.

Yeah, i guess i have no other options ^^ Thanks anyway