Oh, duh. [sheep]
Which is why you have a boolean that ends the loop for you, instead of having that ugly break in there.
Well, yes, but the additional condition... in a for loop? Ew. Maybe it's just the way I learned it but that bothers me :p EDIT: Break? /me...
use boolean found = false; int i=0; while(i<players.length && !found) { if (eid == players[i].getEntityId()) { player =...
The problem with this solution is that if the plugin is disabled and someone joins (or leaves) and then the plugin is re-enabled then you will...
boolean is a primitive type. A boolean variable is not an object, it simply stores true or false. A Boolean variable, on the other hand, is an...
Your didn't update your constructor method. See http://forums.bukkit.org/threads/oops-i-broke-your-plugins.599/
The variable will be released when the method (or for/while/if/etc. statement) it is declared in ends, so if you declared that at the beginning of...
http://forums.bukkit.org/threads/oops-i-broke-your-plugins.599/ Packages have been changed around; all entity stuff are now in org.bukkit.entity...
Looks like you don't have the most recent release of Bukkit, you need to get that for it to work.
Solution posted here.
See this thread for a solution.
I have seen several threads asking this for different purposes, so instead of answering them individually I decided to just make a thread. As...
You can just do if (damagee instanceof Player) { //do stuff } the == true is redundant and the Entity shouldn't be there.
This should work (I haven't tested it) public boolean isPlayer(Entity entity) { if (entity instanceof Player) { return true }...
nevermind.
Using the exact same code you used here gave no errors for me. Could you paste the entire error message you're getting? Also note: you got the...
Separate names with a comma.