Disabled region protection for chests by default, added config option. Thanks DarkunderdoG

This commit is contained in:
Zidonuke 2011-12-28 22:38:29 -05:00
parent 15816bc1ad
commit 5619ae3660
2 changed files with 5 additions and 2 deletions

View file

@ -209,6 +209,9 @@ namespace TShockAPI
[Description("Server password required to join server")]
public string ServerPassword = "";
[Description("Protect chests with region and build permissions")]
public bool RegionProtectChests = false;
public static ConfigFile Read(string path)
{

View file

@ -1136,7 +1136,7 @@ namespace TShockAPI
return true;
}
if (TShock.CheckTilePermission(args.Player, x, y))
if (TShock.CheckTilePermission(args.Player, x, y) && TShock.Config.RegionProtectChests)
{
return false;
}
@ -1170,7 +1170,7 @@ namespace TShockAPI
return false;
}
if (TShock.CheckTilePermission(args.Player, Main.chest[id].x, Main.chest[id].y))
if (TShock.CheckTilePermission(args.Player, Main.chest[id].x, Main.chest[id].y) && TShock.Config.RegionProtectChests)
{
return false;
}