This commit is contained in:
BruceChen 2022-12-11 17:31:37 +08:00
parent 94a3c92b36
commit 7900108763
39 changed files with 43 additions and 4 deletions

View file

@ -29,6 +29,7 @@ namespace MinecraftClient.Commands
.Then(l => l.Literal("offhand")
.Executes(r => DoAnimation(r.Source, mainhand: false)))
.Then(l => l.Literal("_help")
.Executes(r => GetUsage(r.Source, string.Empty))
.Redirect(dispatcher.GetRoot().GetChild("help").GetChild(CmdName)))
);
}

View file

@ -37,6 +37,7 @@ namespace MinecraftClient.Commands
.Then(l => l.Argument("Radius", Arguments.Double())
.Executes(r => DoSleepBedWithRadius(r.Source, Arguments.GetDouble(r, "Radius")))))
.Then(l => l.Literal("_help")
.Executes(r => GetUsage(r.Source, string.Empty))
.Redirect(dispatcher.GetRoot().GetChild("help").GetChild(CmdName)))
);
}

View file

@ -32,6 +32,7 @@ namespace MinecraftClient.Commands
.Then(l => l.Literal("-s")
.Executes(r => LogBlockInfo(r.Source, MccArguments.GetLocation(r, "Location"), true))))
.Then(l => l.Literal("_help")
.Executes(r => GetUsage(r.Source, string.Empty))
.Redirect(dispatcher.GetRoot().GetChild("help").GetChild(CmdName)))
);
}

View file

@ -33,6 +33,7 @@ namespace MinecraftClient.Commands
.Then(l => l.Argument("BotName", MccArguments.BotName())
.Executes(r => DoUnloadBot(r.Source, Arguments.GetString(r, "BotName")))))
.Then(l => l.Literal("_help")
.Executes(r => GetUsage(r.Source, string.Empty))
.Redirect(dispatcher.GetRoot().GetChild("help").GetChild(CmdName)))
);
}

View file

@ -23,6 +23,7 @@ namespace MinecraftClient.Commands
.Then(l => l.Argument("Slot", MccArguments.HotbarSlot())
.Executes(r => DoChangeSlot(r.Source, Arguments.GetInteger(r, "Slot"))))
.Then(l => l.Literal("_help")
.Executes(r => GetUsage(r.Source, string.Empty))
.Redirect(dispatcher.GetRoot().GetChild("help").GetChild(CmdName)))
);
}

View file

@ -53,6 +53,7 @@ namespace MinecraftClient.Commands
.Then(l => l.Argument("Chunk", MccArguments.Tuple())
.Executes(r => DebugDelete(r.Source, markedChunkPos: MccArguments.GetTuple(r, "Chunk")))))
.Then(l => l.Literal("_help")
.Executes(r => GetUsage(r.Source, string.Empty))
.Redirect(dispatcher.GetRoot().GetChild("help").GetChild(CmdName)))
);
}

View file

@ -25,6 +25,7 @@ namespace MinecraftClient.Commands
.Then(l => l.Argument("AccountNick", MccArguments.AccountNick())
.Executes(r => DoConnect(r.Source, Arguments.GetString(r, "ServerNick"), Arguments.GetString(r, "AccountNick")))))
.Then(l => l.Literal("_help")
.Executes(r => GetUsage(r.Source, string.Empty))
.Redirect(dispatcher.GetRoot().GetChild("help").GetChild(CmdName)))
);
}

View file

@ -25,6 +25,7 @@ namespace MinecraftClient.Commands
.Then(l => l.Literal("off")
.Executes(r => SetDebugMode(r.Source, false, false)))
.Then(l => l.Literal("_help")
.Executes(r => GetUsage(r.Source, string.Empty))
.Redirect(dispatcher.GetRoot().GetChild("help").GetChild(CmdName)))
);
}

View file

@ -26,6 +26,7 @@ namespace MinecraftClient.Commands
.Then(l => l.Argument("Location", MccArguments.Location())
.Executes(r => DigAt(r.Source, MccArguments.GetLocation(r, "Location"))))
.Then(l => l.Literal("_help")
.Executes(r => GetUsage(r.Source, string.Empty))
.Redirect(dispatcher.GetRoot().GetChild("help").GetChild(CmdName)))
);
}

