1
0
zrcadlo https://github.com/DanilaFe/abacus synchronizováno 2025-07-14 13:31:56 -07:00

Clear caches on unload and call onUnload before plugins are removed.

Tento commit je obsažen v:
Danila Fedorin 2017-08-02 19:14:50 -07:00
rodič 44b8efd9bc
revize 6e1d2ce629

Zobrazit soubor

@ -185,15 +185,18 @@ public class PluginManager {
* Unloads all the plugins in the PluginManager.
*/
public void unload() {
listeners.forEach(e -> e.onUnload(this));
Set<String> disabledPlugins = abacus.getConfiguration().getDisabledPlugins();
for (Plugin plugin : plugins) {
if(disabledPlugins.contains(plugin.getClass().getName())) continue;
plugin.disable();
}
cachedFunctions.clear();
cachedOperators.clear();
cachedNumbers.clear();
allFunctions.clear();
allOperators.clear();
allNumbers.clear();
listeners.forEach(e -> e.onUnload(this));
}
/**