Turtle API

This commit is contained in:
BillyGalbreath
2018-09-28 17:08:09 -05:00
parent 3ad277b100
commit 342e189485
4 changed files with 249 additions and 0 deletions

View File

@@ -1,5 +1,8 @@
package org.bukkit.entity;
import org.bukkit.Location;
import org.jetbrains.annotations.NotNull;
/**
* Represents a turtle.
*/
@@ -18,4 +21,42 @@ public interface Turtle extends Animals {
* @return Whether the turtle is laying an egg
*/
boolean isLayingEgg();
// Paper start
/**
* Get the turtle's home location
*
* @return Home location
*/
@NotNull
Location getHome();
/**
* Set the turtle's home location
*
* @param location Home location
*/
void setHome(@NotNull Location location);
/**
* Check if turtle is currently pathfinding to it's home
*
* @return True if going home
*/
boolean isGoingHome();
/**
* Get if turtle is digging to lay eggs
*
* @return True if digging
*/
boolean isDigging();
/**
* Set if turtle is carrying egg
*
* @param hasEgg True if carrying egg
*/
void setHasEgg(boolean hasEgg);
// Paper end
}