Dont let a client open a chest if the config protects regions and they dont have access to the chest.

This commit is contained in:
Zack Piispanen 2013-11-07 05:51:16 -05:00
parent 55f969f250
commit 8d00f9fa83

View file

@ -2795,6 +2795,12 @@ namespace TShockAPI
args.Player.ActiveChest = id;
if (TShock.CheckTilePermission(args.Player, x, y) && TShock.Config.RegionProtectChests)
{
args.Player.SendData(PacketTypes.ChestOpen, "", -1);
return true;
}
return false;
}