aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/eu/olli/cowlection/data/SlothStalkingData.java
diff options
context:
space:
mode:
authorCow <cow@volloeko.de>2020-07-05 05:42:45 +0200
committerCow <cow@volloeko.de>2020-07-05 05:42:45 +0200
commit1b446698398c648b38311975a6cfd54859ea5cfe (patch)
tree521ecc4ce9ad968281094eb8c5453dca606931e3 /src/main/java/eu/olli/cowlection/data/SlothStalkingData.java
parentedaca1fd41a612c71c526ceb20b89c5dec2d81b3 (diff)
downloadCowlection-1b446698398c648b38311975a6cfd54859ea5cfe.tar.gz
Cowlection-1b446698398c648b38311975a6cfd54859ea5cfe.tar.bz2
Cowlection-1b446698398c648b38311975a6cfd54859ea5cfe.zip
Renamed mod to Cowlection
Bumped version to 1.8.9-0.7.0
Diffstat (limited to 'src/main/java/eu/olli/cowlection/data/SlothStalkingData.java')
-rw-r--r--src/main/java/eu/olli/cowlection/data/SlothStalkingData.java52
1 files changed, 52 insertions, 0 deletions
diff --git a/src/main/java/eu/olli/cowlection/data/SlothStalkingData.java b/src/main/java/eu/olli/cowlection/data/SlothStalkingData.java
new file mode 100644
index 0000000..6c6085e
--- /dev/null
+++ b/src/main/java/eu/olli/cowlection/data/SlothStalkingData.java
@@ -0,0 +1,52 @@
+package eu.olli.cowlection.data;
+
+public class SlothStalkingData {
+ private String username;
+ private String rank;
+ private String rank_formatted;
+ // private boolean online;
+ private long last_login;
+ private long last_logout;
+ private String last_game;
+
+ /**
+ * No-args constructor for GSON
+ */
+ public SlothStalkingData() {
+ }
+
+ public String getPlayerName() {
+ return username;
+ }
+
+ public String getPlayerNameFormatted() {
+ return rank_formatted.replace('&', 'ยง') + " " + username;
+ }
+
+ public long getLastLogin() {
+ return last_login;
+ }
+
+ public long getLastLogout() {
+ return last_logout;
+ }
+
+ public String getLastGame() {
+ return last_game;
+ }
+
+ public boolean hasNeverJoinedHypixel() {
+ // example player that has never joined Hypixel (as of April 2020): Joe
+ return rank == null && last_login == 0;
+ }
+
+ public boolean hasNeverLoggedOut() {
+ // example player that has no logout value (as of April 2020): Pig (in general accounts that haven't logged in for a few years)
+ return last_login != 0 && last_logout == 0;
+ }
+
+ public boolean isHidingOnlineStatus() {
+ // example players: any higher ranked player (mods, admins, ...)
+ return last_login == 0 && last_logout == 0;
+ }
+}