diff --git a/SharedLibraryCore/Commands/NativeCommands.cs b/SharedLibraryCore/Commands/NativeCommands.cs index 06dd87763..ae2879c69 100644 --- a/SharedLibraryCore/Commands/NativeCommands.cs +++ b/SharedLibraryCore/Commands/NativeCommands.cs @@ -54,11 +54,10 @@ namespace SharedLibraryCore.Commands RequiresTarget = false; } - public override Task ExecuteAsync(GameEvent E) + public override async Task ExecuteAsync(GameEvent gameEvent) { - E.Owner.Manager.Restart(); - E.Origin.Tell(_translationLookup["COMMANDS_RESTART_SUCCESS"]); - return Task.CompletedTask; + await gameEvent.Owner.Manager.Restart(); + gameEvent.Origin.Tell(_translationLookup["COMMANDS_RESTART_SUCCESS"]); } } diff --git a/SharedLibraryCore/Commands/RunAsCommand.cs b/SharedLibraryCore/Commands/RunAsCommand.cs index c52209f7b..f23c1aec1 100644 --- a/SharedLibraryCore/Commands/RunAsCommand.cs +++ b/SharedLibraryCore/Commands/RunAsCommand.cs @@ -63,9 +63,8 @@ namespace SharedLibraryCore.Commands .SelectMany(ev => ev.Value.Output) .ToList(); - foreach (var output in responses) - await gameEvent.Origin.Tell(_translationLookup["COMMANDS_RUN_AS_SUCCESS"].FormatExt(output)) - .WaitAsync(); + await gameEvent.Origin.TellAsync(responses.Select(output => + _translationLookup["COMMANDS_RUN_AS_SUCCESS"].FormatExt(output))); } } -} \ No newline at end of file +}