CuboidClipboard.paste NPE error

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

  1. Robotnik

    Robotnik New Member

    I not sure if its because its depreciated or if its with the API, but Ive spent the last 6 hours trying to figure out why this NPE error occurs and I cant find anything in my code that is causing it. Im gonna paste what I have though in case im being an idiot

    Code (Text):
        private void loadArea(World world, Vector origin, int[] pasteNoneOfThese) {
            EditSession es = new EditSession(new BukkitWorld(world), 1000000);
            try  {
                cc.paste(es, origin, true); //line 56, NPE error occurs here
            } catch(MaxChangedBlocksException e) {
                e.printStackTrace();
            }
        }
    Stack trace
    http://pastebin.com/7aYhkejz

    I just want to know whether there is anything I can do about this or if its something on your guys end. Because im at a loss of what to do
  2. wizjany

    wizjany Administrator Developer

    worldedit is disabled or you are doing things before worldedit has loaded.
  3. Robotnik

    Robotnik New Member

    Ah that makes sense now, Im trying to paste things into the world while it generates. Ill just have to find a way of pasting them after the server is done loading then