diff options
author | CalMWolfs <94038482+CalMWolfs@users.noreply.github.com> | 2023-09-10 18:40:56 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-10 10:40:56 +0200 |
commit | 593c01992afe4e8d5d4cd8aa61abbfb1d82e2a30 (patch) | |
tree | 5e9941862992f014b68dea6420d169be352c6295 /src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt | |
parent | 7e6a2296142e811f77049c0b4080bbd00cd29692 (diff) | |
download | skyhanni-593c01992afe4e8d5d4cd8aa61abbfb1d82e2a30.tar.gz skyhanni-593c01992afe4e8d5d4cd8aa61abbfb1d82e2a30.tar.bz2 skyhanni-593c01992afe4e8d5d4cd8aa61abbfb1d82e2a30.zip |
SackAPI event and storing data #410
* implement SackChangeEvent
* move SackAPI
* handling events
* fixed small errors
* fetching item data
* moved over sack display
* it should work
* saving gemstones
* saving gemstones
* new config file for sacks
* saving last change amount
* fix conflicts fully
* implement SackChangeEvent
* move SackAPI
* handle 'other items' correctly
* move sackAPI again
* handling events
* fixed small errors
* fetching item data
* moved over sack display
* it should work
* saving gemstones
* saving gemstones
* new config file for sacks
* saving last change amount
* Merge branch 'beta' into sack_storage
* fix conflicts fully
* Merge remote-tracking branch 'origin/sack_storage' into sack_storage
* Merge branch 'hannibal002:beta' into sack_storage
* Merge remote-tracking branch 'origin/sack_storage' into sack_storage
* remove unnecessary thing
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index bc391ff91..d7c4a566a 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -3,6 +3,7 @@ package at.hannibal2.skyhanni import at.hannibal2.skyhanni.api.CollectionAPI import at.hannibal2.skyhanni.config.ConfigManager import at.hannibal2.skyhanni.config.Features +import at.hannibal2.skyhanni.config.SackData import at.hannibal2.skyhanni.config.commands.Commands.init import at.hannibal2.skyhanni.data.* import at.hannibal2.skyhanni.data.repo.RepoManager @@ -187,7 +188,7 @@ class SkyHanniMod { loadModule(SlayerAPI) loadModule(PurseAPI()) loadModule(RiftAPI) - loadModule(SackAPI()) + loadModule(SackAPI) // features loadModule(BazaarOrderHelper()) @@ -334,7 +335,7 @@ class SkyHanniMod { loadModule(BingoCardTips()) loadModule(GardenVisitorDropStatistics) loadModule(CaptureFarmingGear()) - loadModule(SackDisplay()) + loadModule(SackDisplay) loadModule(GardenStartLocation) loadModule(PetCandyUsedDisplay()) loadModule(ServerRestartTitle()) @@ -420,7 +421,10 @@ class SkyHanniMod { configManager = ConfigManager() configManager.firstLoad() initLogging() - Runtime.getRuntime().addShutdownHook(Thread { configManager.saveConfig("shutdown-hook") }) + Runtime.getRuntime().addShutdownHook(Thread { + configManager.saveConfig("shutdown-hook") + configManager.saveSackData("shutdown-hook") + }) repo = RepoManager(configManager.configDirectory) try { repo.loadRepoInformation() @@ -455,6 +459,7 @@ class SkyHanniMod { @JvmStatic val feature: Features get() = configManager.features + val sackData: SackData get() = configManager.sackData lateinit var repo: RepoManager lateinit var configManager: ConfigManager val logger: Logger = LogManager.getLogger("SkyHanni") |