Class ComboManager

java.lang.Object
stawa.vitalstrike.systems.ComboManager

public class ComboManager extends Object
Manages player combos, including tracking, decay, multipliers, and effects. Handles combo display and decay tasks.
  • Constructor Details

    • ComboManager

      public ComboManager(org.bukkit.plugin.java.JavaPlugin plugin, ConfigManager configManager, PlayerManager playerManager, PlayerStats playerStats, Logger logger)
      Creates a new ComboManager instance.
      Parameters:
      plugin - The plugin instance
      configManager - The configuration manager
      playerManager - The player manager
      playerStats - The player statistics manager
      logger - The logger to use for reporting combo status
  • Method Details

    • handlePlayerCombos

      public void handlePlayerCombos(org.bukkit.entity.Player player, org.bukkit.event.entity.EntityDamageEvent event, long currentTime)
      Handles combo logic when a player deals damage. Updates combo count, resets decay timer, applies multipliers, and triggers effects.
      Parameters:
      player - The player dealing damage
      event - The damage event
      currentTime - The current system time in milliseconds
    • getRankName

      public String getRankName(int combo)
      Gets the rank name for a given combo count.
      Parameters:
      combo - The combo count
      Returns:
      The rank name
    • cleanup

      public void cleanup(UUID playerId)
      Cleans up all resources associated with a player. Removes holograms, cancels tasks, and clears combo data.
      Parameters:
      playerId - The UUID of the player to cleanup
    • resetPlayerCombo

      public void resetPlayerCombo(UUID playerId)
      Resets a player's combo counter
      Parameters:
      playerId - the UUID of the player