src/main/java/dev/gardeningtool/namemc/web/RequestUtil.java
@SneakyThrows
    public static UUID uuid(String username) throws IllegalArgumentException {
        Request request = getRequest("https://api.mojang.com/users/profiles/minecraft/" + username + "?at=0");
        Map<?, ?> map = request.map();
        if (map == null) {
            throw new IllegalArgumentException(String.format("%s is not a valid username!", username));
        }
        return UUID.fromString(insertDashUUID(map.get("id").toString()));
    }
/**
     * @param username The username associated with a UUID
     * @return The UUID of the specified argument
     * @throws IllegalArgumentException If the username is invalid
     */
@param username The username associated with a UUID
@return The UUID of the specified argument
@throws IllegalArgumentException If the username is invalid
@param username The username associated with a UUID @return The UUID of the specified argument @throws IllegalArgumentException If the username is invalid
@SneakyThrows
    public static UUID uuid(String username) throws IllegalArgumentException {
        Request request = getRequest("https://api.mojang.com/users/profiles/minecraft/" + username + "?at=0");
        Map<?, ?> map = request.map();
        if (map == null) {
            throw new IllegalArgumentException(String.format("%s is not a valid username!", username));
        }
        return UUID.fromString(insertDashUUID(map.get("id").toString()));
    }
@ SneakyThrows public static UUID uuid ( String username ) throws IllegalArgumentException { Request request = getRequest ( "https://api.mojang.com/users/profiles/minecraft/" + username + "?at=0" ) ; Map < ? , ? > map = request . map ( ) ; if ( map == null ) { throw new IllegalArgumentException ( String . format ( "%s is not a valid username!" , username ) ) ; } return UUID . fromString ( insertDashUUID ( map . get ( "id" ) . toString ( ) ) ) ; }
@param username The username associated with a UUID
 @return The UUID of the specified argument
 @throws IllegalArgumentException If the username is invalid
@param username The username associated with a UUID @return The UUID of the specified argument @throws IllegalArgumentException If the username is invalid