From d7f9c1a86ac2b22775b7b4fbcfe14d8498657dc5 Mon Sep 17 00:00:00 2001 From: Doc Date: Wed, 18 Dec 2024 07:29:55 +1100 Subject: [PATCH] #1086: Add Creaking methods --- src/main/java/org/bukkit/entity/Creaking.java | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/src/main/java/org/bukkit/entity/Creaking.java b/src/main/java/org/bukkit/entity/Creaking.java index 6a7c952b..e2cde86e 100644 --- a/src/main/java/org/bukkit/entity/Creaking.java +++ b/src/main/java/org/bukkit/entity/Creaking.java @@ -1,6 +1,8 @@ package org.bukkit.entity; +import org.bukkit.Location; import org.jetbrains.annotations.ApiStatus; +import org.jetbrains.annotations.NotNull; /** * Represents a Creaking. @@ -8,4 +10,38 @@ import org.jetbrains.annotations.ApiStatus; @ApiStatus.Experimental public interface Creaking extends Monster { + /** + * Gets the home location for this Creaking (ie where its corresponding + * {@link org.bukkit.block.CreakingHeart} can be). + * + * @return the location of the home. + */ + @NotNull + public Location getHome(); + + /** + * Sets the home location for this Creaking. + * + * @param location the location of the home. + */ + public void setHome(@NotNull Location location); + + /** + * Activate this Creaking to target and follow a player. + * + * @param player the target. + */ + public void activate(@NotNull Player player); + + /** + * Deactivate this Creaking from the current target player. + */ + public void deactivate(); + + /** + * Gets if this Creaking is active. + * + * @return true if is active. + */ + public boolean isActive(); }