Disabled region protection for chests by default, added config option. Thanks DarkunderdoG
This commit is contained in:
parent
15816bc1ad
commit
5619ae3660
2 changed files with 5 additions and 2 deletions
|
|
@ -210,6 +210,9 @@ namespace TShockAPI
|
||||||
[Description("Server password required to join server")]
|
[Description("Server password required to join server")]
|
||||||
public string ServerPassword = "";
|
public string ServerPassword = "";
|
||||||
|
|
||||||
|
[Description("Protect chests with region and build permissions")]
|
||||||
|
public bool RegionProtectChests = false;
|
||||||
|
|
||||||
public static ConfigFile Read(string path)
|
public static ConfigFile Read(string path)
|
||||||
{
|
{
|
||||||
if (!File.Exists(path))
|
if (!File.Exists(path))
|
||||||
|
|
|
||||||
|
|
@ -1136,7 +1136,7 @@ namespace TShockAPI
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (TShock.CheckTilePermission(args.Player, x, y))
|
if (TShock.CheckTilePermission(args.Player, x, y) && TShock.Config.RegionProtectChests)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -1170,7 +1170,7 @@ namespace TShockAPI
|
||||||
return false;
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue