From 33f110a246418100374cd00d8e4492d2439c44f0 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Fri, 13 Sep 2019 20:04:37 +1000 Subject: [PATCH] SPIGOT-5317: Create accessors for player absorption hearts By: md_5 --- .../main/java/org/bukkit/entity/Damageable.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/paper-api/src/main/java/org/bukkit/entity/Damageable.java b/paper-api/src/main/java/org/bukkit/entity/Damageable.java index b0fe044234..bc4463b467 100644 --- a/paper-api/src/main/java/org/bukkit/entity/Damageable.java +++ b/paper-api/src/main/java/org/bukkit/entity/Damageable.java @@ -40,6 +40,22 @@ public interface Damageable extends Entity { */ void setHealth(double health); + /** + * Sets the entity's absorption amount. + * + * @return absorption amount from 0 + */ + double getAbsorptionAmount(); + + /** + * Sets the entity's absorption amount. + * + * @param amount new absorption amount from 0 + * @throws IllegalArgumentException thrown if health is {@literal < 0} or + * non-finite. + */ + void setAbsorptionAmount(double amount); + /** * Gets the maximum health this entity has. *