Discussion in 'Plugin Development' started by GeorgeMarx, Apr 21, 2014.
Why are you using a HashMap in the first place? Are you trying to compare two objects?
He's storing multiple players, because more than one player can be a pvp god.
The problem is, ourplayer currently represents the player that just typed the command just that very instant. Which... doesn't make sense. All of the players that type the command with proper permissions should be invincible until they toggle it off. He needs to make a new ourplayer inside the damage event, if I understand this correctly.
Garris0n Player.getname but player isn't called in the listener class and i cant call player
Bobit thanks ,you get it completely but at the moment our player is created from theSender how would i create it differently?
EDIT by Moderator: merged posts, please use the edit button instead of double posting.
Yes it is. You do know some Java, right?
Garris0n Yes just have not done it in a while might pause bukkit and refresh myself
First of all, shouldn't OnCommand have an @EventHandler over it? I don't know, though.
Second of all, simply change the code you're putting into "the listener" from "ourPlayer" to "e," I think.
Separate names with a comma.