MCPcopy Create free account
hub / github.com/PleasureTools/joyBox / EnablePlugin

Method EnablePlugin

backend/Src/Services/PluginManager.ts:40–52  ·  view source on GitHub ↗
(id: number, enabled: boolean)

Source from the content-addressed store, hash-verified

38 }
39
40 public EnablePlugin(id: number, enabled: boolean) {
41 const plugin = this.FindPluginById(id);
42
43 if (plugin === null || plugin.enabled === enabled) {
44 return;
45 }
46
47 plugin.enabled = enabled;
48
49 enabled ?
50 plugin.service.Start() :
51 plugin.service.Stop();
52 }
53
54 /**
55 * @param orderMap contain plugins ids in new order

Callers

nothing calls this directly

Calls 3

FindPluginByIdMethod · 0.95
StartMethod · 0.45
StopMethod · 0.45

Tested by

no test coverage detected