Class PokemonRetrievedEvent

java.lang.Object
net.neoforged.bus.api.Event
com.pixelmonmod.pixelmon.api.events.PokemonRetrievedEvent
Direct Known Subclasses:
PokemonRetrievedEvent.Post, PokemonRetrievedEvent.Pre

public class PokemonRetrievedEvent extends net.neoforged.bus.api.Event
This event is fired when a LivingEntity retrieves the entity of their Pokémon (that they already own, not a newly caught Pokémon) from the world.
  • Constructor Details

    • PokemonRetrievedEvent

      public PokemonRetrievedEvent(@Nullable net.minecraft.world.entity.LivingEntity owner, Pokemon pokemon, String cause)
      Constructor for the retrieve event
      Parameters:
      owner - The player or entity retrieving the Pokémon
      pokemon - The Pokémon that is returning to its PokeBall.
      cause - The cause of the retrieval.
  • Method Details

    • getOwner

      @Nullable public net.minecraft.world.entity.LivingEntity getOwner()
      Gets the player/entity retrieving the Pokémon.
      Returns:
      The owner of the Pokémon
    • getCause

      public String getCause()
      Gets the cause of the event.
      Returns:
      The cause
    • getPokemon

      public Pokemon getPokemon()
      Gets the Pokémon being retrieved.
      Returns:
      The Pokémon