package com.trc202.CombatTagApi;

import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;

import com.trc202.CombatTag.CombatTag;

public class CombatTagApi {
	
	private CombatTag plugin;
	
	public CombatTagApi(CombatTag plugin){
		this.plugin = plugin;
	}

	/**
	 * Checks to see if the player is in combat. The combat time can be configured by the server owner
	 * If the player has died while in combat the player is no longer considered in combat and as such will return false
	 * @param playerName
	 * @return true if player is in combat
	 */
	public boolean isInCombat(String name){
		return plugin.isInCombat(name);
	}
	
	/**
	 * Returns the time before the tag is over
	 *  -1 if the tag has expired
	 *  -2 if the player is not in combat
	 * @param name
	 */
	public long getRemainingTagTime(String name){
		if(plugin.isInCombat(name)){
			return plugin.getRemainingTagTime(name);
		}else{
			return -1L;
		}
	}
	
	/**
	 * Returns if the entity is an NPC
	 * @param player
	 * @return true if the player is an NPC
	 */
	public boolean isNPC(Entity player){
		if(plugin.npcm.isNPC(player)){return true;}
		return false;
	}
	
	/**
	 * Tags player
	 * @param player
	 * @return true if the action is successful, false if not
	 */
	public boolean tagPlayer(Player player){
		return plugin.addTagged(player);
	}
	
	
	/**
	 * Untags player
	 * @param player
	 * @return nothing
	 */
	public void untagPlayer(Player player){
		plugin.removeTagged(player.getName());
	}
}

@@ -1011,38 +1011,38 @@
 NPC%0D%0A%09 * @param 
-player
+entity
 %0D%0A%09 * @return tr
@@ -1104,22 +1104,22 @@
 (Entity 
-player
+entity
 )%7B%0D%0A%09%09if
@@ -1137,22 +1137,22 @@
 m.isNPC(
-player
+entity
 ))%7Bretur

Change variable name in API to prevent misunderstanding