Pasting a schematic with the new API

Discussion in 'Programming Help' started by Robotnik, Mar 15, 2016.

  1. Robotnik

    Robotnik New Member

    Hi, im trying to update an old plugin which used a version of worldedit from 2 years ago in order to function. O I need to use the new API to make it work, however I have no idea how the 6.0 API works as there is no documentation. If someone could post some sample code showing how to use the clipboard (or whatever it is now, was formerly CuboidClipboard) to paste something it would be really helpful

    I basically just need to update this method here, which pastes a schematic.

    Code (Text):

       private void loadArea(World world, Vector origin, int[] pasteNoneOfThese) {
    //EditSession is depreciated
            EditSession es = new EditSession(new BukkitWorld(world), 1000000);
            LocalSession ls = new LocalSession();
    //AbstractPlayerActor doesnt even seem to exist anymore in the API, as eclipse is marking it red
            Player player = new AbstractPlayerActor();
            try  {
                cc.paste(player, ls, es, true,false,false);
            } catch(WorldEditException e) {
  2. wizjany

    wizjany Administrator Developer

  3. Robotnik

    Robotnik New Member

    Thanks, very helpful