diff options
author | md_5 <git@md-5.net> | 2018-12-13 14:10:26 +1100 |
---|---|---|
committer | md_5 <git@md-5.net> | 2018-12-13 14:10:26 +1100 |
commit | b850a822c1cd79cc5b8e9181b4b9e6b61977e0ec (patch) | |
tree | 205277ce1beb80dbb34eae3e8bbc77c478dee2fb /src/main/java/org/bukkit/entity/Zombie.java | |
parent | 72520b78bb45ad6e931843c128baaf2cd4017109 (diff) | |
download | bukkit-b850a822c1cd79cc5b8e9181b4b9e6b61977e0ec.tar bukkit-b850a822c1cd79cc5b8e9181b4b9e6b61977e0ec.tar.gz bukkit-b850a822c1cd79cc5b8e9181b4b9e6b61977e0ec.tar.lz bukkit-b850a822c1cd79cc5b8e9181b4b9e6b61977e0ec.tar.xz bukkit-b850a822c1cd79cc5b8e9181b4b9e6b61977e0ec.zip |
SPIGOT-4526: Add conversion time API for Zombie & subclasses
Diffstat (limited to 'src/main/java/org/bukkit/entity/Zombie.java')
-rw-r--r-- | src/main/java/org/bukkit/entity/Zombie.java | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/entity/Zombie.java b/src/main/java/org/bukkit/entity/Zombie.java index cf53ea22..bdc6206a 100644 --- a/src/main/java/org/bukkit/entity/Zombie.java +++ b/src/main/java/org/bukkit/entity/Zombie.java @@ -48,4 +48,35 @@ public interface Zombie extends Monster { */ @Deprecated public Villager.Profession getVillagerProfession(); + + /** + * Get if this entity is in the process of converting to a Drowned as a + * result of being underwater. + * + * @return conversion status + */ + boolean isConverting(); + + /** + * Gets the amount of ticks until this entity will be converted to a Drowned + * as a result of being underwater. + * + * When this reaches 0, the entity will be converted. + * + * @return conversion time + * @throws IllegalStateException if {@link #isConverting()} is false. + */ + int getConversionTime(); + + /** + * Sets the amount of ticks until this entity will be converted to a Drowned + * as a result of being underwater. + * + * When this reaches 0, the entity will be converted. A value of less than 0 + * will stop the current conversion process without converting the current + * entity. + * + * @param time new conversion time + */ + void setConversionTime(int time); } |