This commit is contained in:
BruceChen 2022-12-11 16:30:45 +08:00
parent 127978615c
commit 94a3c92b36
62 changed files with 371 additions and 297 deletions

View file

@ -36,7 +36,7 @@ namespace MinecraftClient
StringBuilder sb = new();
string s = (string.IsNullOrEmpty(CmdUsage) || string.IsNullOrEmpty(CmdDesc)) ? string.Empty : ": "; // If either one is empty, no colon :
sb.Append("§e").Append(cmdChar).Append(CmdUsage).Append("§r").Append(s).AppendLine(CmdDesc);
sb.Append(CmdResult.client!.dispatcher.GetAllUsageString(CmdName, false));
sb.Append(McClient.dispatcher.GetAllUsageString(CmdName, false));
return sb.ToString();
}
@ -48,7 +48,7 @@ namespace MinecraftClient
/// <summary>
/// Register the command.
/// </summary>
public abstract void RegisterCommand(McClient handler, CommandDispatcher<CmdResult> dispatcher);
public abstract void RegisterCommand(CommandDispatcher<CmdResult> dispatcher);
/// <summary>
/// Check if at least one argument has been passed to the command