Hi,
I'm trying to change the position of a lever from within my plugin. What object/function do i need for that?
This is what i have:
Block block = Main.getInstance().getServer().getLevelByName(level).getBlock(((Long) position.get(0)).intValue(), ((Long) position.get(1)).intValue(), ((Long) position.get(2)).intValue());
Main.getInstance().getLogger().info("position x: " + block.getX());
Main.getInstance().getLogger().info("position y: " + block.getY());
Main.getInstance().getLogger().info("position z: " + block.getZ());
BlockLever lever = (BlockLever) block;
Main.getInstance().getLogger().info("lever is on? " + lever.isPowerOn());
Main.getInstance().getLogger().info("lever is power source? " + lever.isPowerSource());
... is there something like lever.setPower()?
I'm trying to change the position of a lever from within my plugin. What object/function do i need for that?
This is what i have:
Block block = Main.getInstance().getServer().getLevelByName(level).getBlock(((Long) position.get(0)).intValue(), ((Long) position.get(1)).intValue(), ((Long) position.get(2)).intValue());
Main.getInstance().getLogger().info("position x: " + block.getX());
Main.getInstance().getLogger().info("position y: " + block.getY());
Main.getInstance().getLogger().info("position z: " + block.getZ());
BlockLever lever = (BlockLever) block;
Main.getInstance().getLogger().info("lever is on? " + lever.isPowerOn());
Main.getInstance().getLogger().info("lever is power source? " + lever.isPowerSource());
... is there something like lever.setPower()?