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
  • Field Details

    • player

      protected final net.minecraft.server.level.ServerPlayer player
    • pokemon

      protected Pokemon pokemon
    • pokeBallEntity

      protected final PokeBallEntity pokeBallEntity
    • pokeBall

      protected final PokeBall pokeBall
  • Constructor Details

    • CaptureEvent

      protected CaptureEvent(net.minecraft.server.level.ServerPlayer player, Pokemon pokemon, PokeBallEntity pokeBall)
    • CaptureEvent

      protected CaptureEvent(net.minecraft.server.level.ServerPlayer player, Pokemon pokemon, PokeBall ball)
  • Method Details

    • getPlayer

      public net.minecraft.server.level.ServerPlayer getPlayer()
      The ServerPlayer performing this capture attempt.
      Returns:
      The ServerPlayer performing this capture attempt.
    • getPokemon

      public Pokemon getPokemon()
      The PixelmonEntity being caught.
      Returns:
      The PixelmonEntity being caught.
    • getPokeBallEntity

      public PokeBallEntity getPokeBallEntity()
      The PokeBallEntity being used in this capture attempt.
      Returns:
      The PokeBallEntity being used in this capture attempt.
    • getPokeBall

      public PokeBall getPokeBall()
    • setPokemon

      public void setPokemon(Pokemon pokemon)
      Replaces the The PixelmonEntity being caught.
      Parameters:
      pokemon - The new PixelmonEntity being caught.