mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
48 lines
1.4 KiB
C#
48 lines
1.4 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
|
|
namespace MinecraftClient.Commands
|
|
{
|
|
class Fishing : Command
|
|
{
|
|
public override string CMDName { get { return "fishing"; } }
|
|
public override string CMDDesc { get { return "fishing <on|off>: Auto fishing"; } }
|
|
|
|
public override string Run(McTcpClient handler, string command)
|
|
{
|
|
if (hasArg(command))
|
|
{
|
|
string state = getArg(command);
|
|
if (state.ToLower() == "on")
|
|
{
|
|
if (!handler.AutoFishing)
|
|
{
|
|
handler.AutoFishing = true;
|
|
handler.useItemOnHand();
|
|
return "Auto fishing turned on.";
|
|
}
|
|
else
|
|
{
|
|
return "Auto fishing is on.";
|
|
}
|
|
}
|
|
else if (state.ToLower() == "off")
|
|
{
|
|
if (handler.AutoFishing)
|
|
{
|
|
handler.AutoFishing = false;
|
|
handler.useItemOnHand();
|
|
return "Auto fishing turned off.";
|
|
}
|
|
else
|
|
{
|
|
return "Auto fishing is off.";
|
|
}
|
|
}
|
|
}
|
|
return CMDDesc;
|
|
}
|
|
}
|
|
}
|