Package me.gamercoder215.mobchip.combat
Interface EntityCombatTracker
public interface EntityCombatTracker
Represents an Entity's Combat Tracker
-
Method Summary
Modifier and TypeMethodDescriptionint
Fetches how long this Mob has been in combat, in ticksCreates an immutable list of the CombatEntries of this CombatTracker.Fetches the current death message of the Entity according togetLatestEntry()
.Fetches the latest CombatEntry of this CombatTracker.boolean
Whether this Mob had its last damage cancelled.boolean
Whether this Mob is currently in combat.boolean
Whether this Mob is currently taking damage.void
recordEntry
(@NotNull CombatEntry entry) Adds a CombatEntry togetCombatEntries()
.
-
Method Details
-
getCurrentDeathMessage
Fetches the current death message of the Entity according togetLatestEntry()
.- Returns:
- Death message of the Entity
-
getLatestEntry
Fetches the latest CombatEntry of this CombatTracker.- Returns:
- Latest CombatEntry of this CombatTracker
-
getCombatEntries
Creates an immutable list of the CombatEntries of this CombatTracker.- Returns:
- All CombatEntries for this CombatTracker
-
recordEntry
Adds a CombatEntry togetCombatEntries()
.- Parameters:
entry
- CombatEntry to add
-
getCombatDuration
int getCombatDuration()Fetches how long this Mob has been in combat, in ticks- Returns:
- Combat Duration in ticks
-
isTakingDamage
boolean isTakingDamage()Whether this Mob is currently taking damage.- Returns:
- true if taking damage, else false
-
isInCombat
boolean isInCombat()Whether this Mob is currently in combat.- Returns:
- true if in combat, else false
-
hasLastDamageCancelled
boolean hasLastDamageCancelled()Whether this Mob had its last damage cancelled.- Returns:
- true if last damage was cancelled, else false
-