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);