diff options
author | Linnea Gräf <nea@nea.moe> | 2024-12-07 21:18:21 +0100 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2024-12-07 21:18:21 +0100 |
commit | 6955c99b2e241cf7e4070424e8dbf29f80bb63fd (patch) | |
tree | 5abb4d0474cac2c579902e4bbf0266cdce0efaa0 /src/main/kotlin/moe/nea/ledger/Ledger.kt | |
parent | e3ace3c1b781b8d07f8eca60ba90df35da6c9d21 (diff) | |
download | LocalTransactionLedger-6955c99b2e241cf7e4070424e8dbf29f80bb63fd.tar.gz LocalTransactionLedger-6955c99b2e241cf7e4070424e8dbf29f80bb63fd.tar.bz2 LocalTransactionLedger-6955c99b2e241cf7e4070424e8dbf29f80bb63fd.zip |
feat: Add kat upgrade and flower detection
Diffstat (limited to 'src/main/kotlin/moe/nea/ledger/Ledger.kt')
-rw-r--r-- | src/main/kotlin/moe/nea/ledger/Ledger.kt | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/main/kotlin/moe/nea/ledger/Ledger.kt b/src/main/kotlin/moe/nea/ledger/Ledger.kt index cfbab1c..8a4b850 100644 --- a/src/main/kotlin/moe/nea/ledger/Ledger.kt +++ b/src/main/kotlin/moe/nea/ledger/Ledger.kt @@ -1,5 +1,6 @@ package moe.nea.ledger +import com.google.gson.Gson import io.github.notenoughupdates.moulconfig.managed.ManagedConfig import moe.nea.ledger.config.LedgerConfig import moe.nea.ledger.database.Database @@ -12,6 +13,7 @@ import moe.nea.ledger.modules.BazaarOrderDetection import moe.nea.ledger.modules.BitsDetection import moe.nea.ledger.modules.BitsShopDetection import moe.nea.ledger.modules.DungeonChestDetection +import moe.nea.ledger.modules.KatDetection import moe.nea.ledger.modules.MinionDetection import moe.nea.ledger.modules.NpcDetection import moe.nea.ledger.utils.DI @@ -71,6 +73,7 @@ class Ledger { val managedConfig = ManagedConfig.create(File("config/money-ledger/config.json"), LedgerConfig::class.java) { checkExpose = false } + val gson = Gson() private val tickQueue = ConcurrentLinkedQueue<Runnable>() fun runLater(runnable: Runnable) { tickQueue.add(runnable) @@ -84,21 +87,23 @@ class Ledger { val di = DI() di.registerSingleton(this) di.registerInjectableClasses( - LedgerLogger::class.java, - ItemIdProvider::class.java, + AuctionHouseDetection::class.java, BankDetection::class.java, BazaarDetection::class.java, - DungeonChestDetection::class.java, BazaarOrderDetection::class.java, - AuctionHouseDetection::class.java, BitsDetection::class.java, BitsShopDetection::class.java, + ConfigCommand::class.java, + Database::class.java, + DungeonChestDetection::class.java, + ItemIdProvider::class.java, + KatDetection::class.java, + LedgerLogger::class.java, + LogChatCommand::class.java, MinionDetection::class.java, NpcDetection::class.java, - LogChatCommand::class.java, - ConfigCommand::class.java, - Database::class.java ) + di.registerSingleton(gson) di.instantiateAll() di.getAllInstances().forEach(MinecraftForge.EVENT_BUS::register) di.getAllInstances().filterIsInstance<ICommand>() |