Class PokemonRetrievedEvent

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

public class PokemonRetrievedEvent extends net.minecraftforge.eventbus.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.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    All constants relating to the retrieve event
    static class 
    Event fired after the Pokémon entity has been removed from the world.
    static class 
    Event fired before the Pokémon entity has been removed from the world.

    Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event

    net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
  • Constructor Summary

    Constructors
    Constructor
    Description
    PokemonRetrievedEvent(net.minecraft.world.entity.LivingEntity owner, Pokemon pokemon, String cause)
    Constructor for the retrieve event
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the cause of the event.
    net.minecraft.world.entity.LivingEntity
    Gets the player/entity retrieving the Pokémon.
    Gets the Pokémon being retrieved.

    Methods inherited from class net.minecraftforge.eventbus.api.Event

    getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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