Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Add 1.8 LivingEntities.
Browse files Browse the repository at this point in the history
  • Loading branch information
gabizou committed Nov 10, 2014
1 parent 162c1c3 commit c750a7e
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/main/java/org/bukkit/entity/Endermite.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package org.bukkit.entity;

/**
* Represents a Endermite.
*/
public interface Endermite extends Monster {

/**
* Represents the lifetime in ticks of the Endermite. Should disappear after 2400 ticks.
* @return the lifetime of the Endermite in ticks.
*/
public int getLifetime();
}
3 changes: 3 additions & 0 deletions src/main/java/org/bukkit/entity/EntityType.java
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ public enum EntityType {
WITHER("WitherBoss", Wither.class, 64),
BAT("Bat", Bat.class, 65),
WITCH("Witch", Witch.class, 66),
ENDERMITE("Endermite", Endermite.class, 67),
GUARDIAN("Guardian", Guardian.class, 68),
PIG("Pig", Pig.class, 90),
SHEEP("Sheep", Sheep.class, 91),
COW("Cow", Cow.class, 92),
Expand All @@ -141,6 +143,7 @@ public enum EntityType {
OCELOT("Ozelot", Ocelot.class, 98),
IRON_GOLEM("VillagerGolem", IronGolem.class, 99),
HORSE("EntityHorse", Horse.class, 100),
RABBIT("Rabbit", Rabbit.class, 101),
VILLAGER("Villager", Villager.class, 120),
ENDER_CRYSTAL("EnderCrystal", EnderCrystal.class, 200),
// These don't have an entity ID in nms.EntityTypes.
Expand Down
21 changes: 21 additions & 0 deletions src/main/java/org/bukkit/entity/Guardian.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package org.bukkit.entity;

/**
* Represents a Guardian.
*/
public interface Guardian extends Monster, WaterMob {

/**
*
*
* @return true if this guardian is an Elder
*/
public boolean isElder();

/**
* Sets the guardian to be an elder or not.
*
*/
public void setElder(boolean isElder);

}
39 changes: 39 additions & 0 deletions src/main/java/org/bukkit/entity/Rabbit.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
package org.bukkit.entity;

import java.util.HashMap;
import java.util.Map;

/**
* Represents a Rabbit.
*/
public interface Rabbit extends Animals
{

/**
* Gets the type of rabbit.
*
* @return The type of rabbit
*/
public RabbitType getRabbitType();

/**
* Sets the type of rabbit.
*
* @param type The type of rabbit
*/
public void setRabbitType(RabbitType type);

/*
* Represents the various different Rabbit types.
*/
public enum RabbitType
{
BROWN,
WHITE,
BLACK,
BLACK_AND_WHITE,
GOLD,
SALT_PEPPER,
KILLER
}
}

0 comments on commit c750a7e

Please sign in to comment.