View file

@ -26,6 +26,7 @@ namespace MinecraftClient.Commands
.Then(l => l.Argument("ItemType", MccArguments.ItemType())
.Executes(r => DoDropItem(r.Source, MccArguments.GetItemType(r, "ItemType"))))
.Then(l => l.Literal("_help")
.Executes(r => GetUsage(r.Source, string.Empty))
.Redirect(dispatcher.GetRoot().GetChild("help").GetChild(CmdName)))
);
}

View file

@ -34,6 +34,7 @@ namespace MinecraftClient.Commands
.Then(l => l.Literal("bottom")
.Executes(r => DoEnchant(r.Source, slotId: 2)))
.Then(l => l.Literal("_help")
.Executes(r => GetUsage(r.Source, string.Empty))
.Redirect(dispatcher.GetRoot().GetChild("help").GetChild(CmdName)))
);
}

View file

@ -72,6 +72,7 @@ namespace MinecraftClient.Commands
.Then(l => l.Literal("list")
.Executes(r => OperateWithType(r.Source, near: false, MccArguments.GetEntityType(r, "EntityType"), ActionType.List))))
.Then(l => l.Literal("_help")
.Executes(r => GetUsage(r.Source, string.Empty))
.Redirect(dispatcher.GetRoot().GetChild("help").GetChild(CmdName)))
);
}

View file

@ -23,6 +23,7 @@ namespace MinecraftClient.Commands
.Then(l => l.Argument("ExitCode", Arguments.Integer())
.Executes(r => DoExit(r.Source, Arguments.GetInteger(r, "ExitCode"))))
.Then(l => l.Literal("_help")
.Executes(r => GetUsage(r.Source, string.Empty))
.Redirect(dispatcher.GetRoot().GetChild("help").GetChild(CmdName)))
);

View file

@ -21,6 +21,7 @@ namespace MinecraftClient.Commands
dispatcher.Register(l => l.Literal(CmdName)
.Executes(r => LogHealth(r.Source))
.Then(l => l.Literal("_help")
.Executes(r => GetUsage(r.Source, string.Empty))
.Redirect(dispatcher.GetRoot().GetChild("help").GetChild(CmdName)))
);
}

View file

@ -102,6 +102,7 @@ namespace MinecraftClient.Commands
.Then(l => l.Literal("all")
.Executes(r => DoDropAction(r.Source, inventoryId: null, Arguments.GetInteger(r, "Slot"), WindowActionType.DropItemStack))))))
.Then(l => l.Literal("_help")
.Executes(r => GetUsage(r.Source, string.Empty))
.Redirect(dispatcher.GetRoot().GetChild("help").GetChild(CmdName)))
);
}

View file

@ -22,6 +22,7 @@ namespace MinecraftClient.Commands
dispatcher.Register(l => l.Literal(CmdName)
.Executes(r => DoListPlayers(r.Source))
.Then(l => l.Literal("_help")
.Executes(r => GetUsage(r.Source, string.Empty))
.Redirect(dispatcher.GetRoot().GetChild("help").GetChild(CmdName)))
);
}

View file

@ -47,6 +47,7 @@ namespace MinecraftClient.Commands
.Then(l => l.Argument("Location", MccArguments.Location())
.Executes(r => LookAtLocation(r.Source, MccArguments.GetLocation(r, "Location"))))
.Then(l => l.Literal("_help")
.Executes(r => GetUsage(r.Source, string.Empty))
.Redirect(dispatcher.GetRoot().GetChild("help").GetChild(CmdName)))
);
}

View file

@ -79,6 +79,7 @@ namespace MinecraftClient.Commands
.Then(l => l.Literal("-f")
.Executes(r => MoveToLocation(r.Source, MccArguments.GetLocation(r, "location"), true))))
.Then(l => l.Literal("_help")
.Executes(r => GetUsage(r.Source, string.Empty))
.Redirect(dispatcher.GetRoot().GetChild("help").GetChild(CmdName)))
);
}

View file

