Class Combat
java.lang.Object
studio.magemonkey.fabled.api.util.Combat
Helper method for checking whether an entity is in combat
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidapplyCombat(org.bukkit.entity.Player player) Updates the combat status of the playerstatic voidclearData(org.bukkit.entity.Player player) Clears the combat timer data for the given playerstatic booleanisInCombat(org.bukkit.entity.Player player, double seconds) Checks whether the player is in combat or notstatic booleanisOutOfCombat(org.bukkit.entity.Player player, double seconds) Checks whether the player is out of combat or not
-
Constructor Details
-
Combat
public Combat()
-
-
Method Details
-
applyCombat
public static void applyCombat(org.bukkit.entity.Player player) Updates the combat status of the player- Parameters:
player- player to mark as starting combat
-
clearData
public static void clearData(org.bukkit.entity.Player player) Clears the combat timer data for the given player- Parameters:
player- player to clear for
-
isInCombat
public static boolean isInCombat(org.bukkit.entity.Player player, double seconds) Checks whether the player is in combat or not- Parameters:
player- player to check forseconds- seconds before being counted as in combat- Returns:
- true if in combat, false otherwise
-
isOutOfCombat
public static boolean isOutOfCombat(org.bukkit.entity.Player player, double seconds) Checks whether the player is out of combat or not- Parameters:
player- player to check forseconds- seconds before being counted as out of combat- Returns:
- true if out of combat, false otherwise
-