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()) {...
Separate names with a comma.