I am trying to make a script that draws a circle for minecraft using singleplayer commands. For starting, I tried to do the basics; here is my code:
importPackage(Packages.com.sk89q.worldedit.blocks); importPackage(Packages.com.sk89q.worldedit); var sess = context.remember(); var playerBlock = player.getBlockOn(); var other = playerBlock.setY(playerBlock.getY + 1); sess.setBlock(other, new BaseBlock(BlockID.CLOTH, argv));
But when I run it, it says:
playerBlock.getY is a function, the result of which you should pass. Now you pass the function itself (which gets converted to it’s source code, i.e. a string).
var other = playerBlock.setY(playerBlock.getY() + 1);