diff --git a/TShockAPI/GetDataHandlers.cs b/TShockAPI/GetDataHandlers.cs index 7ffa8d48..1615953c 100755 --- a/TShockAPI/GetDataHandlers.cs +++ b/TShockAPI/GetDataHandlers.cs @@ -242,6 +242,11 @@ namespace TShockAPI int x = args.Data.ReadInt32(); int y = args.Data.ReadInt32(); byte tiletype = args.Data.ReadInt8(); + if (!args.Player.Group.HasPermission("canbuild")) + { + args.Player.SendMessage("You do not have permission to build!", Color.Red); + return true; + } if (type == 1 || type == 3) { int plyX = Math.Abs(args.Player.TileX); @@ -453,6 +458,12 @@ namespace TShockAPI } } + if (!args.Player.Group.HasPermission("canbuild")) + { + args.Player.SendMessage("You do not have permission to build!", Color.Red); + return true; + } + if (lava && !args.Player.Group.HasPermission("canlava")) { args.Player.SendMessage("You do not have permission to use lava", Color.Red); @@ -512,6 +523,11 @@ namespace TShockAPI Tools.ForceKick(args.Player, string.Format("Tile Kill abuse ({0})", Main.tile[tilex, tiley].type)); return true; } + if (!args.Player.Group.HasPermission("canbuild")) + { + args.Player.SendMessage("You do not have permission to build!", Color.Red); + return true; + } if (!args.Player.Group.HasPermission("editspawn") && RegionManager.InProtectedArea(tilex, tiley, Tools.GetPlayerIP(args.Player.Name))) { args.Player.SendMessage("Region protected from changes.", Color.Red); diff --git a/TShockAPI/config/groups.txt b/TShockAPI/config/groups.txt index 6045269b..51b67ad0 100644 --- a/TShockAPI/config/groups.txt +++ b/TShockAPI/config/groups.txt @@ -39,10 +39,11 @@ #ignoregriefdetection - allow player to grief (use explosives, water, lava even if they dont have premission to) #usebanneditem - allows player to use banned items #manageusers - Grab player info -#whisper - allow a player to whisper to other players +#whisper - allow player to whisper to other players #adminchat - Colors and adds a prefix to the player's chats. +#canbuild - allow player to build (does not bypass other checks) -default null canwater canlava warp +default null canwater canlava warp canbuild vip default reservedslot newadmin default kick editspawn reservedslot admin newadmin ban unban whitelist causeevents spawnboss spawnmob managewarp time tp pvpfun kill logs immunetokick tphere