Creating a building using a plugin?

Hi Guys,

I would like to create a plugin that will allow me to create predefined buildings. I know there are plugins with such functionality (e.g. CopyPaste) but i would like to learn how it's done and play with it a little. I've already checked the mentioned plugin's code but I don't understand it.. Could someone please lay it out for me? Or maybe someone has a code sample for it, like adding foundation, one wall and doors?

Thank you in advance!

Just look how it's done in the game itself, that's the easiest way to understand
i think the question here is the opertunity to learn how to do it ... and yes CopyPaste is fairly complicated .
i myself is looking into this but its hard to get a start so let me simplfy the question

any code ideas on how to place one foundation and set grade at set location.....?
thanks

Merged post
private const string prefab = "assets/prefabs/*/*.prefab";

[Command("spawn")]
private void Commandspawn(IPlayer player, string cmd, string[] args)
{


    var Position = new Vector3(player.Position().X + 1.5f, player.Position().Y, player.Position().Z);
    var entity = GameManager.server.CreateEntity(prefab, Position);
    entity.Spawn();
}​

Is this the way to start the spawn or am i going in the wrong direction?