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 class
Event fired when a regular (non-raid) capture attempt fails to succeed.static class
Event fired when a raid capture attempt fails to succeed.static class
Event fired when a regular (non-raid) capture attempt is about to start.static class
Event fired when a raid capture attempt is about to start.static class
Event fired when a regular (non-raid) capture attempt is about to succeed, after passing all the required checks.static class
Event 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.ServerPlayer
protected final PokeBall
protected final PokeBallEntity
protected Pokemon
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
CaptureEvent
(net.minecraft.server.level.ServerPlayer player, Pokemon pokemon, PokeBall ball) protected
CaptureEvent
(net.minecraft.server.level.ServerPlayer player, Pokemon pokemon, PokeBallEntity pokeBall) -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.server.level.ServerPlayer
TheServerPlayer
performing this capture attempt.ThePokeBallEntity
being used in this capture attempt.ThePixelmonEntity
being caught.void
setPokemon
(Pokemon pokemon) Replaces the ThePixelmonEntity
being 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()TheServerPlayer
performing this capture attempt.- Returns:
- The
ServerPlayer
performing this capture attempt.
-
getPokemon
ThePixelmonEntity
being caught.- Returns:
- The
PixelmonEntity
being caught.
-
getPokeBallEntity
ThePokeBallEntity
being used in this capture attempt.- Returns:
- The
PokeBallEntity
being used in this capture attempt.
-
getPokeBall
-
setPokemon
Replaces the ThePixelmonEntity
being caught.- Parameters:
pokemon
- The newPixelmonEntity
being caught.
-