Skip to content

Commit

Permalink
Categories will now clear on shutdown
Browse files Browse the repository at this point in the history
  • Loading branch information
WillFP committed Aug 9, 2023
1 parent f4c706a commit 422a664
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,15 @@ abstract class LibreforgePlugin : EcoPlugin() {
loadCategory(category)
}
}

onDisable(LifecyclePosition.END) {
for (category in loaderCategories) {
withLogs(category, "clear") {
category.clear(this)
category.handle.clear()
}
}
}
}

private fun loadCategory(category: ConfigCategory, preload: Boolean = false) {
Expand Down

0 comments on commit 422a664

Please sign in to comment.