Schematics
World data to be manipulated and placed many times
Schematics hold block information within a dimension.
Schematic manipulation
//Lets make a 3x3x3 cube dimension
Dimension dimm = new Dimension(3, 3, 3);
//Create an empty schematic
Schematic schem = new Schematic(dimm);
//Fill it all with cobblestone
schem.fill(new MaterialBlock(Material.COBBLESTONE));
//Set the center block to air
schem.set(1, 1, 1, Material.AIR, (byte)0);
//Replace cobblestone with cobblestone and stone randomly
RandomDistortion dist = new RandomDistortion(new MaterialBlock(Material.COBBLESTONE), new MaterialBlock(Material.COBBLESTONE), new MaterialBlock(Material.STONE));
dist.onDistort(schem);
//Replace all stone with glowstone
schem.replace(new MaterialBlock(Material.STONE), new MaterialBlock(Material.GLOWSTONE));
//Remove the top layer
schem.setFace(new MaterialBlock(Material.AIR), Direction.U);
//Build it in the world (5 blocks above player)
schem.apply(Bukkit.getPlayer("cyberpwn").getLocation().add(0, 5, 0));