Add GetWorld() API method for ChatBots

This commit is contained in:
ORelio 2016-01-16 17:51:08 +01:00
parent 71277362be
commit d36647af3e
2 changed files with 13 additions and 0 deletions

View file

@ -502,6 +502,18 @@ namespace MinecraftClient
Handler.BotLoad(new ChatBots.Script(filename, playername));
}
/// <summary>
/// Get the current Minecraft World
/// </summary>
/// <returns>Minecraft world or null if associated setting is disabled</returns>
protected Mapping.World GetWorld()
{
if (Settings.TerrainAndMovements)
return Handler.GetWorld();
return null;
}
/// <summary>
/// Get a Y-M-D h:m:s timestamp representing the current system date and time
/// </summary>