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

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
  • 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