Add IgnoreCauseObject of sorts for event listeners
Basically, given this code:
@Listener
public void onSpawn(SpawnEntityEvent event, @Root SpawnCause cause) {
if (event.getCause().first(myplugin.getClass()).isPresent()) {
return;
}
}
We could easily do this for people as well where plugins are inherently throwing events with their own objects for "flagging" essentially. This way plugins don't have the chance to catch their own entity spawns or whatever (since the inverse is already supported with @First).
Could be implemented as `Class<?>[] excludeTypes() default {}; on all of the cause parameter filters.
Or perhaps more cleanly would be a method annotation @IgnoreCause which takes a set of classes and checks cause.contains. Not sure which would be more useful/friendly.
@Deamon5550 I'm pretty sure we added something for this already? or is it still planned?