Class EggHatchEvent.Pre
java.lang.Object
net.neoforged.bus.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 -
Constructor Summary
ConstructorsConstructorDescriptionPre(net.minecraft.server.level.ServerPlayer player, PokemonStorage storage, Pokemon pokemon, net.minecraft.network.chat.Component message) -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.network.chat.ComponentGets the hatch message being sent to the playervoidsetMessage(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
-
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
-