Interface EntityCombatTracker


public interface EntityCombatTracker
Represents an Entity's Combat Tracker
  • Method Details

    • getCurrentDeathMessage

      @NotNull @NotNull String getCurrentDeathMessage()
      Fetches the current death message of the Entity according to getLatestEntry().
      Returns:
      Death message of the Entity
    • getLatestEntry

      @Nullable @Nullable CombatEntry getLatestEntry()
      Fetches the latest CombatEntry of this CombatTracker.
      Returns:
      Latest CombatEntry of this CombatTracker
    • getCombatEntries

      @NotNull @NotNull List<CombatEntry> getCombatEntries()
      Creates an immutable list of the CombatEntries of this CombatTracker.
      Returns:
      All CombatEntries for this CombatTracker
    • recordEntry

      void recordEntry(@NotNull @NotNull CombatEntry entry)
      Adds a CombatEntry to getCombatEntries().
      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