Solved Need help with healing!

Discussion in 'Plugin Development' started by Tyguy20, Mar 22, 2014.

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

    Tyguy20

    I can not seem to get this to work. This is a fraction of my code. Any ideas why it won't work?

    Code:java
    1. }else if(commandLabel.equalsIgnoreCase("Recover"))
    2. player.setHealthScale(20);
    3. player.sendMessage(ChatColor.GREEN + "You have recovered!");
    4.  
     
  2. Offline

    JeZPvP

    its "player.setHealth(20);" not "player.setHealthScale(20)".
     
  3. Offline

    Tyguy20

    When I try to do this it gets underlined in yellow and the setHealth part gets crossed out.
     
  4. Offline

    JeZPvP

    It isn't much of a big deal, just add the @SuppressedWarning it tells you to add when you hover over it
     
  5. Offline

    Tyguy20

    Thanks this worked!
     
Thread Status:
Not open for further replies.

Share This Page