load and paste schematics without using deprecated methods.

Discussion in 'WorldEdit' started by blueye_, Aug 19, 2017.

  1. blueye_

    blueye_ New Member

    I feel like this should be a very basic question, but I could not find an answer anywhere so I will ask you here.

    What's the way I am supposed to load a schematic and paste it into a world. All the methods I found were deprecated a long time ago, so I guess there has to be a new way to do this. Could anyone give me a hint on where to start, or a link to a similar but solved problem?
  2. wizjany

    wizjany Administrator Developer

    use the search bar
  3. blueye_

    blueye_ New Member

    Code (Text):
    private void loadArea(World world, File file,Vector origin, String id) throws IOException, MaxChangedBlocksException, com.sk89q.worldedit.world.DataException{
            EditSession es = new EditSession(new BukkitWorld(world), 999999999);
            CuboidClipboard cc = CuboidClipboard.loadSchematic(file);
            cc.paste(es, origin, false);
        }
    This is the method I found before but it's deprecated all over the place. I figured there would be a new way to do this, but I couldn't find it anywhere.
  4. wizjany

    wizjany Administrator Developer

    there's like 5 different threads on these forums with it (or just a link to it)