public static void banPlayer( String bannedBy, String player, String reason ) throws SQLException {
        BSPlayer p = PlayerManager.getPlayer( bannedBy );
        BSPlayer t = PlayerManager.getSimilarPlayer( player );
        if ( t != null ) {
            player = t.getName();
        }
        if ( !PlayerManager.playerExists( player ) ) {
            p.sendMessage( Messages.PLAYER_DOES_NOT_EXIST );
            return;
        }
        if ( isPlayerBanned( player ) ) {
            p.sendMessage( Messages.PLAYER_ALREADY_BANNED );
            return;
        }
        if ( reason.equals( "" ) ) {
            reason = Messages.DEFAULT_BAN_REASON;
        }
        SQLManager.standardQuery( "INSERT INTO BungeeBans (player,banned_by,reason,type,banned_on) VALUES ('" + player + "','" + bannedBy + "','" + reason + "','ban',NOW())" );
        if ( PlayerManager.isPlayerOnline( player ) ) {
            disconnectPlayer( player, Messages.BAN_PLAYER_MESSAGE.replace( "{message}", reason ).replace( "{sender}", bannedBy ) );
        }
        if ( BansConfig.broadcastBans ) {
            PlayerManager.sendBroadcast( Messages.BAN_PLAYER_BROADCAST.replace( "{player}", player ).replace( "{message}", reason ).replace( "{sender}", bannedBy ) );
        } else {
            p.sendMessage( Messages.BAN_PLAYER_BROADCAST.replace( "{player}", player ).replace( "{message}", reason ).replace( "{sender}", bannedBy ) );
        }
    }