MCPcopy Create free account
hub / github.com/MCSManager/MCSManager / execPreset

Method execPreset

daemon/src/entity/instance/preset.ts:21–25  ·  view source on GitHub ↗
(action: IPresetCommand, p?: any)

Source from the content-addressed store, hash-verified

19 }
20
21 async execPreset(action: IPresetCommand, p?: any) {
22 const cmd = this.preset.get(action);
23 if (!cmd) throw new Error($t("TXT_CODE_preset.actionErr", { action: action }));
24 return await cmd.exec(this.self, p);
25 }
26
27 clearPreset() {
28 this.preset.clear();

Callers

nothing calls this directly

Calls 3

$tFunction · 0.90
getMethod · 0.45
execMethod · 0.45

Tested by

no test coverage detected