Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
Ageable.java
1 package org.bukkit.entity;
2 
3 /**
4  * Represents an entity that can age and breed.
5  */
6 public interface Ageable extends Creature {
7  /**
8  * Gets the age of this animal.
9  *
10  * @return Age
11  */
12  public int getAge();
13 
14  /**
15  * Sets the age of this animal.
16  *
17  * @param age New age
18  */
19  public void setAge(int age);
20 
21  /**
22  * Lock the age of the animal, setting this will prevent the animal from
23  * maturing or getting ready for mating.
24  *
25  * @param lock new lock
26  */
27  public void setAgeLock(boolean lock);
28 
29  /**
30  * Gets the current agelock.
31  *
32  * @return the current agelock
33  */
34  public boolean getAgeLock();
35 
36  /**
37  * Sets the age of the animal to a baby
38  */
39  public void setBaby();
40 
41  /**
42  * Sets the age of the animal to an adult
43  */
44  public void setAdult();
45 
46  /**
47  * Returns true if the animal is an adult.
48  *
49  * @return return true if the animal is an adult
50  */
51  public boolean isAdult();
52 
53  /**
54  * Return the ability to breed of the animal.
55  *
56  * @return the ability to breed of the animal
57  */
58  public boolean canBreed();
59 
60  /**
61  * Set breedability of the animal, if the animal is a baby and set to
62  * breed it will instantly grow up.
63  *
64  * @param breed breedability of the animal
65  */
66  public void setBreed(boolean breed);
67 }
void setBreed(boolean breed)
void setAgeLock(boolean lock)