From feea5700ac4f51ad6ba803b4ef636f763ec1d6d3 Mon Sep 17 00:00:00 2001 From: Shank Date: Sun, 12 Jun 2011 02:49:37 -0600 Subject: [PATCH] Added command to toggle anti-build. --- TShockAPI/Commands.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/TShockAPI/Commands.cs b/TShockAPI/Commands.cs index 463cd12d..71851e36 100755 --- a/TShockAPI/Commands.cs +++ b/TShockAPI/Commands.cs @@ -223,6 +223,7 @@ namespace TShockAPI commands.Add(new Command("auth", "", AuthToken)); commands.Add(new Command("me", "", ThirdPerson)); commands.Add(new Command("p", "", PartyChat)); + commands.Add(new Command("antibuild", "editspawn", ToggleAntiBuild)); if (ConfigurationManager.distributationAgent != "terraria-online") { commands.Add(new Command("kill", "kill", Kill)); @@ -236,6 +237,18 @@ namespace TShockAPI #region Command Methods + public static void ToggleAntiBuild(CommandArgs args) + { + Tools.SendMessage(args.PlayerID, "Toggled world anti-build."); + if (ConfigurationManager.disableBuild) + { + ConfigurationManager.disableBuild = false; + } else + { + ConfigurationManager.disableBuild = true; + } + } + public static void CheckUpdates(CommandArgs args) { ThreadPool.QueueUserWorkItem(UpdateManager.CheckUpdate);