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
Modifier and TypeClassDescriptionstatic class
All constants relating to the receive eventNested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
-
Constructor Summary
ConstructorDescriptionPokemonReceivedEvent
(net.minecraft.server.level.ServerPlayer player, Pokemon pokemon, String cause) Constructor for the receive event -
Method Summary
Modifier and TypeMethodDescriptiongetCause()
Gets the cause of the eventnet.minecraft.server.level.ServerPlayer
Gets the player being given the pokemonGets the pokemon being givenboolean
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
-
Constructor Details
-
Method Details
-
getPlayer
public net.minecraft.server.level.ServerPlayer getPlayer()Gets the player being given the pokemon- Returns:
- The player
-
getCause
Gets the cause of the event- Returns:
- The cause
-
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
-