Make addgamerule command process only valid game rules (#29912)
* addgamerule command processes only valid rules * Update * English moment
This commit is contained in:
@@ -324,6 +324,13 @@ public sealed partial class GameTicker
|
||||
|
||||
foreach (var rule in args)
|
||||
{
|
||||
if (!_prototypeManager.HasIndex(rule))
|
||||
{
|
||||
shell.WriteError($"Invalid game rule {rule} was skipped.");
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
if (shell.Player != null)
|
||||
{
|
||||
_adminLogger.Add(LogType.EventStarted, $"{shell.Player} tried to add game rule [{rule}] via command");
|
||||
|
||||
Reference in New Issue
Block a user