mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Fix /move crash and /setrnd (#1914)
* Fix /move crash * Fix substring cutting in SetRnd
This commit is contained in:
parent
223db4af6a
commit
bbe000b640
2 changed files with 4 additions and 1 deletions
|
|
@ -16,6 +16,9 @@ namespace MinecraftClient.Commands
|
||||||
List<string> args = getArgs(command.ToLower()).ToList();
|
List<string> args = getArgs(command.ToLower()).ToList();
|
||||||
bool takeRisk = false;
|
bool takeRisk = false;
|
||||||
|
|
||||||
|
if (args.Count < 1)
|
||||||
|
return GetCmdDescTranslated();
|
||||||
|
|
||||||
if (args.Contains("-f"))
|
if (args.Contains("-f"))
|
||||||
{
|
{
|
||||||
takeRisk = true;
|
takeRisk = true;
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ namespace MinecraftClient.Commands
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// extract all arguments of the command
|
// extract all arguments of the command
|
||||||
string argString = command.Substring(command.IndexOf(args[0]) + args[0].Length, command.Length - 8 - args[0].Length);
|
string argString = command.Substring(8 + command.Split(' ')[1].Length);
|
||||||
|
|
||||||
// process all arguments similar to regular terminals with quotes and escaping
|
// process all arguments similar to regular terminals with quotes and escaping
|
||||||
List<string> values = parseCommandLine(argString);
|
List<string> values = parseCommandLine(argString);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue