diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-06-15 12:06:56 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-06-15 12:06:56 +0200 |
commit | 54f297c3c27ae66b788b358ef05b3839b544cc52 (patch) | |
tree | ad1c00640f4658cb40a37a90f23f1c4a2a89fae5 /src/main/java/at | |
parent | 6aae00a53bb656945bd7388ba6a78acf78bf259c (diff) | |
download | skyhanni-54f297c3c27ae66b788b358ef05b3839b544cc52.tar.gz skyhanni-54f297c3c27ae66b788b358ef05b3839b544cc52.tar.bz2 skyhanni-54f297c3c27ae66b788b358ef05b3839b544cc52.zip |
Moved city project reminder saving location from profile specific to player specific storage in the config
Diffstat (limited to 'src/main/java/at')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/config/Storage.java | 6 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/misc/CityProjectFeatures.kt | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/Storage.java b/src/main/java/at/hannibal2/skyhanni/config/Storage.java index 27e9c0cf9..68726aa34 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/Storage.java +++ b/src/main/java/at/hannibal2/skyhanni/config/Storage.java @@ -29,6 +29,9 @@ public class Storage { @Expose public Integer gardenCommunityUpgrade = -1; + + @Expose + public long nextCityProjectParticipationTime = 0L; } public static class ProfileSpecific { @@ -195,9 +198,6 @@ public class Storage { } @Expose - public long nextCityProjectParticipationTime = 0L; - - @Expose public Map<String, SlayerProfitList> slayerProfitData = new HashMap<>(); public static class SlayerProfitList { diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/CityProjectFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/CityProjectFeatures.kt index 4e8976a28..dee222aa2 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/CityProjectFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/CityProjectFeatures.kt @@ -52,15 +52,15 @@ class CityProjectFeatures { private fun checkDailyReminder() { if (!config.dailyReminder) return - val profileSpecific = ProfileStorageData.profileSpecific ?: return + val playerSpecific = ProfileStorageData.playerSpecific ?: return if (LorenzUtils.inDungeons) return if (LorenzUtils.inKuudraFight) return if (FarmingContestAPI.inContest) return if (LorenzUtils.skyBlockArea == "Community Center") return - if (profileSpecific.nextCityProjectParticipationTime == 0L) return - if (System.currentTimeMillis() <= profileSpecific.nextCityProjectParticipationTime) return + if (playerSpecific.nextCityProjectParticipationTime == 0L) return + if (System.currentTimeMillis() <= playerSpecific.nextCityProjectParticipationTime) return if (lastReminderSend + 30_000 > System.currentTimeMillis()) return lastReminderSend = System.currentTimeMillis() @@ -114,7 +114,7 @@ class CityProjectFeatures { if (itemName != "§eContribute this component!") continue nextTime = System.currentTimeMillis() } - ProfileStorageData.profileSpecific?.nextCityProjectParticipationTime = nextTime + ProfileStorageData.playerSpecific?.nextCityProjectParticipationTime = nextTime } } |