Class CaptureEvent
java.lang.Object
net.neoforged.bus.api.Event
com.pixelmonmod.pixelmon.api.events.CaptureEvent
- Direct Known Subclasses:
CaptureEvent.FailedCapture,CaptureEvent.StartCapture,CaptureEvent.SuccessfulCapture
public abstract class CaptureEvent
extends net.neoforged.bus.api.Event
Superclass for capture related events.
Subclasses:
CaptureEvent.StartCapture, CaptureEvent.StartRaidCapture, CaptureEvent.SuccessfulCapture, CaptureEvent.SuccessfulRaidCapture,
CaptureEvent.FailedCapture, CaptureEvent.FailedRaidCapture-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classEvent fired when a regular (non-raid) capture attempt fails to succeed.static classEvent fired when a raid capture attempt fails to succeed.static classEvent fired when a regular (non-raid) capture attempt is about to start.static classEvent fired when a raid capture attempt is about to start.static classEvent fired when a regular (non-raid) capture attempt is about to succeed, after passing all the required checks.static classEvent fired when a raid capture attempt is about to succeed, after passing all the required checks. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final net.minecraft.server.level.ServerPlayerprotected final PokeBallprotected final PokeBallEntityprotected Pokemon -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCaptureEvent(net.minecraft.server.level.ServerPlayer player, Pokemon pokemon, PokeBall ball) protectedCaptureEvent(net.minecraft.server.level.ServerPlayer player, Pokemon pokemon, PokeBallEntity pokeBall) -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.server.level.ServerPlayerTheServerPlayerperforming this capture attempt.ThePokeBallEntitybeing used in this capture attempt.ThePixelmonEntitybeing caught.voidsetPokemon(Pokemon pokemon) Replaces the ThePixelmonEntitybeing caught.
-
Field Details
-
player
protected final net.minecraft.server.level.ServerPlayer player -
pokemon
-
pokeBallEntity
-
pokeBall
-
-
Constructor Details
-
CaptureEvent
protected CaptureEvent(net.minecraft.server.level.ServerPlayer player, Pokemon pokemon, PokeBallEntity pokeBall) -
CaptureEvent
-
-
Method Details
-
getPlayer
public net.minecraft.server.level.ServerPlayer getPlayer()TheServerPlayerperforming this capture attempt.- Returns:
- The
ServerPlayerperforming this capture attempt.
-
getPokemon
ThePixelmonEntitybeing caught.- Returns:
- The
PixelmonEntitybeing caught.
-
getPokeBallEntity
ThePokeBallEntitybeing used in this capture attempt.- Returns:
- The
PokeBallEntitybeing used in this capture attempt.
-
getPokeBall
-
setPokemon
Replaces the ThePixelmonEntitybeing caught.- Parameters:
pokemon- The newPixelmonEntitybeing caught.
-