Added command to toggle anti-build.
This commit is contained in:
parent
2fe906744f
commit
feea5700ac
1 changed files with 13 additions and 0 deletions
|
|
@ -223,6 +223,7 @@ namespace TShockAPI
|
||||||
commands.Add(new Command("auth", "", AuthToken));
|
commands.Add(new Command("auth", "", AuthToken));
|
||||||
commands.Add(new Command("me", "", ThirdPerson));
|
commands.Add(new Command("me", "", ThirdPerson));
|
||||||
commands.Add(new Command("p", "", PartyChat));
|
commands.Add(new Command("p", "", PartyChat));
|
||||||
|
commands.Add(new Command("antibuild", "editspawn", ToggleAntiBuild));
|
||||||
if (ConfigurationManager.distributationAgent != "terraria-online")
|
if (ConfigurationManager.distributationAgent != "terraria-online")
|
||||||
{
|
{
|
||||||
commands.Add(new Command("kill", "kill", Kill));
|
commands.Add(new Command("kill", "kill", Kill));
|
||||||
|
|
@ -236,6 +237,18 @@ namespace TShockAPI
|
||||||
|
|
||||||
#region Command Methods
|
#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)
|
public static void CheckUpdates(CommandArgs args)
|
||||||
{
|
{
|
||||||
ThreadPool.QueueUserWorkItem(UpdateManager.CheckUpdate);
|
ThreadPool.QueueUserWorkItem(UpdateManager.CheckUpdate);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue