aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/eu/olli/cowlection/data/HyStalkingData.java
diff options
context:
space:
mode:
authorCow <cow@volloeko.de>2020-07-28 00:12:36 +0200
committerCow <cow@volloeko.de>2020-07-28 00:12:36 +0200
commitb393636cb3f7e05ef8b34804eeb06357f1b9cfbe (patch)
treed754561fd2e2f09ac66f41b2645ac5f351c1cace /src/main/java/eu/olli/cowlection/data/HyStalkingData.java
parent023589c75ae72ddc5ff75fa7235bce4d102b2ad1 (diff)
downloadCowlection-b393636cb3f7e05ef8b34804eeb06357f1b9cfbe.tar.gz
Cowlection-b393636cb3f7e05ef8b34804eeb06357f1b9cfbe.tar.bz2
Cowlection-b393636cb3f7e05ef8b34804eeb06357f1b9cfbe.zip
Renamed package to match cowtipper.de
Diffstat (limited to 'src/main/java/eu/olli/cowlection/data/HyStalkingData.java')
-rw-r--r--src/main/java/eu/olli/cowlection/data/HyStalkingData.java120
1 files changed, 0 insertions, 120 deletions
diff --git a/src/main/java/eu/olli/cowlection/data/HyStalkingData.java b/src/main/java/eu/olli/cowlection/data/HyStalkingData.java
deleted file mode 100644
index 771a11d..0000000
--- a/src/main/java/eu/olli/cowlection/data/HyStalkingData.java
+++ /dev/null
@@ -1,120 +0,0 @@
-package eu.olli.cowlection.data;
-
-import eu.olli.cowlection.util.Utils;
-import org.apache.commons.lang3.StringUtils;
-
-public class HyStalkingData {
- private boolean success;
- private String cause;
- private HySession session;
-
- /**
- * No-args constructor for GSON
- */
- private HyStalkingData() {
- }
-
- public boolean isSuccess() {
- return success;
- }
-
- public String getCause() {
- return cause;
- }
-
- public HySession getSession() {
- return session;
- }
-
- public static class HySession {
- private boolean online;
- private String gameType;
- private String mode;
- private String map;
-
- /**
- * No-args constructor for GSON
- */
- private HySession() {
- }
-
- public boolean isOnline() {
- return online;
- }
-
- public String getGameType() {
- return DataHelper.GameType.getFancyName(gameType);
- }
-
- public String getMode() {
- // modes partially taken from https://api.hypixel.net/gameCounts?key=MOO
- if (mode == null) {
- return null;
- }
- String gameType = getGameType();
- if (DataHelper.GameType.BEDWARS.getCleanName().equals(gameType)) {
- // BedWars related
- String playerMode;
- String specialMode;
- int specialModeStart = StringUtils.ordinalIndexOf(mode, "_", 2);
- if (specialModeStart > -1) {
- playerMode = mode.substring(0, specialModeStart);
- specialMode = mode.substring(specialModeStart + 1) + " ";
- } else {
- playerMode = mode;
- specialMode = "";
- }
- String playerModeClean;
- switch (playerMode) {
- case "EIGHT_ONE":
- playerModeClean = "Solo";
- break;
- case "EIGHT_TWO":
- playerModeClean = "Doubles";
- break;
- case "FOUR_THREE":
- playerModeClean = "3v3v3v3";
- break;
- case "FOUR_FOUR":
- playerModeClean = "4v4v4v4";
- break;
- case "TWO_FOUR":
- playerModeClean = "4v4";
- break;
- default:
- playerModeClean = playerMode;
- }
- return Utils.fancyCase(specialMode + playerModeClean);
- } else if (DataHelper.GameType.SKYBLOCK.getCleanName().equals(gameType)) {
- // SkyBlock related
- switch (mode) {
- case "dynamic":
- return "Private Island";
- case "hub":
- return "Hub";
- case "combat_1":
- return "Spider's Den";
- case "combat_2":
- return "Blazing Fortress";
- case "combat_3":
- return "The End";
- case "farming_1":
- return "The Barn";
- case "farming_2":
- return "Mushroom Desert";
- case "foraging_1":
- return "The Park";
- case "mining_1":
- return "Gold Mine";
- case "mining_2":
- return "Deep Caverns";
- }
- }
- return Utils.fancyCase(mode);
- }
-
- public String getMap() {
- return map;
- }
- }
-}