Class AggressionEvent
java.lang.Object
net.neoforged.bus.api.Event
com.pixelmonmod.pixelmon.api.events.AggressionEvent
- All Implemented Interfaces:
net.neoforged.bus.api.ICancellableEvent
public class AggressionEvent
extends net.neoforged.bus.api.Event
implements net.neoforged.bus.api.ICancellableEvent
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
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAggressionEvent
(net.minecraft.world.entity.Mob aggressor, net.minecraft.server.level.ServerPlayer player) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.neoforged.bus.api.ICancellableEvent
isCanceled, setCanceled
-
Field Details
-
aggressor
public final net.minecraft.world.entity.Mob aggressorThe entity that is challenging the player. NormallyPixelmonEntity
orinvalid reference
com.pixelmonmod.pixelmon.entities.npcs.NPCTrainer
-
player
public final net.minecraft.server.level.ServerPlayer playerThe player being challenged.
-
-
Constructor Details
-
AggressionEvent
public AggressionEvent(net.minecraft.world.entity.Mob aggressor, net.minecraft.server.level.ServerPlayer player)
-