Fixed getRegion not returning null (functions using it were expecting null too)
Disabled noclip check. (general-devel is not general-test) Added null check to /region info (Don't commit shit that you know is broken)
This commit is contained in:
parent
05f0e9d717
commit
625bab753b
4 changed files with 26 additions and 18 deletions
|
|
@ -1927,7 +1927,13 @@ namespace TShockAPI
|
|||
if (args.Parameters.Count > 1)
|
||||
{
|
||||
string regionName = String.Join(" ", args.Parameters.GetRange(1, args.Parameters.Count - 1));
|
||||
Region r = TShock.Regions.getRegion(regionName);
|
||||
Region r = TShock.Regions.GetRegionByName(regionName);
|
||||
|
||||
if (r == null)
|
||||
{
|
||||
args.Player.SendMessage("Region {0} does not exist");
|
||||
break;
|
||||
}
|
||||
|
||||
args.Player.SendMessage(r.Name + ": P: " + r.DisableBuild + " X: " + r.Area.X + " Y: " + r.Area.Y + " W: " + r.Area.Width + " H: " + r.Area.Height);
|
||||
foreach (int s in r.AllowedIDs)
|
||||
|
|
@ -1936,7 +1942,9 @@ namespace TShockAPI
|
|||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
args.Player.SendMessage("Invalid syntax! Proper syntax: /region info [name]", Color.Red);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue