how do if fix the error from player.getHealth() using 1.6.1

Discussion in 'Plugin Development' started by Heckya1234 (The_3_gamers), Jul 24, 2013.

Thread Status:
Not open for further replies.
  1. Code:java
    1. if ((this.plugin.playerarena.get(player) != null) && (player.getHealth() <= event.getDamage()) && (((Arena)this.plugin.arenas.get(this.plugin.playerarena.get(player))).getStarted().booleanValue()) && (((Arena)this.plugin.arenas.get(this.plugin.playerarena.get(player))).getCounter().intValue() <= 0))
     
  2. Offline

    chasechocolate

    Assuming you mean player.getHealth() is ambiguous, build against Bukkit.jar.
     
  3. Edit I fixed the player.getHeath but 2 more errors are in the code

    Code:java
    1. if ((this.plugin.playerarena.get(player) != null) && (getHealth()) <= event.getDamage()) && (this.plugin.arenas.get(this.plugin.playerarena.get(player))).getStarted().booleanValue()) && (((Arena)this.plugin.arenas.get(this.plugin.playerarena.get(player))).getCounter().intValue() <= 0));
     
  4. Offline

    Chiller

  5. Offline

    ZeusAllMighty11

    How can we help you, if we don't even know what the errors are or where they point?
     
  6. The Errors are the last 2 &&
    I use Java 7 Update 25

    I remade the line still not solved

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 3, 2016
  7. Offline

    ZeusAllMighty11

    You only posted 1 line for us to see, and even with what you gave us, it's still difficult to interpret the issue.
    Can you please post exactly what the error says? Maybe even post the full class, so we can see what is really going on?

    I am taking a wild guess here and saying that the 'plugin' variable is null, but you didn't specify whether it was a console erorr or a compiler error.
     
  8. Offline

    xTrollxDudex

    chasechocolate
    Wow. They are really upping the staff, a sincere congrats from me :)
     
    chasechocolate and Eats_Rainbows like this.
  9. Offline

    chasechocolate

  10. i reinstalled jre and jdk i found the fix ok now

    LOCKED
     
Thread Status:
Not open for further replies.

Share This Page