what if you simply use "num > 0"? You can almost "talk" to java.^^
Nope. It has to be exact the same instance. If you have 2 wooden shovels and you equal em it's still true. But i need the exact item. Thanks for...
Hi! I'm working with the onPlayerInteract event. If i save the item form event.getItem() and compare them in the next event, they do not equal....
yea, you still have to check the data! Maybe create an seperate Enum for each possible type, just for beeing readable. It's not wrong actually,...
To compile a classfile: Open commandline, if you have configured java you can type: javac...
For exapmle use the "InventoryListener();" - still old event system, the event is: Event.Type.INVENTORY_CHANGE;
Why even using getTypeId()? It's a lot easier and maintainable to check item.getType() against a Material. if(p.getItemInHand().getType() ==...
best answer possible.
This sounds really nice, but i only have little time and not that experience on bukkit...=(
You don't accomplish the constructors needs: this.getServer().getPluginManager().registerEvents(new AuthMePlayerListener(this), this);...
player1.getLocation().distance(player2.getLocation());
Ehr... do you have the newest Bukkit-jar version? Currently no idea what the real name is! ;) €dit: hmm.. screw this. If you can...
This will do the job: event.getPlayer().getInventory().setItem(event.getPlayer().getInventory().getHeldItemSlot(), null);
I wrote a world repair with this approach: - Let the explosion happen - keep the information of each block in explosion's blocklist - after a...
StringBuilder sb = new StringBuilder(); for(java.util.Map.Entry<String,Object> entry : mySet.entryset()) {...
AH! So if i call event.getEntity().getClass();, i could get the Item's class and cast it? Can't wait to try that! :D
€dit: The construction of objects can get a little bit wierd^^ An object is constructed exactly one single time, by using ONE of its contructors....
java.util.Date now = new Date(); //now.getTime() returns the Unix-Timestamp. //format the output to "24-01-2012 15:19:45" SimpleDateFormat...
There is a new Event-System: http://wiki.bukkit.org/Introduction_to_the_New_Event_System €dit: whoo.. it was a strange moment, when to the left...
For eclipse there is an Plugin: FatJar - http://fjep.sourceforge.net/ This could help you a bit. It injects all jar's that are in the classpath...
Separate names with a comma.