Class CaptureEvent
java.lang.Object
net.minecraftforge.eventbus.api.Event
com.pixelmonmod.pixelmon.api.events.CaptureEvent
- Direct Known Subclasses:
CaptureEvent.FailedCapture,CaptureEvent.FailedRaidCapture,CaptureEvent.StartCapture,CaptureEvent.StartRaidCapture,CaptureEvent.SuccessfulCapture,CaptureEvent.SuccessfulRaidCapture
public abstract class CaptureEvent
extends net.minecraftforge.eventbus.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.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
FieldsModifier and TypeFieldDescriptionprotected final net.minecraft.server.level.ServerPlayerprotected final PokeBallEntityprotected PixelmonEntity -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.server.level.ServerPlayerTheServerPlayerperforming this capture attempt.ThePokeBallEntitybeing used in this capture attempt.ThePixelmonEntitybeing caught.voidsetPokemon(PixelmonEntity pokemon) Replaces the ThePixelmonEntitybeing caught.Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
Field Details
-
player
protected final net.minecraft.server.level.ServerPlayer player -
pokemon
-
pokeBall
-
-
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.
-
getPokeBall
ThePokeBallEntitybeing used in this capture attempt.- Returns:
- The
PokeBallEntitybeing used in this capture attempt.
-
setPokemon
Replaces the ThePixelmonEntitybeing caught.- Parameters:
pokemon- The newPixelmonEntitybeing caught.
-