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

Function handleStopInstance

daemon/src/service/java_manager.ts:207–218  ·  view source on GitHub ↗
(obj: { instanceUuid: string })

Source from the content-addressed store, hash-verified

205});
206
207const handleStopInstance = (obj: { instanceUuid: string }) => {
208 const instanceUuid = obj.instanceUuid;
209 const config = InstanceSubsystem.getInstance(instanceUuid)?.config;
210 if (!config) return;
211
212 const javaId = config.java.id;
213 if (!javaId) return;
214
215 const java = javaManager.getJava(javaId);
216 if (java && !java.usingInstances.includes(instanceUuid))
217 java.usingInstances.filter((uuid) => uuid !== instanceUuid);
218};
219
220InstanceSubsystem.on("exit", handleStopInstance);
221InstanceSubsystem.on("failure", handleStopInstance);

Callers

nothing calls this directly

Calls 2

getJavaMethod · 0.80
getInstanceMethod · 0.45

Tested by

no test coverage detected