aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/de/cowtipper/cowlection/command/exception/ApiContactException.java
blob: f601e3e77daba45760e0a4c6de4305f5eb118d29 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
package de.cowtipper.cowlection.command.exception;

import de.cowtipper.cowlection.Cowlection;

public class ApiContactException extends MooCommandException {
    public ApiContactException(String api, String failedAction) {
        super("Sorry, couldn't contact the " + api + " API and thus " + failedAction);
        if (api.equals("Hypixel") && failedAction.contains("Invalid API key")) {
            Cowlection.getInstance().getMoo().setMooValidity(false);
        }
    }
}