Class PokemonReceivedEvent

java.lang.Object
net.minecraftforge.eventbus.api.Event
com.pixelmonmod.pixelmon.api.events.PokemonReceivedEvent

public class PokemonReceivedEvent extends net.minecraftforge.eventbus.api.Event
This event is fired when a Pokemon is given to a player
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    All constants relating to the receive event

    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
    PokemonReceivedEvent(net.minecraft.server.level.ServerPlayer player, Pokemon pokemon, String cause)
    Constructor for the receive event
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the cause of the event
    net.minecraft.server.level.ServerPlayer
    Gets the player being given the pokemon
    Gets the pokemon being given
    boolean
    Checks if the cause was something inside the Pixelmon mod - if false it means it was a plugin or someone made a mistake :))

    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

    • PokemonReceivedEvent

      public PokemonReceivedEvent(net.minecraft.server.level.ServerPlayer player, Pokemon pokemon, String cause)
      Constructor for the receive event
      Parameters:
      player - The player receiving the pokemon
      pokemon - The pokemon being given
      cause - The cause of the give
  • Method Details

    • getPlayer

      public net.minecraft.server.level.ServerPlayer getPlayer()
      Gets the player being given the pokemon
      Returns:
      The player
    • getCause

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

      public Pokemon getPokemon()
      Gets the pokemon being given
      Returns:
      The pokemon
    • isInternal

      public boolean isInternal()
      Checks if the cause was something inside the Pixelmon mod - if false it means it was a plugin or someone made a mistake :))
      Returns:
      True if from pixelmon