package com.lenis0012.bukkit.npc;

import org.bukkit.Location;
import org.bukkit.craftbukkit.v1_7_R3.entity.CraftPlayer;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;

/**
 * Class that contains all api functions from npc's in NPCFactory
 * 
 * @author lenis0012
 */
public interface NPC {
	
	/**
	 * Get an org.bukkit.entity.Player instance from the npc.
	 * 
	 * @return NPC's player instance.
	 */
	public Player getBukkitEntity();
	
	/**
	 * Check whether or not an npc can get damaged
	 * 
	 * @return NPC can be damaged?
	 */
	public boolean isInvulnerable();
	
	/**
	 * Set whether or not an npc can get damaged
	 * 
	 * @param invulnerable NPC can be damaged?
	 */
	public void setInvulnerable(boolean invulnerable);
	
	/**
	 * Check whether or not an npc has gravity enabled.
	 * 
	 * @return NPC had gravity?
	 */
	public boolean isGravity();
	
	/**
	 * Set whether or not an npc has gravity enabled.
	 * 
	 * @param gravity NPC has gravity?
	 */
	public void setGravity(boolean gravity);

    /**
     * Sets the player lying down or standing up.
     * Proper use of NPCAnimation.LEAVE_BED;
     * @param x the body's x co-ordinate
     * (Set to null to make entity stand up)
     * @param y the body's y co-ordinate
     * (Set to null to make entity stand up)
     * @param z the body's z co-ordinate
     * (Set to null to make entity stand up)
     *
     * Will only make NPC stand up if all
     * 3 co-ordinates are set to null and
     * NPC is lying down.
     */

    public void setLying(double x, double y, double z);

    /**
     * Checks whether the entity is lying down
     * @return Boolean value of whether the entity is lying down
     */

    public boolean isLying();

	
	/**
	 * Walk to a location
	 * 
	 * @param location Location to walk to
	 * @return True if path created and applied correctly.
	 */
	public boolean pathfindTo(Location location);
	
	/**
	 * Walk to a location with custom speed
	 * 
	 * @param location Location to walk to
	 * @param speed Speed to walk with (max 1.0, 0.2 default)
	 * @return True if path created and applied correctly.
	 */
	public boolean pathfindTo(Location location, double speed);
	
	/**
	 * Walk to a location with custom speed and range.
	 * 
	 * @param location Location to walk to
	 * @param speed Speed to walk with (max 1.0, 0.2 default)
	 * @param range Block radius limit for path finding (30 default)
	 * @return True if path created and applied correctly.
	 */
	public boolean pathfindTo(Location location, double speed, double range);
	
	/**
	 * Make NPC look at an entity.
	 * 
	 * @param target Entity to look at
	 */
	public void setTarget(Entity target);
	
	/**
	 * Get the entity the npc is looking at
	 * 
	 * @return Entity npc is looking at (null if not found)
	 */
	public Entity getTarget();
	
	/**
	 * Make npc look at a certain location
	 * 
	 * @param location Location to look at
	 */
	public void lookAt(Location location);
	
	/**
	 * Change npc's yaw the proper way
	 * 
	 * @param yaw New npc yaw
	 */
	public void setYaw(float yaw);
	
	/**
	 * Play an animation on the npc
	 * 
	 * @param animation Animation type to display
	 */
	public void playAnimation(NPCAnimation animation);
	
	/**
	 * Set npc equipment.
	 * 
	 * @param slot Slot type for the equipment
	 * @param item Item to put on slot
	 */
	public void setEquipment(EquipmentSlot slot, ItemStack item);
	
		/**
	 * Get if an npc with collide with other entities.
	 * 
	 * @param location Get entity collision for npc.
	 * @return
	 */
	public boolean getEntityCollision();
	
	/**
	 * Set if an npc with collide with other entities.
	 * 
	 * @param location Set entity collision for npc.
	 * @return
	 */
	public void setEntityCollision(boolean entityCollision);
	
}

@@ -1051,29 +1051,24 @@
 avity);%0A
-%0A    /**%0A    
+%09%0A%09/**%0A%09
  * Sets 
@@ -1105,20 +1105,17 @@
 ing up.%0A
-    
+%09
  * Prope
@@ -1147,20 +1147,17 @@
 VE_BED;%0A
-    
+%09
  * @para
@@ -1182,32 +1182,34 @@
 o-ordinate%0A     
+%09 
 * (Set to null t
@@ -1224,36 +1224,33 @@
 ntity stand up)%0A
-    
+%09
  * @param y the 
@@ -1262,36 +1262,33 @@
 s y co-ordinate%0A
-    
+%09
  * (Set to null 
@@ -1317,16 +1317,18 @@
 p)%0A     
+%09 
 * @param
@@ -1360,16 +1360,18 @@
 te%0A     
+%09 
 * (Set t
@@ -1406,20 +1406,17 @@
 up)%0A
-    
+%09
  *%0A     
 * Wi
@@ -1411,16 +1411,19 @@
  *%0A     
+ %09 
 * Will o
@@ -1456,16 +1456,18 @@
 ll%0A     
+%09 
 * 3 co-o
@@ -1500,16 +1500,18 @@
 nd%0A     
+%09 
 * NPC is
@@ -1524,32 +1524,34 @@
  down.%0A     
+%09 
 */%0A%0A    
 public void 
@@ -1534,24 +1534,25 @@
   %09 */%0A%0A    
+%09
 public void 
@@ -1596,16 +1596,17 @@
 );%0A%0A    
+%09
 /**%0A    
@@ -1606,16 +1606,17 @@
 **%0A     
+%09
 * Checks
@@ -1649,21 +1649,17 @@
 ng down%0A
-     
+%09
 * @retur
@@ -1715,24 +1715,25 @@
 wn%0A     
+%09
 */%0A%0A    
 public b
@@ -1724,16 +1724,17 @@
 */%0A%0A    
+%09
 public b
@@ -1752,18 +1752,16 @@
 ing();%0A%0A
-%09%0A
 %09/**%0A%09 *

Fix indentation