mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Tooltip support & Bug fix
This commit is contained in:
parent
892999ac98
commit
5e11ed3896
40 changed files with 8409 additions and 1987 deletions
|
|
@ -1,5 +1,4 @@
|
|||
using System.Collections.Generic;
|
||||
using Brigadier.NET;
|
||||
using Brigadier.NET;
|
||||
using Brigadier.NET.Builder;
|
||||
using MinecraftClient.CommandHandler;
|
||||
|
||||
|
|
@ -11,7 +10,8 @@ namespace MinecraftClient.Commands
|
|||
public override string CmdUsage { get { return "upgrade [-f|check|cancel|download]"; } }
|
||||
public override string CmdDesc { get { return string.Empty; } }
|
||||
|
||||
public override void RegisterCommand(McClient handler, CommandDispatcher<CmdResult> dispatcher) {
|
||||
public override void RegisterCommand(McClient handler, CommandDispatcher<CmdResult> dispatcher)
|
||||
{
|
||||
dispatcher.Register(l => l.Literal("help")
|
||||
.Then(l => l.Literal(CmdName)
|
||||
.Executes(r => GetUsage(r.Source, string.Empty))
|
||||
|
|
@ -41,8 +41,10 @@ namespace MinecraftClient.Commands
|
|||
);
|
||||
}
|
||||
|
||||
private int GetUsage(CmdResult r, string? cmd) {
|
||||
return r.SetAndReturn(cmd switch {
|
||||
private int GetUsage(CmdResult r, string? cmd)
|
||||
{
|
||||
return r.SetAndReturn(cmd switch
|
||||
{
|
||||
#pragma warning disable format // @formatter:off
|
||||
"cancel" => GetCmdDescTranslated(),
|
||||
"check" => GetCmdDescTranslated(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue