Skip to content

Commit

Permalink
Add different villager types to dEntity.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidcernat committed Jun 30, 2013
1 parent 17fc814 commit b9ccf8f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/java/net/aufdemrand/denizen/objects/dEntity.java
Expand Up @@ -20,6 +20,7 @@
import org.bukkit.entity.Ocelot.Type;
import org.bukkit.entity.Player;
import org.bukkit.entity.Skeleton;
import org.bukkit.entity.Villager;
import org.bukkit.inventory.ItemStack;

import java.lang.reflect.InvocationTargetException;
Expand Down Expand Up @@ -299,13 +300,14 @@ public void spawnAt(Location location) {
try {

if (ent instanceof Ocelot) {

setSubtype(Ocelot.class, "Type", "setCatType", data);
}
else if (ent instanceof Skeleton) {

setSubtype(Skeleton.class, "SkeletonType", "setSkeletonType", data);
}
else if (ent instanceof Villager) {
setSubtype(Villager.class, "Profession", "setProfession", data);
}

} catch (IllegalArgumentException e) {
e.printStackTrace();
Expand Down

0 comments on commit b9ccf8f

Please sign in to comment.