AnimalTamer and Tameable interfaces, and corresponding features.

Documentation improvements.

By: Andrew Ardill <andrew.ardill@gmail.com>
This commit is contained in:
Bukkit/Spigot
2011-05-03 00:36:02 +10:00
parent be1e3989c3
commit b9681b5415
4 changed files with 48 additions and 30 deletions

View File

@@ -4,7 +4,7 @@ package org.bukkit.entity;
/**
* Represents a Wolf
*/
public interface Wolf extends Animals {
public interface Wolf extends Animals, Tameable {
/**
* Checks if this wolf is angry
*
@@ -14,6 +14,7 @@ public interface Wolf extends Animals {
/**
* Sets the anger of this wolf
* An angry wolf can not be fed or tamed, and will actively look for targets to attack.
*
* @param angry true if angry
*/
@@ -28,37 +29,10 @@ public interface Wolf extends Animals {
/**
* Sets if this wolf is sitting
* Will remove any path that the wolf was following beforehand.
*
* @param sitting true if sitting
*/
public void setSitting(boolean sitting);
/**
* Check if this wolf is tame
*
* @return true if tame
*/
public boolean isTame();
/**
* Sets if wolf is tame
*
* @param tame true if tame
*/
public void setTame(boolean tame);
/**
* Gets the name of the current owning player
*
* @return owners name, "" or null if unowned
*/
public String getOwner();
/**
* Set the wolf to be owned by given player (also is tamed)
*
* @param player name of owner, or null/"" if setting to unowned
*/
public void setOwner(String player);
}