public class HealthBottle extends AItem
The type Health bottle.

A class representing health bottles.

  • Constructor Details

    • HealthBottle

      public HealthBottle(int id, String name, double health)
      Instantiates a new Health bottle.
      Parameters:
      id - the id
      name - the name
      health - the health
  • Method Details

    • use

      public void use(Player player)
      Use.

      A method that allows a character to use a bottle.

      Parameters:
      player - The player who uses the bottle.
    • getHealth

      public double getHealth()
      The health.
      Returns:
      The amount of health that the bottle restores.