mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Bug fix
This commit is contained in:
parent
127978615c
commit
94a3c92b36
62 changed files with 371 additions and 297 deletions
|
|
@ -80,13 +80,13 @@ namespace MinecraftClient.ChatBots
|
|||
|
||||
DeleteRenderedMaps();
|
||||
|
||||
Handler.dispatcher.Register(l => l.Literal("help")
|
||||
McClient.dispatcher.Register(l => l.Literal("help")
|
||||
.Then(l => l.Literal(CommandName)
|
||||
.Executes(r => OnCommandHelp(r.Source, string.Empty))
|
||||
)
|
||||
);
|
||||
|
||||
Handler.dispatcher.Register(l => l.Literal(CommandName)
|
||||
McClient.dispatcher.Register(l => l.Literal(CommandName)
|
||||
.Executes(r => OnCommandList(r.Source))
|
||||
.Then(l => l.Literal("list")
|
||||
.Executes(r => OnCommandList(r.Source)))
|
||||
|
|
@ -94,14 +94,14 @@ namespace MinecraftClient.ChatBots
|
|||
.Then(l => l.Argument("MapID", MccArguments.MapBotMapId())
|
||||
.Executes(r => OnCommandRender(r.Source, Arguments.GetInteger(r, "MapID")))))
|
||||
.Then(l => l.Literal("_help")
|
||||
.Redirect(Handler.dispatcher.GetRoot().GetChild("help").GetChild(CommandName)))
|
||||
.Redirect(McClient.dispatcher.GetRoot().GetChild("help").GetChild(CommandName)))
|
||||
);
|
||||
}
|
||||
|
||||
public override void OnUnload()
|
||||
{
|
||||
Handler.dispatcher.Unregister(CommandName);
|
||||
Handler.dispatcher.GetRoot().GetChild("help").RemoveChild(CommandName);
|
||||
McClient.dispatcher.Unregister(CommandName);
|
||||
McClient.dispatcher.GetRoot().GetChild("help").RemoveChild(CommandName);
|
||||
DeleteRenderedMaps();
|
||||
}
|
||||
|
||||
|
|
@ -111,7 +111,7 @@ namespace MinecraftClient.ChatBots
|
|||
{
|
||||
#pragma warning disable format // @formatter:off
|
||||
_ => Translations.error_usage + ": /maps <list/render <id>>"
|
||||
+ '\n' + Handler.dispatcher.GetAllUsageString(CommandName, false),
|
||||
+ '\n' + McClient.dispatcher.GetAllUsageString(CommandName, false),
|
||||
#pragma warning restore format // @formatter:on
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue