crwdns129183:0crwdne129183:0

crwdns129185:0:javadoc:crwdne129185:0

crwdns129187:0:javadoc:crwdne129187:0

crwdns129189:0:javadoc:crwdne129189:0

crwdns129191:0crwdne129191:0

crwdns129193:0crwdne129193:0

Note

crwdns129195:0crwdne129195:0

crwdns129197:0:javadoc:crwdne129197:0

crwdns129199:0:javadoc:crwdne129199:0

@Listener
public void onEvent(ExampleCauseEvent event) {
    Cause cause = event.getCause(); // [Player, Entity]
    Optional<Player> firstPlayer = cause.first(Player.class); // 1
    Optional<Entity> firstEntity = cause.first(Entity.class); // 2
}

crwdns129201:0crwdne129201:0

crwdns129203:0:javadoc:crwdne129203:0

crwdns129205:0crwdne129205:0

crwdns129207:0:javadoc:crwdne129207:0

crwdns129209:0:javadoc:crwdne129209:0

crwdns129211:0crwdne129211:0

crwdns129213:0:javadoc:crwdnd129213:0:javadoc:crwdnd129213:0:javadoc:crwdne129213:0

crwdns129215:0crwdne129215:0

@Listener
public void onGrow(ChangeBlockEvent.Grow event) {
    Optional<Player> notifier = event.getCause().get(NamedCause.NOTIFIER, Player.class);
}

crwdns129217:0:javadoc:crwdnd129217:0:javadoc:crwdne129217:0

Note

crwdns129219:0:javadoc:crwdne129219:0

crwdns129221:0crwdne129221:0

crwdns129223:0crwdne129223:0

Note

crwdns129225:0crwdne129225:0

crwdns129227:0:javadoc:crwdne129227:0

crwdns129229:0:javadoc:crwdne129229:0

crwdns129231:0:javadoc:crwdne129231:0