Class EggHatchEvent.Pre
java.lang.Object
net.minecraftforge.eventbus.api.Event
com.pixelmonmod.pixelmon.api.events.EggHatchEvent
com.pixelmonmod.pixelmon.api.events.EggHatchEvent.Pre
- Enclosing class:
- EggHatchEvent
Fired before the egg is going to hatch
Using this event you can change the message sent to the player
-
Nested Class Summary
Nested classes/interfaces inherited from class com.pixelmonmod.pixelmon.api.events.EggHatchEvent
EggHatchEvent.Post, EggHatchEvent.Pre
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
ConstructorDescriptionPre
(net.minecraft.server.level.ServerPlayer player, PokemonStorage storage, Pokemon pokemon, net.minecraft.network.chat.Component message) -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.network.chat.Component
Gets the hatch message being sent to the playervoid
setMessage
(net.minecraft.network.chat.Component message) Sets the hatch message sent to the player Setting this to null will cancel sending the messageMethods inherited from class com.pixelmonmod.pixelmon.api.events.EggHatchEvent
getPlayer, getPokemon, getStorage
Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
Constructor Details
-
Pre
public Pre(net.minecraft.server.level.ServerPlayer player, PokemonStorage storage, Pokemon pokemon, net.minecraft.network.chat.Component message)
-
-
Method Details
-
getMessage
public net.minecraft.network.chat.Component getMessage()Gets the hatch message being sent to the player- Returns:
- The message
-
setMessage
public void setMessage(net.minecraft.network.chat.Component message) Sets the hatch message sent to the player Setting this to null will cancel sending the message- Parameters:
message
- The new message
-