private static void ZoneInfoHandler( Player player, Command cmd )
{
string zoneName = cmd.Next();
if ( zoneName == null ) {
player.Message( "No zone name specified. See &H/Help ZInfo" );
return;
}
Zone zone = player.WorldMap.Zones.Find( zoneName );
if ( zone == null ) {
player.MessageNoZone( zoneName );
return;
}
player.Message( "About zone \"{0}\": size {1} x {2} x {3}, contains {4} blocks, editable by {5}+.",
zone.Name,
zone.Bounds.Width, zone.Bounds.Length, zone.Bounds.Height,
zone.Bounds.Volume,
zone.Controller.MinRank.ClassyName );
player.Message( " Zone center is at ({0},{1},{2}).",
( zone.Bounds.XMin + zone.Bounds.XMax ) / 2,
( zone.Bounds.YMin + zone.Bounds.YMax ) / 2,
( zone.Bounds.ZMin + zone.Bounds.ZMax ) / 2 );
if ( zone.CreatedBy != null ) {
player.Message( " Zone created by {0}&S on {1:MMM d} at {1:h:mm} ({2} ago).",
zone.CreatedByClassy,
zone.CreatedDate,
DateTime.UtcNow.Subtract( zone.CreatedDate ).ToMiniString() );
}
if ( zone.EditedBy != null ) {
player.Message( " Zone last edited by {0}&S on {1:MMM d} at {1:h:mm} ({2}d {3}h ago).",
zone.EditedByClassy,
zone.EditedDate,
DateTime.UtcNow.Subtract( zone.EditedDate ).Days,
DateTime.UtcNow.Subtract( zone.EditedDate ).Hours );
}
PlayerExceptions zoneExceptions = zone.ExceptionList;
if ( zoneExceptions.Included.Length > 0 ) {
player.Message( " Zone whitelist includes: {0}",
zoneExceptions.Included.JoinToClassyString() );
}
if ( zoneExceptions.Excluded.Length > 0 ) {
player.Message( " Zone blacklist excludes: {0}",
zoneExceptions.Excluded.JoinToClassyString() );
}
if ( null != zone.Message )
player.Message( " Zone has custom deny build message: " + zone.Message );
else
player.Message( " Zone has no custom deny build message" );
}