Add Chatbot API for Sneaking / Unsneaking without using SendAction

This commit is contained in:
CarbonNeuron 2020-05-02 03:55:23 -05:00
parent b2075bb811
commit 799bc814c5

View file

@ -676,9 +676,23 @@ namespace MinecraftClient
Handler.UseItemOnHand(); Handler.UseItemOnHand();
} }
/// <summary> /// <summary>
/// start Sneaking
/// </summary>
protected bool Sneak()
{
return SendAction(Protocol.ActionType.StartSneaking);
}
/// <summary>
/// Sends UnSneak
/// </summary>
protected bool UnSneak()
{
return SendAction(Protocol.ActionType.StopSneaking);
}
/// <summary>
/// Send Entity Action /// Send Entity Action
/// </summary> /// </summary>
protected bool SendAction(Protocol.ActionType action) private bool SendAction(Protocol.ActionType action)
{ {
return Handler.sendEntityAction(action); return Handler.sendEntityAction(action);
} }