Skip to content

Commit

Permalink
fix: fix starting plugin when enable is failed
Browse files Browse the repository at this point in the history
  • Loading branch information
duruer committed Jun 1, 2024
1 parent 694ca75 commit 68ca5c1
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Pano/src/main/kotlin/com/panomc/platform/PluginManager.kt
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,13 @@ class PluginManager(importPaths: List<Path> = listOf(Paths.get(System.getPropert

val plugin = getPlugin(pluginId)?.plugin as PanoPlugin?

plugin?.let {
runBlocking {
it.load()
it.onEnable()
it.onStart()
if (result) {
plugin?.let {
runBlocking {
it.load()
it.onEnable()
it.onStart()
}
}
}

Expand Down

0 comments on commit 68ca5c1

Please sign in to comment.