From 0eec8c8041363b7553f0dcaa7d8ca5956f7fd235 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Sat, 1 Sep 2018 19:27:49 +1000 Subject: [PATCH] SPIGOT-4338: breedCause API By: md_5 --- .../main/java/org/bukkit/entity/Animals.java | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/paper-api/src/main/java/org/bukkit/entity/Animals.java b/paper-api/src/main/java/org/bukkit/entity/Animals.java index f0dc157dc3..6e214bf487 100644 --- a/paper-api/src/main/java/org/bukkit/entity/Animals.java +++ b/paper-api/src/main/java/org/bukkit/entity/Animals.java @@ -1,6 +1,25 @@ package org.bukkit.entity; +import java.util.UUID; + /** * Represents an Animal. */ -public interface Animals extends Ageable {} +public interface Animals extends Ageable { + + /** + * Get the UUID of the entity that caused this entity to enter the + * {@link #canBreed()} state. + * + * @return uuid if set, or null + */ + UUID getBreedCause(); + + /** + * Set the UUID of the entity that caused this entity to enter the + * {@link #canBreed()} state. + * + * @param uuid new uuid, or null + */ + void setBreedCause(UUID uuid); +}