bukkit PlayerJoinEvent


Example

public class PlayerJoinListener implements Listener {
    @EventHandler
    public void onPlayerJoin(PlayerJoinEvent evt) {
        Player joined = evt.getPlayer();
        String joinedName = joined.getName();

       //RETRIEVING THE JOIN MESSAGE ALREADY SET
       String joinMessage = evt.getJoinMessage();

       //SETTING THE JOIN MESSAGE
       evt.setJoinMessage(joinedName + " has joined the game");

       //CLEARING THE JOIN MESSAGE
       evt.setJoinMessage(null);
    }
}