Listener in conjunction with if statement

Discussion in 'Plugin Development' started by GeorgeMarx, Apr 21, 2014.

Thread Status:
Not open for further replies.
  1. Offline


    Why are you using a HashMap in the first place? Are you trying to compare two objects?
  2. Offline


    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.
  3. Offline


    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.
    Last edited by a moderator: Jun 7, 2016
  4. Offline


    Yes it is. You do know some Java, right?
  5. Offline


    Garris0n Yes just have not done it in a while might pause bukkit and refresh myself
  6. Offline


    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.
Thread Status:
Not open for further replies.

Share This Page