diff --git a/build.gradle b/build.gradle index 8842e2e0..390f15ff 100644 --- a/build.gradle +++ b/build.gradle @@ -26,9 +26,9 @@ dependencies { implementation 'org.apache.commons:commons-lang3:3.12.0' implementation 'mysql:mysql-connector-java:8.0.25' implementation "com.googlecode.json-simple:json-simple:1.1.1" - implementation 'net.sourceforge.htmlunit:htmlunit:2.53.0' - implementation 'com.google.code.gson:gson:2.8.8' - implementation 'org.kohsuke:github-api:1.133' + implementation 'net.sourceforge.htmlunit:htmlunit:2.54.0' + implementation 'com.google.code.gson:gson:2.8.9' + implementation 'org.kohsuke:github-api:1.135' implementation 'com.mattmalec:Pterodactyl4J:2.BETA_78' } diff --git a/src/main/java/me/TechsCode/TechDiscordBot/spigotmc/data/APIStatus.java b/src/main/java/me/TechsCode/TechDiscordBot/spigotmc/data/APIStatus.java index 19719600..f2620857 100644 --- a/src/main/java/me/TechsCode/TechDiscordBot/spigotmc/data/APIStatus.java +++ b/src/main/java/me/TechsCode/TechDiscordBot/spigotmc/data/APIStatus.java @@ -19,6 +19,26 @@ public enum APIStatus { this.emojiName = emojiName; } + public String getStatus() { + return status; + } + + public String getDescription() { + return description; + } + + public boolean isUsable() { + return this == ONLINE || this == NOT_FETCHING; + } + + public boolean isVerifyUsable() { + return this == ONLINE; + } + + public String getEmoji() { + return TechDiscordBot.getGuild().getEmotesByName(emojiName, true).get(0).getAsMention(); + } + public static APIStatus getSpigotStatus(SpigotAPIManager client) { APIStatus status;