@ -24,6 +24,7 @@ namespace MinecraftClient.Commands
.Then(l => l.Argument("AccountNick", MccArguments.AccountNick())
.Executes(r => DoReconnect(r.Source, Arguments.GetString(r, "AccountNick"))))
.Then(l => l.Literal("_help")
.Executes(r => GetUsage(r.Source, string.Empty))
.Redirect(dispatcher.GetRoot().GetChild("help").GetChild(CmdName)))
);
}

View file

@ -21,6 +21,7 @@ namespace MinecraftClient.Commands
dispatcher.Register(l => l.Literal(CmdName)
.Executes(r => DoReload(r.Source))
.Then(l => l.Literal("_help")
.Executes(r => GetUsage(r.Source, string.Empty))
.Redirect(dispatcher.GetRoot().GetChild("help").GetChild(CmdName)))
);
}

View file

@ -21,6 +21,7 @@ namespace MinecraftClient.Commands
dispatcher.Register(l => l.Literal(CmdName)
.Executes(r => DoRespawn(r.Source))
.Then(l => l.Literal("_help")
.Executes(r => GetUsage(r.Source, string.Empty))
.Redirect(dispatcher.GetRoot().GetChild("help").GetChild(CmdName)))
);
}

View file

@ -23,6 +23,7 @@ namespace MinecraftClient.Commands
.Then(l => l.Argument("Script", Arguments.GreedyString())
.Executes(r => DoExecuteScript(r.Source, Arguments.GetString(r, "Script"), null)))
.Then(l => l.Literal("_help")
.Executes(r => GetUsage(r.Source, string.Empty))
.Redirect(dispatcher.GetRoot().GetChild("help").GetChild(CmdName)))
);
}

View file

@ -22,6 +22,7 @@ namespace MinecraftClient.Commands
.Then(l => l.Argument("Expression", Arguments.GreedyString())
.Executes(r => DoSetVar(r.Source, Arguments.GetString(r, "Expression"))))
.Then(l => l.Literal("_help")
.Executes(r => GetUsage(r.Source, string.Empty))
.Redirect(dispatcher.GetRoot().GetChild("help").GetChild(CmdName)))
);
}

View file

@ -22,6 +22,7 @@ namespace MinecraftClient.Commands
dispatcher.Register(l => l.Literal(CmdName)
.Executes(r => DoSneak(r.Source))
.Then(l => l.Literal("_help")
.Executes(r => GetUsage(r.Source, string.Empty))
.Redirect(dispatcher.GetRoot().GetChild("help").GetChild(CmdName)))
);
}

View file

@ -22,6 +22,7 @@ namespace MinecraftClient.Commands
dispatcher.Register(l => l.Literal(CmdName)
.Executes(r => DoLogTps(r.Source))
.Then(l => l.Literal("_help")
.Executes(r => GetUsage(r.Source, string.Empty))
.Redirect(dispatcher.GetRoot().GetChild("help").GetChild(CmdName)))
);
}

View file

@ -37,6 +37,7 @@ namespace MinecraftClient.Commands
.Then(l => l.Literal("cancel")
.Executes(r => CancelDownloadUpdate(r.Source)))
.Then(l => l.Literal("_help")
.Executes(r => GetUsage(r.Source, string.Empty))
.Redirect(dispatcher.GetRoot().GetChild("help").GetChild(CmdName)))
);
}

View file

@ -22,6 +22,7 @@ namespace MinecraftClient.Commands
dispatcher.Register(l => l.Literal(CmdName)
.Executes(r => DoUseItem(r.Source))
.Then(l => l.Literal("_help")
.Executes(r => GetUsage(r.Source, string.Empty))
.Redirect(dispatcher.GetRoot().GetChild("help").GetChild(CmdName)))
);
}

View file

@ -24,6 +24,7 @@ namespace MinecraftClient.Commands
.Then(l => l.Argument("Location", MccArguments.Location())
.Executes(r => UseBlockAtLocation(r.Source, MccArguments.GetLocation(r, "Location"))))
.Then(l => l.Literal("_help")
.Executes(r => GetUsage(r.Source, string.Empty))
.Redirect(dispatcher.GetRoot().GetChild("help").GetChild(CmdName)))
);
}