Class PokemonReceivedEvent
java.lang.Object
net.neoforged.bus.api.Event
com.pixelmonmod.pixelmon.api.events.PokemonReceivedEvent
- All Implemented Interfaces:
net.neoforged.bus.api.ICancellableEvent
public class PokemonReceivedEvent
extends net.neoforged.bus.api.Event
implements net.neoforged.bus.api.ICancellableEvent
This event is fired when a Pokemon is given to a player
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
All constants relating to the receive event -
Constructor Summary
ConstructorsConstructorDescriptionPokemonReceivedEvent
(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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.neoforged.bus.api.ICancellableEvent
isCanceled, setCanceled
-
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
-