getHealth strikes our lives once again

Discussion in 'Plugin Development' started by MonkeyPlays, Feb 23, 2014.

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

    MonkeyPlays

    Well Bukkit, getHealth(); is being buggy and it still sais "is ambigious" you may refer me back to the post "I may have not broke your plugins" Or whatever it is called, because doubles and floats seem to not work here is my code I will do the rest.
    Code:
    package me.BuissnessMonkey.RadeArmor;
     
    import org.bukkit.event.EventHandler;
    import org.bukkit.event.Listener;
    import org.bukkit.event.entity.PlayerDeathEvent;
     
    public class DeathMessage implements Listener {
       
        @EventHandler
        public void onDeath(PlayerDeathEvent e){
            double hearts = e.getEntity().getHealth();
     
           
        }
     
    }
    
     
  2. Offline

    felixferr0w

  3. Offline

    Jalau

    You add the craftbukkit and bukkit.jar to your build path but add the bukkit.jar BEFORE the craftbukkit one ;)
     
  4. Offline

    MonkeyPlays

    Thank you Jalau helped alot
     
  5. Offline

    iPoke111

    MonkeyPlays Jalau
    sorry if this is a pointless bump, but couldn't you just use
    Damageable d = e.getEntity();
    double hearts = d.getHealth();
     
  6. Offline

    Jalau

    Have no idea but why should you?
     
  7. Offline

    iPoke111

    you don't need to add two things to your build path.
     
  8. Offline

    Booshayy

    Exactly. Adding bukkit.jar or craftbukkit.jar (preferably bukkit.jar) is sufficient. There's no need for two of the same thing.
     
  9. Offline

    xNamesi

    Juat hover over it and click the only option. it will be crossed out but it will still work
     
Thread Status:
Not open for further replies.

Share This Page