MCPcopy Create free account
hub / github.com/MCSLTeam/MCSL2 / check

Method check

MCSL2Lib/ProgramControllers/serverValidator.py:25–37  ·  view source on GitHub ↗
(self, v, minMem, maxMem, name, jvmArg)

Source from the content-addressed store, hash-verified

23 super().__init__()
24
25 def check(self, v, minMem, maxMem, name, jvmArg):
26 a = self.checkJavaSet(v)
27 b = self.checkMemSet(minMem, maxMem, v)
28 c = self.checkCoreSet(v)
29 d = self.checkServerNameSet(name, v)
30 e = self.checkJVMArgSet(jvmArg, v)
31 return "\n".join([
32 a[0] if a[1] else "1",
33 b[0] if b[1] else "1",
34 c[0] if c[1] else "1",
35 d[0] if d[1] else "1",
36 e[0] if e[1] else "1",
37 ]).replace("1\n", "").replace("1", ""), int(a[1] + b[1] + c[1] + d[1] + e[1])
38
39 def checkJavaSet(self, v: BaseServerVariables):
40 """检查Java设置"""

Callers 2

finishNewServerMethod · 0.45
finishEditServerMethod · 0.45

Calls 5

checkJavaSetMethod · 0.95
checkMemSetMethod · 0.95
checkCoreSetMethod · 0.95
checkServerNameSetMethod · 0.95
checkJVMArgSetMethod · 0.95

Tested by

no test coverage detected