Class AggressionEvent

java.lang.Object
net.minecraftforge.eventbus.api.Event
com.pixelmonmod.pixelmon.api.events.AggressionEvent

public class AggressionEvent extends net.minecraftforge.eventbus.api.Event
Event fired when a wild Pokémon attempts to attack a player.

Cancelling this event will prevent the Pokémon from challenging the player.

Since:
December 28, 2017
  • Nested Class Summary

    Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event

    net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final net.minecraft.world.entity.Mob
    The entity that is challenging the player.
    final net.minecraft.server.level.ServerPlayer
    The player being challenged.
  • Constructor Summary

    Constructors
    Constructor
    Description
    AggressionEvent(net.minecraft.world.entity.Mob aggressor, net.minecraft.server.level.ServerPlayer player)
     
  • Method Summary

    Methods inherited from class net.minecraftforge.eventbus.api.Event

    getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • aggressor

      public final net.minecraft.world.entity.Mob aggressor
      The entity that is challenging the player. Normally PixelmonEntity or NPCTrainer
    • player

      public final net.minecraft.server.level.ServerPlayer player
      The player being challenged.
  • Constructor Details

    • AggressionEvent

      public AggressionEvent(net.minecraft.world.entity.Mob aggressor, net.minecraft.server.level.ServerPlayer player)