Z index based regions

This commit is contained in:
Zack Piispanen 2012-04-15 15:39:09 -04:00
parent 7c7a9a90ee
commit b5504d2319
2 changed files with 79 additions and 11 deletions

View file

@ -2883,6 +2883,26 @@ namespace TShockAPI
break;
}
case "z":
{
if (args.Parameters.Count == 3)
{
string regionName = args.Parameters[1];
int z = 0;
if (int.TryParse(args.Parameters[2], out z ) )
{
if (TShock.Regions.SetZ(regionName, z))
args.Player.SendMessage("Region's z is now " + z, Color.Yellow);
else
args.Player.SendMessage("Could not find specified region", Color.Red);
}
else
args.Player.SendMessage("Invalid syntax! Proper syntax: /region z [name] [#]", Color.Red);
}
else
args.Player.SendMessage("Invalid syntax! Proper syntax: /region z [name] [#]", Color.Red);
break;
}
case "resize":
case "expand":
{