From 88ac9be55aeb4fc9b3fa2108a9a8a7fb5ece6595 Mon Sep 17 00:00:00 2001 From: Simon Date: Fri, 7 Mar 2014 01:19:54 +0400 Subject: [PATCH] Add can-build check in /grow --- TShockAPI/Commands.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/TShockAPI/Commands.cs b/TShockAPI/Commands.cs index 19ccd9ed..2863be5f 100755 --- a/TShockAPI/Commands.cs +++ b/TShockAPI/Commands.cs @@ -4494,6 +4494,13 @@ namespace TShockAPI var name = "Fail"; var x = args.Player.TileX; var y = args.Player.TileY + 3; + + if (!TShock.Regions.CanBuild(x, y, args.Player)) + { + args.Player.SendErrorMessage("You're not allowed to build here!"); + return; + } + switch (args.Parameters[0].ToLower()) { case "tree":