MinecraftConsoles/Minecraft.Server/Console/commands/stop/CliCommandStop.cpp
kuwacom 26dc63af6b refactor: refactor command path structure
As the number of commands has increased and become harder to navigate, each command has been organized into separate folders.
2026-03-13 00:14:20 +09:00

33 lines
536 B
C++

#include "stdafx.h"
#include "CliCommandStop.h"
#include "..\..\ServerCliEngine.h"
namespace ServerRuntime
{
const char *CliCommandStop::Name() const
{
return "stop";
}
const char *CliCommandStop::Usage() const
{
return "stop";
}
const char *CliCommandStop::Description() const
{
return "Stop the dedicated server.";
}
bool CliCommandStop::Execute(const ServerCliParsedLine &line, ServerCliEngine *engine)
{
(void)line;
engine->LogInfo("Stopping server...");
engine->RequestShutdown();
return true;
}
}