Skip to content

Commit 939e825

Browse files
committed
Cleaned up whitespace and removed redundant null check in ExecuteHelp method for improved readability
1 parent be9f34e commit 939e825

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

TLibrary/Models/Commands/CommandBase.cs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public abstract class CommandBase : IRocketCommand
6161
/// <param name="args"></param>
6262
/// <returns></returns>
6363
protected abstract Task<bool> ExecutionRequested(IRocketPlayer caller, string[] args);
64-
64+
6565
/// <summary>
6666
/// Called when the command is executed with help subcommand
6767
/// </summary>
@@ -72,12 +72,6 @@ public abstract class CommandBase : IRocketCommand
7272
protected virtual Task ExecuteHelp(IRocketPlayer caller, bool isError, string subcommand, string[] args)
7373
{
7474
string translation = isError ? "error_command_syntax" : "success_command_help";
75-
if (args == null || args.Length == 0)
76-
{
77-
Plugin.SendCommandReply(caller, translation, Name, Syntax);
78-
return Task.CompletedTask;
79-
}
80-
8175
if (subcommand != null)
8276
{
8377
SubCommand subCommand = GetSubCommandByName(subcommand);
@@ -87,7 +81,7 @@ protected virtual Task ExecuteHelp(IRocketPlayer caller, bool isError, string su
8781
return Task.CompletedTask;
8882
}
8983
}
90-
84+
9185
Plugin.SendCommandReply(caller, translation, Name, Syntax);
9286
return Task.CompletedTask;
9387
}

0 commit comments

Comments
 (0)