first commit

This commit is contained in:
2025-07-06 00:23:46 +02:00
commit 38f50c8819
1788 changed files with 112878 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
using System.Collections.Generic;
using NitroxModel.DataStructures.GameLogic;
using NitroxServer.ConsoleCommands.Abstract;
namespace NitroxServer.ConsoleCommands
{
internal class StopCommand : Command
{
public override IEnumerable<string> Aliases { get; } = new[] { "exit", "halt", "quit", "close" };
public StopCommand() : base("stop", Perms.ADMIN, "Stops the server")
{
}
protected override void Execute(CallArgs args)
{
Server server = Server.Instance;
if (!server.IsRunning)
{
return;
}
SendMessageToAllPlayers("Server is shutting down...");
server.Stop(shouldSave: true);
}
}
}