internal static void WorldFlush( Player player, Command cmd ) {
string worldName = cmd.Next();
World world = player.World;
if( worldName != null ) {
world = WorldManager.FindWorldOrPrintMatches( player, worldName );
if( world == null ) return;
} else if( player.World == null ) {
player.Message( "When using /wflush from console, you must specify a world name." );
return;
}
if( world.Map == null ) {
player.MessageNow( "WFlush: {0}&S has no updates to process.",
world.GetClassyName() );
} else {
player.MessageNow( "WFlush: Flushing {0}&S ({1} blocks in queue)...",
world.GetClassyName(),
world.Map.UpdateQueueSize() );
world.BeginFlushMapBuffer();
}
}