#1086: Add Creaking methods

This commit is contained in:
Doc 2024-12-18 07:29:55 +11:00 committed by md_5
parent 8c69edd891
commit d7f9c1a86a
No known key found for this signature in database
GPG key ID: E8E901AC7C617C11

View file

@ -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();
}