001 package org.bukkit.entity; 002 003 public interface Tameable { 004 005 /** 006 * Check if this is tamed 007 * <p> 008 * If something is tamed then a player can not tame it through normal 009 * methods, even if it does not belong to anyone in particular. 010 * 011 * @return true if this has been tamed 012 */ 013 public boolean isTamed(); 014 015 /** 016 * Sets if this has been tamed. Not necessary if the method setOwner has 017 * been used, as it tames automatically. 018 * <p> 019 * If something is tamed then a player can not tame it through normal 020 * methods, even if it does not belong to anyone in particular. 021 * 022 * @param tame true if tame 023 */ 024 public void setTamed(boolean tame); 025 026 /** 027 * Gets the current owning AnimalTamer 028 * 029 * @return the owning AnimalTamer, or null if not owned 030 */ 031 public AnimalTamer getOwner(); 032 033 /** 034 * Set this to be owned by given AnimalTamer. 035 * <p> 036 * If the owner is not null, this will be tamed and will have any current 037 * path it is following removed. If the owner is set to null, this will be 038 * untamed, and the current owner removed. 039 * 040 * @param tamer the AnimalTamer who should own this 041 */ 042 public void setOwner(AnimalTamer tamer); 043 044 }