Class EggHatchEvent
java.lang.Object
net.minecraftforge.eventbus.api.Event
com.pixelmonmod.pixelmon.api.events.EggHatchEvent
- Direct Known Subclasses:
EggHatchEvent.Post
,EggHatchEvent.Pre
public abstract class EggHatchEvent
extends net.minecraftforge.eventbus.api.Event
Fires when a Pokémon in a player's party hatches from an egg
Note: None of the sub-classes are cancellable
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Fired after the hatch is done (and message is sent)static class
Fired before the egg is going to hatch Using this event you can change the message sent to the playerNested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
-
Constructor Summary
ModifierConstructorDescriptionprotected
EggHatchEvent
(net.minecraft.server.level.ServerPlayer player, PokemonStorage storage, Pokemon pokemon) -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.server.level.ServerPlayer
Gets the player the egg is hatching for Note: This can be nullGets the pokemon that is hatching / just hatchedGets the storage the egg is hatching inMethods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
Constructor Details
-
EggHatchEvent
protected EggHatchEvent(net.minecraft.server.level.ServerPlayer player, PokemonStorage storage, Pokemon pokemon)
-
-
Method Details
-
getPlayer
public net.minecraft.server.level.ServerPlayer getPlayer()Gets the player the egg is hatching for Note: This can be null- Returns:
- The player
-
getStorage
Gets the storage the egg is hatching in- Returns:
- The storage
-
getPokemon
Gets the pokemon that is hatching / just hatched- Returns:
- The pokemon
-