Add location getter and setter location in ChatBot

See #146
This commit is contained in:
ORelio 2016-05-04 23:47:08 +02:00
parent 0b32bb5a0f
commit 67fc431d4a
2 changed files with 23 additions and 0 deletions

View file

@ -581,6 +581,28 @@ namespace MinecraftClient
return null;
}
/// <summary>
/// Get the current location of the player
/// </summary>
/// <returns>Minecraft world or null if associated setting is disabled</returns>
protected Mapping.Location GetCurrentLocation()
{
return Handler.GetCurrentLocation();
}
/// <summary>
/// Move to the specified location
/// </summary>
/// <param name="location">Location to reach</param>
/// <param name="allowUnsafe">Allow possible but unsafe locations</param>
/// <returns>True if a path has been found</returns>
protected bool MoveToLocation(Mapping.Location location, bool allowUnsafe = false)
{
return Handler.MoveTo(location, allowUnsafe);
}
/// <summary>
/// Get a Y-M-D h:m:s timestamp representing the current system date and time
/// </summary>