Small fixes

This commit is contained in:
ReinforceZwei 2020-05-22 23:06:20 +08:00 committed by ORelio
parent 4f96aa2081
commit 02d393fe4d

View file

@ -60,18 +60,18 @@ namespace MinecraftClient.Commands
if (inventoryId == 0) response.Add("Your selected hotbar is " + (handler.GetCurrentSlot() + 1));
return String.Join("\n", response.ToArray());
case "click":
byte buttom = 0;
if (args.Length == 4)
{
string b = args[3];
if (b.ToLower() == "r")
buttom = 1;
}
if (args.Length == 3)
if (args.Length >= 3)
{
int slot = int.Parse(args[2]);
byte buttom = 0;
if (args.Length == 4)
{
string b = args[3];
if (b.ToLower() == "r")
buttom = 1;
}
handler.ClickWindowSlot(inventoryId, slot, buttom);
return "Clicking slot " + slot + " in window #" + inventoryId;
return buttom + " Clicking slot " + slot + " in window #" + inventoryId;
}
else return CMDDesc;
default: