I'm attempting to set up the piston hooks from the API for my plugin. I triple-checked that I have the most recent Bukkit jar (Build 770), and have never had issues with new versions of Bukkit before, and have been using the same (wget) system for months, so I don't think it's that. I am using Eclipse to develop, and I do know plenty well enough to shut down eclipse before downloading the new Bukkit, and to not start it up until the download has finished. The problem is that if I copy this line: Code: pm.registerEvent(Event.Type.REDSTONE_CHANGE, blockListener, Priority.Normal, this); And then try to edit the Event.Type, none of the piston events show up in the autocomplete menu, and I'm not entirely sure what the events should be called (I think it's BLOCK_PISTON_EXTEND and RETRACT?) so that I can try to force it in and compile. I'm not sure what could be causing this to happen, or what I can test / check. I would appreciate any help or information. Thank you.
This works for me: Code: pm.registerEvent(Event.Type.BLOCK_PISTON_EXTEND, new blockBreak(), Event.Priority.Normal, this); pm.registerEvent(Event.Type.BLOCK_PISTON_RETRACT, new blockBreak(), Event.Priority.Normal, this);
Nope In Eclipse: Forcing it to compile anyway, Java gives me this during Bukkit startup: To test, I tried Code: System.out.println("Your version is " + Bukkit.getServer().getVersion()); which yielded: I'm guessing the b1000 means build 1000. I'm...not sure why it's particularly deciding not to work for me...
Just manually import them at the top. I've seen this happen a few times with Eclipse, where if you have too many 'import-able' packages, it won't recognize any of them. Atleast, I think that is what is happening with you. I may be wrong.
Can't hurt. Code: import org.bukkit.event.Event; Is at the top already, though. And that appears to be the container for Event.type. If there's something else I could / should be importing, I'm happy to type it.
Yeah you need to update your bukkit jar file. The one you compile with, that is (not just the one you run).