public String autoComplete(String name){
        String exists = null;
        String query = "SELECT * FROM Player";
        int matches = 0;
        try{
            ResultSet result = query(query);
            while(result.next()){
                String playername = result.getString("name").toLowerCase();
                if(playername.startsWith(name.toLowerCase())){

                    exists = result.getString("name");
                    if(exists.equalsIgnoreCase(name))
                        break;
                    matches++;
                }
            }

        } catch (Exception e){
            reconnect();
            e.printStackTrace();
        }

        if(matches > 1 && !exists.equalsIgnoreCase(name))
            return null;
        return exists;
    }