1.8.8 WorldEdit pasting giving casting error?

Discussion in 'Spigot Plugin Development' started by minecraftguy719, Feb 2, 2020.

  1. Hello all I am trying to paste a schematic into a world using the WorldEdit API however I am getting this error?
    Code (Text):

    Caused by: java.lang.ClassCastException: org.bukkit.craftbukkit.v1_8_R3.CraftWorld cannot be cast to com.sk89q.worldedit.world.World
            at me.Rhys.Sumo.Utils.WorldUtils.loadSchematic(WorldUtils.java:49) ~[?:?]
            at me.Rhys.Sumo.Debug.DebugCommand.onCommand(DebugCommand.java:24) ~[?:?]
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[spigot.jar:git-Spigot-db6de12-18fbb24]
            ... 15 more
     
    Code:
    Code (Text):

    boolean allowUndo = true;
    EditSession editSession = ClipboardFormats.findByFile(file).load(file).paste(new BukkitWorld(location.getWorld()), vector, allowUndo, false, (Transform) null);
     
     
  2. Update: I got rid of the error however nothing is pasted?

    Thanks
     
  3. I have been looking into this for a while to no avail.