Dealing with "Can't Find Method" error

Discussion in 'CraftScripts' started by Greg-J, Feb 9, 2015.

  1. Greg-J

    Greg-J New Member

    It would seem that inHaze's very popular Build Commands does not work with Spigot/Bukkit/WorldEdit 1.8, and the creator has disappeared from the looks of it, so I'm attempting to make the plugin compatible myself.

    The error you get when you install the plugin (or at least myself and the only other person I could find that has done it) is as follows:

    Failed to Execute:
    Can't find method com.sk89q.worldedit.command.tool.BrushTool.setFill(com.sk89q.worldedit.patterns.SingleBlockPattern). (plugins\WorldEdit\craftscripts\build.js#45) in plugins\WorldEdit\craftscripts\build.js at line number 45.


    This is the contents of build.js:

    http://pastebin.com/jEVE1Tu9

    Not having developed a bukkit plugin or a craftscript before, I'm at a loss. It would seem that importing worldedit.patterns would import the SingleBlockPattern method from looking at the documentation, but clearly that method doesn't exist at the point of execution.

    I should note that the 4 other scripts (maze, draw, etc.) work just fine.
  2. wizjany

    wizjany Administrator Developer

    yea I've heard people having issues with those, as the API has changed quite a lot recently. In this specific instance, the patterns package was moved to function.pattern, and SingleBlockPattern is now just a BlockPattern with one block in it.
  3. Greg-J

    Greg-J New Member

    Thank you for the reply.

    Where would someone even find these changes or begin to track them down? I'm guessing there's a decent chance that just changing the package reference is going to lead me to other bugs, so knowing how to track stuff like this down would go a long way to helping me sort it all out.
  4. wizjany

    wizjany Administrator Developer

    Um, you can look through the github repo for changes but it's often non-intuitive because package moving breaks history. A lot of stuff has changed though, updating all those scripts could be a lot of work.
  5. Greg-J

    Greg-J New Member

    Well, at least now I have a direction to go in. Thank you for your insight, I'm sure I'll posting more.
  6. inHaze

    inHaze New Member

  7. Greg-J

    Greg-J New Member

    Because inHaze is off the chain!

    Seriously, thanks man!
  8. Greg-J

    Greg-J New Member

    Question on the new brushes (like the shoreline brush). Any documentation on them?