All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.cryptomorin.xseries.profiles.exceptions.MojangAPIRetryException Maven / Gradle / Ivy

There is a newer version: 12.1.0
Show newest version
package com.cryptomorin.xseries.profiles.exceptions;

/**
 * Due to being ratelimited or network issues that can be fixed if the request is sent later again.
 */
public final class MojangAPIRetryException extends MojangAPIException {
    public enum Reason {
        CONNECTION_RESET, CONNECTION_TIMEOUT, RATELIMITED
    }

    private final Reason reason;

    public MojangAPIRetryException(Reason reason, String message) {
        super(message);
        this.reason = reason;
    }

    public MojangAPIRetryException(Reason reason, String message, Throwable cause) {
        super(message, cause);
        this.reason = reason;
    }

    public Reason getReason() {
        return reason;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy