class PlayerListener implements Listener {

    @EventHandler(priority = EventPriority.LOW)
    public void onPlayerLogin(PlayerLoginEvent event) {
        final Player player = event.getPlayer();
        final String name = player.getName();

        if (validationService.isUnrestricted(name)) {
            return;
        }

        if (onJoinVerifier.refusePlayerForFullServer(event)) {
            return;
        }
        if (event.getResult() != PlayerLoginEvent.Result.ALLOWED) {
            return;
        }

        if (!isAsyncPlayerPreLoginEventCalled || !settings.getProperty(PluginSettings.USE_ASYNC_PRE_LOGIN_EVENT)) {
            try {
                runOnJoinChecks(JoiningPlayer.fromPlayerObject(player), event.getAddress().getHostAddress());
            } catch (FailedVerificationException e) {
                event.setKickMessage(m.retrieveSingle(player, e.getReason(), e.getArgs()));
                event.setResult(PlayerLoginEvent.Result.KICK_OTHER);
            }
        }
    }

}