aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/de/cowtipper/cowlection/config/CredentialStorage.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/de/cowtipper/cowlection/config/CredentialStorage.java')
-rw-r--r--src/main/java/de/cowtipper/cowlection/config/CredentialStorage.java20
1 files changed, 1 insertions, 19 deletions
diff --git a/src/main/java/de/cowtipper/cowlection/config/CredentialStorage.java b/src/main/java/de/cowtipper/cowlection/config/CredentialStorage.java
index 5b1b0b1..309e76e 100644
--- a/src/main/java/de/cowtipper/cowlection/config/CredentialStorage.java
+++ b/src/main/java/de/cowtipper/cowlection/config/CredentialStorage.java
@@ -1,9 +1,7 @@
package de.cowtipper.cowlection.config;
import de.cowtipper.cowlection.Cowlection;
-import de.cowtipper.cowlection.util.ApiUtils;
import de.cowtipper.cowlection.util.Utils;
-import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.MathHelper;
import net.minecraftforge.common.config.Configuration;
import net.minecraftforge.common.config.Property;
@@ -131,23 +129,7 @@ public class CredentialStorage {
return false;
}
- public void setMooIfValid(String moo, boolean commandTriggered) {
- ApiUtils.fetchApiKeyInfo(moo, hyApiKey -> {
- if (hyApiKey != null && hyApiKey.isSuccess()) {
- // api key is valid!
- Cowlection.getInstance().getMoo().setMoo(moo);
- if (commandTriggered) {
- Cowlection.getInstance().getChatHelper().sendMessage(EnumChatFormatting.GREEN, "[" + Cowlection.MODNAME + "] Successfully verified API key ✔");
- }
- } else if (commandTriggered) {
- // api key is invalid
- String cause = hyApiKey != null ? hyApiKey.getCause() : null;
- Cowlection.getInstance().getChatHelper().sendMessage(EnumChatFormatting.RED, "[" + Cowlection.MODNAME + "] Failed to verify API key: " + (cause != null ? cause : "unknown cause :c"));
- }
- });
- }
-
- private void setMoo(String moo) {
+ public void setMoo(String moo) {
CredentialStorage.moo = moo;
propMoo.set(moo);
setMooValidity(true);