Class AttackEvent

java.lang.Object
net.neoforged.bus.api.Event
com.pixelmonmod.pixelmon.api.events.battles.BattleEvent
com.pixelmonmod.pixelmon.api.events.battles.AttackEvent
Direct Known Subclasses:
AttackEvent.CriticalHit, AttackEvent.Damage, AttackEvent.DamageDealt, AttackEvent.Recoil, AttackEvent.Stab, AttackEvent.TypeEffectiveness, AttackEvent.Use

public abstract class AttackEvent extends BattleEvent
Collection of events fired relating to Pokémon moves in battle.

Subclasses: AttackEvent.Use, AttackEvent.CriticalHit, AttackEvent.Stab, AttackEvent.Damage, AttackEvent.TypeEffectiveness.

Since:
June 18, 2019
  • Field Details

    • user

      public final PixelmonWrapper user
      The user of the attack.
    • target

      public final PixelmonWrapper target
      The target of the attack. This might be the same as the user.
  • Constructor Details

  • Method Details

    • getAttack

      public Attack getAttack()
      The attack being used. This is just a shortcut to user.attack.
    • isSelf

      public boolean isSelf()
      Whether or not the user is the target.