mirror of
https://github.com/plexusorg/Plex.git
synced 2024-12-23 01:27:37 +00:00
Fix errors when unloading modules with listeners
This commit is contained in:
parent
06e51926be
commit
d7cbbc8d52
@ -110,7 +110,7 @@ public class ModuleManager
|
|||||||
Plex.get().getServer().getCommandMap().getKnownCommands().remove(plexCommand.getName());
|
Plex.get().getServer().getCommandMap().getKnownCommands().remove(plexCommand.getName());
|
||||||
plexCommand.getAliases().forEach(alias -> Plex.get().getServer().getCommandMap().getKnownCommands().remove(alias));
|
plexCommand.getAliases().forEach(alias -> Plex.get().getServer().getCommandMap().getKnownCommands().remove(alias));
|
||||||
});
|
});
|
||||||
module.getListeners().forEach(module::unregisterListener);
|
module.getListeners().stream().toList().forEach(module::unregisterListener);
|
||||||
module.disable();
|
module.disable();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user