001 package org.bukkit.entity; 002 003 /** 004 * Represents an entity that can age and breed. 005 */ 006 public interface Ageable extends Creature { 007 /** 008 * Gets the age of this animal. 009 * 010 * @return Age 011 */ 012 public int getAge(); 013 014 /** 015 * Sets the age of this animal. 016 * 017 * @param age New age 018 */ 019 public void setAge(int age); 020 021 /** 022 * Lock the age of the animal, setting this will prevent the animal from 023 * maturing or getting ready for mating. 024 * 025 * @param lock new lock 026 */ 027 public void setAgeLock(boolean lock); 028 029 /** 030 * Gets the current agelock. 031 * 032 * @return the current agelock 033 */ 034 public boolean getAgeLock(); 035 036 /** 037 * Sets the age of the animal to a baby 038 */ 039 public void setBaby(); 040 041 /** 042 * Sets the age of the animal to an adult 043 */ 044 public void setAdult(); 045 046 /** 047 * Returns true if the animal is an adult. 048 * 049 * @return return true if the animal is an adult 050 */ 051 public boolean isAdult(); 052 053 /** 054 * Return the ability to breed of the animal. 055 * 056 * @return the ability to breed of the animal 057 */ 058 public boolean canBreed(); 059 060 /** 061 * Set breedability of the animal, if the animal is a baby and set to 062 * breed it will instantly grow up. 063 * 064 * @param breed breedability of the animal 065 */ 066 public void setBreed(boolean breed); 067 }