[SOLVED] PlayerChatEvent event

One second, @Zidane just wrecked that plan. I’ll post updated code shortly.

Update your Maven dependencies to see the change.

EDIT - This should work:

@Listener
public void onChat(MessageSinkEvent event) {
  Optional<Player> playerOptional = event.getCause().first(Player.class);
  if(!playerOptional.isPresent()) return;
  Player player = playerOptional.get();
}

Credit to @blood