From b99f20b1b47fc8ea30a4319bfce5b83680e07f9c Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Mon, 23 Dec 2019 12:34:30 +1100 Subject: [PATCH] SPIGOT-5413: Add TrustedPlayer API for foxes By: md_5 --- .../src/main/java/org/bukkit/entity/Fox.java | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/paper-api/src/main/java/org/bukkit/entity/Fox.java b/paper-api/src/main/java/org/bukkit/entity/Fox.java index 89f65032d2..498e182846 100644 --- a/paper-api/src/main/java/org/bukkit/entity/Fox.java +++ b/paper-api/src/main/java/org/bukkit/entity/Fox.java @@ -1,6 +1,7 @@ package org.bukkit.entity; import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; /** * What does the fox say? @@ -43,6 +44,40 @@ public interface Fox extends Animals, Sittable { */ void setSleeping(boolean sleeping); + /** + * Gets the first trusted player. + * + * @return the owning AnimalTamer, or null if not owned + */ + @Nullable + public AnimalTamer getFirstTrustedPlayer(); + + /** + * Set the first trusted player. + *

+ * The first trusted player may only be removed after the second. + * + * @param player the AnimalTamer to be trusted + */ + public void setFirstTrustedPlayer(@Nullable AnimalTamer player); + + /** + * Gets the second trusted player. + * + * @return the owning AnimalTamer, or null if not owned + */ + @Nullable + public AnimalTamer getSecondTrustedPlayer(); + + /** + * Set the second trusted player. + *

+ * The second trusted player may only be added after the first. + * + * @param player the AnimalTamer to be trusted + */ + public void setSecondTrustedPlayer(@Nullable AnimalTamer player); + /** * Represents the various different fox types there are. */