#486: Add method to get player's attack cooldown

By: DiamondDagger590 <diamonddagger590@gmail.com>
This commit is contained in:
Bukkit/Spigot 2020-04-23 11:13:44 +10:00
parent ee3885052d
commit 711bd7b6f7

View File

@ -324,6 +324,16 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
*/
public int getExpToLevel();
/**
* Gets the current cooldown for a player's attack.
*
* This is used to calculate damage, with 1.0 representing a fully charged
* attack and 0.0 representing a non-charged attack
*
* @return A float between 0.0-1.0 representing the progress of the charge
*/
public float getAttackCooldown();
/**
* Discover a recipe for this player such that it has not already been
* discovered. This method will add the key's associated recipe to the