Skip to content

Commit

Permalink
✨ Implemented shutdown method for DiSkyModule and added module shutdo…
Browse files Browse the repository at this point in the history
…wn in onDisable
  • Loading branch information
Sky committed Feb 6, 2025
1 parent 26bd27b commit 70971ab
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/main/java/net/itsthesky/disky/DiSky.java
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ private void debugMessage(String s) {
public void onDisable() {
SlashManager.shutdownAll();
ContextCommandManager.shutdownAll();
moduleManager.getModules().forEach(DiSkyModule::shutdown);

botManager.shutdown();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,14 @@ public URLClassLoader getLoader() {
return loader;
}

/**
* Shutdown the module. This should be used to clean up any resources
* that the module may have created.
*/
public void shutdown() {

}

/**
* Change the loader of this module. This should only be called when
* the module is being instantiated for the first time; otherwise, it
Expand Down

0 comments on commit 70971ab

Please sign in to comment.