diff --git a/TShockAPI/DB/RegionManager.cs b/TShockAPI/DB/RegionManager.cs index b3eef5fe..31519726 100644 --- a/TShockAPI/DB/RegionManager.cs +++ b/TShockAPI/DB/RegionManager.cs @@ -283,6 +283,21 @@ namespace TShockAPI.DB return regions; } + public List InAreaRegion(int x, int y) + { + List regions = new List() { }; + foreach (Region region in Regions) + { + if (x >= region.Area.Left && x <= region.Area.Right && + y >= region.Area.Top && y <= region.Area.Bottom && + region.DisableBuild) + { + regions.Add(region); + } + } + return regions; + } + public static List ListIDs(string MergedIDs) { return MergedIDs.Split(new[] {','}, StringSplitOptions.RemoveEmptyEntries).ToList(); diff --git a/TShockAPI/Rest/RestManager.cs b/TShockAPI/Rest/RestManager.cs index 160dad55..42035802 100644 --- a/TShockAPI/Rest/RestManager.cs +++ b/TShockAPI/Rest/RestManager.cs @@ -510,7 +510,7 @@ namespace TShockAPI {"ip", player.IP}, {"group", player.Group.Name}, {"position", player.TileX + "," + player.TileY}, - {"inventory", string.Join(", ", activeItems.Select(p => (p.name + ":" + p.stack)))}, + {"inventory", string.Join(", ", activeItems.Select(p => (String.Format( "({0}){1}:{2}", p.prefix, p.name, p.stack))))}, {"buffs", string.Join(", ", player.TPlayer.buffType)} }; }