Klasse AbilityService

java.lang.Object
de.delinkedde.mobarenareborn.ability.AbilityService

public final class AbilityService extends Object
Resolves and executes a player's active class ability.

An input is handled only when the player is in an arena, has chosen a class, and the input key matches that class's ability-key. A per-player, per-ability cooldown is enforced. Abilities are implemented with the public Bukkit API (potion effects, velocity, projectiles, direct damage) and the ThreatService for taunts.

  • Konstruktordetails

    • AbilityService

      public AbilityService(@NotNull @NotNull SessionManager sessions, @NotNull @NotNull ClassRegistry classRegistry, @NotNull @NotNull ThreatService threat, @NotNull @NotNull ProgressionService progression, @NotNull @NotNull MobScaler scaler)
      Parameter:
      sessions - the session manager
      classRegistry - the class registry
      threat - the threat service, used by taunt
      progression - the progression service, used to resolve ability unlock levels
      scaler - the mob scaler, providing the arena-mob marker key
  • Methodendetails

    • trigger

      public boolean trigger(@NotNull @NotNull Player caster, @NotNull @NotNull String keyToken)
      Attempts to trigger the caster's ability for the given input key.
      Parameter:
      caster - the player
      keyToken - the input key token (for example F)
      Gibt zurück:
      true if the input matched the caster's ability key (so the underlying input should be consumed), even if the ability was on cooldown