Getting error with Worldedit API when trying to paste schematic

Discussion in 'WorldEdit' started by Robotnik, Aug 10, 2017.

  1. Robotnik

    Robotnik New Member

    Im trying to use the worldedit API to paste a schematic, but after the 1.12 update it has been giving me this error and schematics end up being half pasted

    Code (Text):
    [12:10:31] [Server thread/ERROR]: Could not pass event ChunkPopulateEvent to WorldSchematics2 v2.5.0
    org.bukkit.event.EventException: null
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[minecraft_server.jar:git-Spigot-edd0396-2a927e8]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[minecraft_server.jar:git-Spigot-edd0396-2a927e8]
        at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:499) [minecraft_server.jar:git-Spigot-edd0396-2a927e8]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:484) [minecraft_server.jar:git-Spigot-edd0396-2a927e8]
        at net.minecraft.server.v1_12_R1.Chunk.a(Chunk.java:986) [minecraft_server.jar:git-Spigot-edd0396-2a927e8]
        at net.minecraft.server.v1_12_R1.Chunk.loadNearby(Chunk.java:950) [minecraft_server.jar:git-Spigot-edd0396-2a927e8]
        at net.minecraft.server.v1_12_R1.ChunkProviderServer.originalGetChunkAt(ChunkProviderServer.java:173) [minecraft_server.jar:git-Spigot-edd0396-2a927e8]
        at net.minecraft.server.v1_12_R1.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:140) [minecraft_server.jar:git-Spigot-edd0396-2a927e8]
        at net.minecraft.server.v1_12_R1.PlayerChunk.a(PlayerChunk.java:112) [minecraft_server.jar:git-Spigot-edd0396-2a927e8]
        at net.minecraft.server.v1_12_R1.PlayerChunkMap.flush(PlayerChunkMap.java:169) [minecraft_server.jar:git-Spigot-edd0396-2a927e8]
        at net.minecraft.server.v1_12_R1.WorldServer.doTick(WorldServer.java:316) [minecraft_server.jar:git-Spigot-edd0396-2a927e8]
        at net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:801) [minecraft_server.jar:git-Spigot-edd0396-2a927e8]
        at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:406) [minecraft_server.jar:git-Spigot-edd0396-2a927e8]
        at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:679) [minecraft_server.jar:git-Spigot-edd0396-2a927e8]
        at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:577) [minecraft_server.jar:git-Spigot-edd0396-2a927e8]
        at java.lang.Thread.run(Unknown Source) [?:1.8.0_121]
    Caused by: java.lang.NoSuchMethodError: net.minecraft.server.v1_12_R1.TileEntity.a(Lnet/minecraft/server/v1_12_R1/NBTTagCompound;)V
        at com.sk89q.worldedit.bukkit.adapter.impl.Spigot_v1_12_R1.readTagIntoTileEntity(Spigot_v1_12_R1.java:116) ~[?:?]
        at com.sk89q.worldedit.bukkit.adapter.impl.Spigot_v1_12_R1.setBlock(Spigot_v1_12_R1.java:253) ~[?:?]
        at com.sk89q.worldedit.bukkit.BukkitWorld.setBlock(BukkitWorld.java:416) ~[?:?]
        at com.sk89q.worldedit.extent.world.FastModeExtent.setBlock(FastModeExtent.java:92) ~[?:?]
        at com.sk89q.worldedit.extent.AbstractDelegateExtent.setBlock(AbstractDelegateExtent.java:78) ~[?:?]
        at com.sk89q.worldedit.extent.world.SurvivalModeExtent.setBlock(SurvivalModeExtent.java:88) ~[?:?]
        at com.sk89q.worldedit.extent.AbstractDelegateExtent.setBlock(AbstractDelegateExtent.java:78) ~[?:?]
        at com.sk89q.worldedit.extent.world.BlockQuirkExtent.setBlock(BlockQuirkExtent.java:64) ~[?:?]
        at com.sk89q.worldedit.extent.AbstractDelegateExtent.setBlock(AbstractDelegateExtent.java:78) ~[?:?]
        at com.sk89q.worldedit.extent.world.ChunkLoadingExtent.setBlock(ChunkLoadingExtent.java:66) ~[?:?]
        at com.sk89q.worldedit.extent.AbstractDelegateExtent.setBlock(AbstractDelegateExtent.java:78) ~[?:?]
        at com.sk89q.worldedit.extent.AbstractDelegateExtent.setBlock(AbstractDelegateExtent.java:78) ~[?:?]
        at com.sk89q.worldedit.extent.validation.DataValidatorExtent.setBlock(DataValidatorExtent.java:67) ~[?:?]
        at com.sk89q.worldedit.extent.AbstractDelegateExtent.setBlock(AbstractDelegateExtent.java:78) ~[?:?]
        at com.sk89q.worldedit.extent.inventory.BlockBagExtent.setBlock(BlockBagExtent.java:111) ~[?:?]
        at com.sk89q.worldedit.extent.AbstractDelegateExtent.setBlock(AbstractDelegateExtent.java:78) ~[?:?]
        at com.sk89q.worldedit.extent.reorder.MultiStageReorder.setBlock(MultiStageReorder.java:93) ~[?:?]
        at com.sk89q.worldedit.extent.AbstractDelegateExtent.setBlock(AbstractDelegateExtent.java:78) ~[?:?]
        at com.sk89q.worldedit.extent.ChangeSetExtent.setBlock(ChangeSetExtent.java:64) ~[?:?]
        at com.sk89q.worldedit.extent.AbstractDelegateExtent.setBlock(AbstractDelegateExtent.java:78) ~[?:?]
        at com.sk89q.worldedit.extent.MaskingExtent.setBlock(MaskingExtent.java:69) ~[?:?]
        at com.sk89q.worldedit.extent.AbstractDelegateExtent.setBlock(AbstractDelegateExtent.java:78) ~[?:?]
        at com.sk89q.worldedit.extent.validation.BlockChangeLimiter.setBlock(BlockChangeLimiter.java:87) ~[?:?]
        at com.sk89q.worldedit.EditSession.setBlock(EditSession.java:504) ~[?:?]
        at com.sk89q.worldedit.EditSession.setBlock(EditSession.java:547) ~[?:?]
        at com.sk89q.worldedit.CuboidClipboard.place(CuboidClipboard.java:439) ~[?:?]
        at com.sk89q.worldedit.CuboidClipboard.paste(CuboidClipboard.java:407) ~[?:?]
        at com.sk89q.worldedit.CuboidClipboard.paste(CuboidClipboard.java:389) ~[?:?]
        at WorldSchematics.SpawnSchematic.Spawn(SpawnSchematic.java:343) ~[?:?]
        at WorldSchematics.SpawnSchematic.Spawn(SpawnSchematic.java:165) ~[?:?]
        at WorldSchematics.ChunkListenser.onChunkPopulate(ChunkListenser.java:147) ~[?:?]
        at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source) ~[?:?]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_121]
        at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_121]
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:302) ~[minecraft_server.jar:git-Spigot-edd0396-2a927e8]
        ... 15 more
    Here is the code block when the schematic is being pasted and where the error occurs in my code

    Code (Text):
                    try{
                        //overlooked the pasteair option in the config, so invert whatever the boolean is
                        cuboidClipboard.paste(editsession, pasteposition, !pasteair);
                    }catch (Exception NullPointerException){

                    }
  2. wizjany

    wizjany Administrator Developer

    are you "whydoineedaccount" on the tracker? you have the same issue but your code looks different.

    same thing though...are you sure you're on the right version? pastebin log.


    also please stop posting in multiple places (like the other thread), you're just wasting my time and making it less likely that i'll want to help you
  3. Robotnik

    Robotnik New Member

    Yeah, Im not sure how I missed it but I was using the wrong version, so my bad.

    You can close that issue it works fine now