mirror of
https://github.com/DiscordSRV/Ascension.git
synced 2024-12-28 17:37:52 +01:00
Unregister modules from the event bus on disable
This commit is contained in:
parent
8a673875a6
commit
6944cf2579
@ -134,6 +134,7 @@ public class ModuleManager {
|
|||||||
AbstractModule<?> abstractModule = getAbstract(module);
|
AbstractModule<?> abstractModule = getAbstract(module);
|
||||||
try {
|
try {
|
||||||
logger.debug(module + " disabling");
|
logger.debug(module + " disabling");
|
||||||
|
discordSRV.eventBus().unsubscribe(abstractModule);
|
||||||
abstractModule.disable();
|
abstractModule.disable();
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
discordSRV.logger().error("Failed to disable " + abstractModule.toString(), t);
|
discordSRV.logger().error("Failed to disable " + abstractModule.toString(), t);
|
||||||
|
Loading…
Reference in New Issue
Block a user