Skip to content

Commit

Permalink
优化初始化代码
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperSkidder committed Jul 6, 2024
1 parent e9661d4 commit f76c640
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions shared/java/top/fpsmaster/FPSMaster.kt
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,11 @@ class FPSMaster {
Logger.info("Initialized")
}

private fun initializeModules(){
moduleManager.init()
submitter.init()
}

private fun checkOptifine() {
try {
Class.forName("optifine.Patcher")
Expand Down Expand Up @@ -126,6 +131,7 @@ class FPSMaster {
initializeConfigures()
initializeCommands()
initializePlugins()
initializeModules()

checkUpdate()
checkOptifine()
Expand Down Expand Up @@ -213,4 +219,5 @@ class FPSMaster {
return "$CLIENT_NAME $CLIENT_VERSION ${Constants.VERSION} (${Constants.EDITION}) (${GitInfo.branch} - ${GitInfo.commitIdAbbrev})"
}
}

}
2 changes: 1 addition & 1 deletion shared/java/top/fpsmaster/features/GlobalSubmitter.kt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class GlobalSubmitter {
var time = MathTimer()
private var musicSwitchTimer = MathTimer()

init {
fun init() {
registerListener(this)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class ModuleManager {
}
}

init {
fun init() {

// register listener
registerListener(this)
Expand Down

0 comments on commit f76c640

Please sign in to comment.