Skip to content

Commit

Permalink
Add setBukkitEntityType(EntityType) to NPC. Fixes CITIZENS-527
Browse files Browse the repository at this point in the history
  • Loading branch information
fullwall committed Apr 12, 2013
1 parent 7adf700 commit 63c8b1d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/main/java/net/citizensnpcs/api/npc/NPC.java
Expand Up @@ -10,6 +10,7 @@
import net.citizensnpcs.api.util.DataKey;

import org.bukkit.Location;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.LivingEntity;

/**
Expand Down Expand Up @@ -168,6 +169,19 @@ public interface NPC extends Agent {
*/
public void save(DataKey key);

/**
* Sets the {@link EntityType} of this NPC. Currently only accepts
* <em>living</em> entity types, with scope for additional types in the
* future. The NPC will respawned if currently spawned, or will remain
* despawned otherwise.
*
* @param type
* The new mob type
* @throws IllegalArgumentException
* If the type is not a living entity type
*/
public void setBukkitEntityType(EntityType type);

/**
* Sets the name of this NPC.
*
Expand Down

0 comments on commit 63c8b1d

Please sign in to comment.