mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Add GetWorld() API method for ChatBots
This commit is contained in:
parent
71277362be
commit
d36647af3e
2 changed files with 13 additions and 0 deletions
|
|
@ -74,6 +74,7 @@ namespace MinecraftClient
|
||||||
"using System.IO;",
|
"using System.IO;",
|
||||||
"using System.Threading;",
|
"using System.Threading;",
|
||||||
"using MinecraftClient;",
|
"using MinecraftClient;",
|
||||||
|
"using MinecraftClient.Mapping;",
|
||||||
"namespace ScriptLoader {",
|
"namespace ScriptLoader {",
|
||||||
"public class Script {",
|
"public class Script {",
|
||||||
"public CSharpAPI MCC;",
|
"public CSharpAPI MCC;",
|
||||||
|
|
|
||||||
|
|
@ -502,6 +502,18 @@ namespace MinecraftClient
|
||||||
Handler.BotLoad(new ChatBots.Script(filename, playername));
|
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>
|
/// <summary>
|
||||||
/// Get a Y-M-D h:m:s timestamp representing the current system date and time
|
/// Get a Y-M-D h:m:s timestamp representing the current system date and time
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue