From f76c6402d4a9224852bca81af32e6fb9a8f50318 Mon Sep 17 00:00:00 2001 From: SuperSkidder Date: Sat, 6 Jul 2024 17:57:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=88=9D=E5=A7=8B=E5=8C=96?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shared/java/top/fpsmaster/FPSMaster.kt | 7 +++++++ shared/java/top/fpsmaster/features/GlobalSubmitter.kt | 2 +- .../java/top/fpsmaster/features/manager/ModuleManager.kt | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/shared/java/top/fpsmaster/FPSMaster.kt b/shared/java/top/fpsmaster/FPSMaster.kt index b318daa..2b80945 100644 --- a/shared/java/top/fpsmaster/FPSMaster.kt +++ b/shared/java/top/fpsmaster/FPSMaster.kt @@ -93,6 +93,11 @@ class FPSMaster { Logger.info("Initialized") } + private fun initializeModules(){ + moduleManager.init() + submitter.init() + } + private fun checkOptifine() { try { Class.forName("optifine.Patcher") @@ -126,6 +131,7 @@ class FPSMaster { initializeConfigures() initializeCommands() initializePlugins() + initializeModules() checkUpdate() checkOptifine() @@ -213,4 +219,5 @@ class FPSMaster { return "$CLIENT_NAME $CLIENT_VERSION ${Constants.VERSION} (${Constants.EDITION}) (${GitInfo.branch} - ${GitInfo.commitIdAbbrev})" } } + } diff --git a/shared/java/top/fpsmaster/features/GlobalSubmitter.kt b/shared/java/top/fpsmaster/features/GlobalSubmitter.kt index 41e4acc..9c1e7b8 100644 --- a/shared/java/top/fpsmaster/features/GlobalSubmitter.kt +++ b/shared/java/top/fpsmaster/features/GlobalSubmitter.kt @@ -30,7 +30,7 @@ class GlobalSubmitter { var time = MathTimer() private var musicSwitchTimer = MathTimer() - init { + fun init() { registerListener(this) } diff --git a/shared/java/top/fpsmaster/features/manager/ModuleManager.kt b/shared/java/top/fpsmaster/features/manager/ModuleManager.kt index 53af289..5e90abe 100644 --- a/shared/java/top/fpsmaster/features/manager/ModuleManager.kt +++ b/shared/java/top/fpsmaster/features/manager/ModuleManager.kt @@ -50,7 +50,7 @@ class ModuleManager { } } - init { + fun init() { // register listener registerListener(this)