aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/Danker
diff options
context:
space:
mode:
authorMy-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com>2020-12-24 01:21:04 -0500
committerMy-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com>2020-12-24 01:21:04 -0500
commit28033cdff035f00ddbef738fb17a517fec8706b7 (patch)
tree55dcb1cc08705e70aabf6c3f52ce73dbbccdcded /src/main/java/me/Danker
parent37db4519a15bdb3571d42eca84a1d4641de89e8b (diff)
downloadSkyblockMod-28033cdff035f00ddbef738fb17a517fec8706b7.tar.gz
SkyblockMod-28033cdff035f00ddbef738fb17a517fec8706b7.tar.bz2
SkyblockMod-28033cdff035f00ddbef738fb17a517fec8706b7.zip
Calculate what Skyblock Year it is for the trivia
Diffstat (limited to 'src/main/java/me/Danker')
-rw-r--r--src/main/java/me/Danker/DankersSkyblockMod.java15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java
index 191d587..231c125 100644
--- a/src/main/java/me/Danker/DankersSkyblockMod.java
+++ b/src/main/java/me/Danker/DankersSkyblockMod.java
@@ -613,13 +613,16 @@ public class DankersSkyblockMod {
}
if (ToggleCommand.oruoToggled && Utils.inDungeons) {
- // Don't set every answer to wrong with this question
- if (message.contains("What SkyBlock year is it?")) triviaAnswers = null;
+ if (message.contains("What SkyBlock year is it?")) {
+ int year = (int) (Math.floor((System.currentTimeMillis() - 1560276000000L)/446400) + 1);
- for (String question : triviaSolutions.keySet()) {
- if (message.contains(question)) {
- triviaAnswers = triviaSolutions.get(question);
- break;
+ triviaAnswers = new String[]{"Year " + year};
+ } else {
+ for (String question : triviaSolutions.keySet()) {
+ if (message.contains(question)) {
+ triviaAnswers = triviaSolutions.get(question);
+ break;
+ }
}
}