Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
Ocelot.java
1 
2 package org.bukkit.entity;
3 
4 /**
5  * A wild tameable cat
6  */
7 public interface Ocelot extends Animals, Tameable {
8 
9  /**
10  * Gets the current type of this cat.
11  *
12  * @return Type of the cat.
13  */
14  public Type getCatType();
15 
16  /**
17  * Sets the current type of this cat.
18  *
19  * @param type New type of this cat.
20  */
21  public void setCatType(Type type);
22 
23  /**
24  * Checks if this ocelot is sitting
25  *
26  * @return true if sitting
27  */
28  public boolean isSitting();
29 
30  /**
31  * Sets if this ocelot is sitting. Will remove any path that the ocelot
32  * was following beforehand.
33  *
34  * @param sitting true if sitting
35  */
36  public void setSitting(boolean sitting);
37 
38  /**
39  * Represents the various different cat types there are.
40  */
41  public enum Type {
42  WILD_OCELOT(0),
43  BLACK_CAT(1),
44  RED_CAT(2),
45  SIAMESE_CAT(3);
46 
47  private static final Type[] types = new Type[Type.values().length];
48  private final int id;
49 
50  static {
51  for (Type type : values()) {
52  types[type.getId()] = type;
53  }
54  }
55 
56  private Type(int id) {
57  this.id = id;
58  }
59 
60  /**
61  * Gets the ID of this cat type.
62  *
63  * @return Type ID.
64  * @deprecated Magic value
65  */
66  @Deprecated
67  public int getId() {
68  return id;
69  }
70 
71  /**
72  * Gets a cat type by its ID.
73  *
74  * @param id ID of the cat type to get.
75  * @return Resulting type, or null if not found.
76  * @deprecated Magic value
77  */
78  @Deprecated
79  public static Type getType(int id) {
80  return (id >= types.length) ? null : types[id];
81  }
82  }
83 }
void setSitting(boolean sitting)
void setCatType(Type type)
static Type getType(int id)
Definition: Ocelot.java:79