diff options
Diffstat (limited to 'src/main/java/eu/olli/cowmoonication/util/SlothStalking.java')
-rw-r--r-- | src/main/java/eu/olli/cowmoonication/util/SlothStalking.java | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/src/main/java/eu/olli/cowmoonication/util/SlothStalking.java b/src/main/java/eu/olli/cowmoonication/util/SlothStalking.java index bcd0e01..1cc7c22 100644 --- a/src/main/java/eu/olli/cowmoonication/util/SlothStalking.java +++ b/src/main/java/eu/olli/cowmoonication/util/SlothStalking.java @@ -2,9 +2,10 @@ package eu.olli.cowmoonication.util; public class SlothStalking { private String username; + private String rank; private String rank_formatted; // private boolean online; - // private long last_login; + private long last_login; private long last_logout; private String last_game; @@ -15,6 +16,10 @@ public class SlothStalking { return rank_formatted.replace('&', 'ยง') + " " + username; } + public long getLastLogin() { + return last_login; + } + public long getLastLogout() { return last_logout; } @@ -22,4 +27,19 @@ public class SlothStalking { 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; + } } |