Fix a bug where toggleready returns an exception when provided with the wrong number of arguments (#9631)

This commit is contained in:
Duddino
2022-07-12 04:14:24 +02:00
committed by GitHub
parent 7d7e65cfd2
commit fd4ca91d6f

View File

@@ -14,6 +14,11 @@ namespace Content.Server.GameTicking.Commands
public void Execute(IConsoleShell shell, string argStr, string[] args)
{
var player = shell.Player as IPlayerSession;
if (args.Length != 1)
{
shell.WriteError(Loc.GetString("shell-wrong-arguments-number"));
return;
}
if (player == null)
{
return;