mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Add command to check player health and saturation
This commit is contained in:
parent
fe020c74c7
commit
975e6d4daa
5 changed files with 31 additions and 8 deletions
18
MinecraftClient/Commands/Status.cs
Normal file
18
MinecraftClient/Commands/Status.cs
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace MinecraftClient.Commands
|
||||
{
|
||||
class Status : Command
|
||||
{
|
||||
public override string CMDName { get { return "status"; } }
|
||||
public override string CMDDesc { get { return "status: Display Health and Food saturation."; } }
|
||||
|
||||
public override string Run(McTcpClient handler, string command, Dictionary<string, object> localVars)
|
||||
{
|
||||
return "Health: " + handler.GetHealth() + "\n[MCC] Saturation: " + handler.GetSaturation(); // any good ways to print multiple lines?
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue