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

public static class EggHatchEvent.Pre extends 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

    Constructors
    Constructor
    Description
    Pre(net.minecraft.server.level.ServerPlayer player, PokemonStorage storage, Pokemon pokemon, net.minecraft.network.chat.Component message)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.network.chat.Component
    Gets the hatch message being sent to the player
    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

    Methods 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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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