crwdns148409:0crwdne148409:0

crwdns148411:0:javadoc:crwdne148411:0

crwdns148413:0:javadoc:crwdne148413:0

crwdns148415:0:javadoc:crwdne148415:0

crwdns148417:0crwdne148417:0

crwdns148419:0crwdne148419:0

Note

crwdns148421:0crwdne148421:0

crwdns148423:0:javadoc:crwdne148423:0

crwdns148425:0:javadoc:crwdne148425: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
}

crwdns148427:0crwdne148427:0

crwdns148429:0:javadoc:crwdne148429:0

crwdns148431:0crwdne148431:0

crwdns148433:0:javadoc:crwdne148433:0

crwdns148435:0:javadoc:crwdne148435:0

crwdns148437:0crwdne148437:0

crwdns148439:0:javadoc:crwdnd148439:0:javadoc:crwdnd148439:0:javadoc:crwdne148439:0

crwdns148441:0crwdne148441:0

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

crwdns148443:0:javadoc:crwdnd148443:0:javadoc:crwdne148443:0

Note

crwdns148445:0:javadoc:crwdne148445:0

crwdns148447:0crwdne148447:0

crwdns148449:0crwdne148449:0

Note

crwdns148451:0crwdne148451:0

crwdns148453:0:javadoc:crwdne148453:0

crwdns148455:0:javadoc:crwdne148455:0

crwdns148457:0:javadoc:crwdne148457:0