Can anyone help me by giving me an example of how to save and paste a schematic With FastAsyncWorldEdit API? I'm having trouble with this' - https://github.com/boy0001/FastAsyncWorldedit/wiki/Pasting-a-schematic
I was trying to figure this out a few weeks ago as well... From what I understood from that wiki page, you can use WorldEdit's API to paste the schematic in an Asynchronous task. When I did this it didn't paste the blocks little-by-little like you would see if you used the command, but it runs much faster. Code (Text): public static void restoreRegion(World world, ProtectedRegion region) throws DataException, IOException, MaxChangedBlocksException { EditSession es = new EditSession(new BukkitWorld(world), Integer.MAX_VALUE); Vector origin = new Vector(region.getMinimumPoint().getBlockX(), region.getMinimumPoint().getBlockY(), region.getMinimumPoint().getBlockZ()); File regionSchem = new File(Main.getInstance().getDataFolder() + File.separator + "schematics" + File.separator + region.getId() + ".schematic"); Bukkit.getScheduler().runTaskAsynchronously( Main.getInstance(), new Runnable() { @Override public void run() { try { CuboidClipboard cc = CuboidClipboard.loadSchematic(regionSchem); cc.paste(es, origin, false); System.out.print(Main.consolePrefix + "Pasted schematic for region " + region.getId()); } catch (com.sk89q.worldedit.world.DataException | IOException | MaxChangedBlocksException e) { System.out.print(Main.consolePrefix + "DataException while loading schematic!"); e.printStackTrace(); } } } ); }