aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/index.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/index.ts')
-rw-r--r--src/plugins/index.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/index.ts b/src/plugins/index.ts
index d5b419b..ae67f4f 100644
--- a/src/plugins/index.ts
+++ b/src/plugins/index.ts
@@ -1,4 +1,5 @@
import Plugins from "plugins";
+import { Settings } from "../api/settings";
import Logger from "../utils/logger";
import { Patch } from "../utils/types";
@@ -7,7 +8,7 @@ const logger = new Logger("PluginManager", "#a6d189");
export const plugins = Plugins;
export const patches = [] as Patch[];
-for (const plugin of Plugins) if (plugin.patches) {
+for (const plugin of Plugins) if (plugin.patches && Settings.plugins[plugin.name].enabled) {
for (const patch of plugin.patches) {
patch.plugin = plugin.name;
if (!Array.isArray(patch.replacement)) patch.replacement = [patch.replacement];
@@ -16,7 +17,7 @@ for (const plugin of Plugins) if (plugin.patches) {
}
export function startAll() {
- for (const plugin of plugins) if (plugin.start) {
+ for (const plugin of plugins) if (plugin.start && Settings.plugins[plugin.name].enabled) {
try {
logger.info("Starting plugin", plugin.name);
plugin.start();