Package stawa.vitalstrike.systems
Class DamageIndicatorManager
java.lang.Object
stawa.vitalstrike.systems.DamageIndicatorManager
Manages the display and behavior of damage indicators. Handles indicator spawning, merging,
animation, and rewards.
-
Constructor Summary
ConstructorsConstructorDescriptionDamageIndicatorManager(VitalStrike plugin, ConfigManager configManager, PlayerManager playerManager, PermissionManager permissionManager) Creates a new DamageIndicatorManager instance. -
Method Summary
Modifier and TypeMethodDescriptionvoiddisplayDamage(org.bukkit.entity.Entity victim, org.bukkit.entity.Entity attacker, double damage, String damageFormat) Displays a damage indicator with a specific value and format.voiddisplayDamageIndicator(org.bukkit.entity.Entity entity, org.bukkit.event.entity.EntityDamageEvent event) Displays a damage indicator for an entity based on the event.voidReloads the damage indicator settings from the configuration.booleanshouldShowDamageIndicator(org.bukkit.entity.Entity entity) Checks if a damage indicator should be shown for the given entity.
-
Constructor Details
-
DamageIndicatorManager
public DamageIndicatorManager(VitalStrike plugin, ConfigManager configManager, PlayerManager playerManager, PermissionManager permissionManager) Creates a new DamageIndicatorManager instance.- Parameters:
plugin- The plugin instanceconfigManager- The configuration managerplayerManager- The player managerpermissionManager- The permission manager
-
-
Method Details
-
reloadSettings
public void reloadSettings()Reloads the damage indicator settings from the configuration. -
displayDamageIndicator
public void displayDamageIndicator(org.bukkit.entity.Entity entity, org.bukkit.event.entity.EntityDamageEvent event) Displays a damage indicator for an entity based on the event.- Parameters:
entity- The entity taking damageevent- The damage event
-
displayDamage
public void displayDamage(org.bukkit.entity.Entity victim, org.bukkit.entity.Entity attacker, double damage, String damageFormat) Displays a damage indicator with a specific value and format. Handles merging if enabled.- Parameters:
victim- The entity taking damageattacker- The entity dealing damage (can be null)damage- The amount of damagedamageFormat- The format string for the indicator
-
shouldShowDamageIndicator
public boolean shouldShowDamageIndicator(org.bukkit.entity.Entity entity) Checks if a damage indicator should be shown for the given entity.- Parameters:
entity- The entity to check- Returns:
- true if an indicator should be shown, false otherwise
-