mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
new command /animation (#1026)
This commit is contained in:
parent
23870711a0
commit
87b2d3bf4a
9 changed files with 409 additions and 311 deletions
43
MinecraftClient/Commands/Animation.cs
Normal file
43
MinecraftClient/Commands/Animation.cs
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace MinecraftClient.Commands
|
||||
{
|
||||
public class Animation : Command
|
||||
{
|
||||
public override string CMDName { get { return "animation"; } }
|
||||
public override string CMDDesc { get { return "animation <<mainhand|offhand>|<0|1>>"; } }
|
||||
|
||||
public override string Run(McTcpClient handler, string command, Dictionary<string, object> localVars)
|
||||
{
|
||||
if (hasArg(command))
|
||||
{
|
||||
string[] args = getArgs(command);
|
||||
if (args.Length > 0)
|
||||
{
|
||||
if (args[0] == "mainhand" || args[0] == "0")
|
||||
{
|
||||
handler.DoAnimation(0);
|
||||
return "Done";
|
||||
}
|
||||
else if (args[0] == "offhand" || args[0] == "1")
|
||||
{
|
||||
handler.DoAnimation(1);
|
||||
return "Done";
|
||||
}
|
||||
else
|
||||
{
|
||||
return CMDDesc;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return CMDDesc;
|
||||
}
|
||||
}
|
||||
else return CMDDesc;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue