diff --git a/MinecraftClient/CSharpRunner.cs b/MinecraftClient/CSharpRunner.cs index b8ec098a..29a980cb 100644 --- a/MinecraftClient/CSharpRunner.cs +++ b/MinecraftClient/CSharpRunner.cs @@ -74,6 +74,7 @@ namespace MinecraftClient "using System.IO;", "using System.Threading;", "using MinecraftClient;", + "using MinecraftClient.Mapping;", "namespace ScriptLoader {", "public class Script {", "public CSharpAPI MCC;", diff --git a/MinecraftClient/ChatBot.cs b/MinecraftClient/ChatBot.cs index a9349d72..ef4494dd 100644 --- a/MinecraftClient/ChatBot.cs +++ b/MinecraftClient/ChatBot.cs @@ -502,6 +502,18 @@ namespace MinecraftClient Handler.BotLoad(new ChatBots.Script(filename, playername)); } + /// + /// Get the current Minecraft World + /// + /// Minecraft world or null if associated setting is disabled + + protected Mapping.World GetWorld() + { + if (Settings.TerrainAndMovements) + return Handler.GetWorld(); + return null; + } + /// /// Get a Y-M-D h:m:s timestamp representing the current system date and time ///