Adds canbuild permission - requires permission to consider manipulating tiles.
Closes #221
This commit is contained in:
parent
aa511e003b
commit
811f7ab1dc
2 changed files with 19 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue