Hi
How can I get the player, which causes this event?
InteractBlockEvent.Secondary
Hi
How can I get the player, which causes this event?
InteractBlockEvent.Secondary
Optional<Player> optPlayer = event.getCause().first(Player.class);
if (optPlayer.isPresent()) {
Player player = optPlayer.get();
}
Great!
Thank you.