MCPcopy Create free account
hub / github.com/LiteLDev/LeviLamina / executeTestCommand

Function executeTestCommand

src-test/server/testCommand.cpp:50–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48};
49
50CommandExecutionResult executeTestCommand(std::string_view commandLine) {
51 auto& registrar = CommandRegistrar::getServerInstance();
52 ServerCommandOrigin origin("test", ll::service::getLevel()->asServer(), CommandPermissionLevel::Owner, 0);
53
54 CommandExecutionResult result;
55 auto compiled = registrar.compileCommand(commandLine, origin);
56 if (!compiled) {
57 compiled.error().log(result.output);
58 compiled.error().log(ll::getLogger());
59 return result;
60 }
61
62 result.compiledCommand = std::move(compiled.value());
63 result.compiledCommand->run(origin, result.output);
64 return result;
65}
66
67} // namespace
68

Callers 1

TESTFunction · 0.85

Calls 5

getLevelFunction · 0.85
compileCommandMethod · 0.80
logMethod · 0.80
valueMethod · 0.80
errorMethod · 0.45

Tested by

no test coverage detected