Class EvolveEvent

java.lang.Object
net.minecraftforge.eventbus.api.Event
com.pixelmonmod.pixelmon.api.events.EvolveEvent
Direct Known Subclasses:
EvolveEvent.Post, EvolveEvent.Pre

public abstract class EvolveEvent extends net.minecraftforge.eventbus.api.Event
The event representing when a Pokémon evolves at any point in time Cancelling the event will prevent the mega evolution from going through
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    Represents all evolve causes
    static class 
    Event fired after all the evolution logic is complete, the entity has been spawned (if not already in the world) and the species/form updated This event is not cancellable
    static class 
    The event fired before the evolution checks are completed and before any evolution logic is done Cancelling this will prevent any evolution from occurring

    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
    Modifier
    Constructor
    Description
    protected
    EvolveEvent(net.minecraft.server.level.ServerPlayer player, Pokemon pokemon, Evolution evolution, String cause)
    Basic constructor for any evolution event Including the player, Pokémon and evolution
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the cause of the evolution
    Gets the evolution that is taking place
    net.minecraft.server.level.ServerPlayer
    Gets the player the evolution is happening for
    Gets the evolving Pokémon
    boolean
    Checks if the cause was something inside the Pixelmon mod - if false it means it was a plugin or someone made a mistake :))

    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

    • EvolveEvent

      protected EvolveEvent(net.minecraft.server.level.ServerPlayer player, Pokemon pokemon, Evolution evolution, String cause)
      Basic constructor for any evolution event Including the player, Pokémon and evolution
      Parameters:
      player - The player
      pokemon - The Pokémon evolving
      evolution - The evolution
      cause - The evolution cause
  • Method Details

    • getPlayer

      public net.minecraft.server.level.ServerPlayer getPlayer()
      Gets the player the evolution is happening for
      Returns:
      The player
    • getPokemon

      public Pokemon getPokemon()
      Gets the evolving Pokémon
      Returns:
      The Pokémon evolving
    • getEvolution

      public Evolution getEvolution()
      Gets the evolution that is taking place
      Returns:
      The evolution
    • getCause

      public String getCause()
      Gets the cause of the evolution
      Returns:
      The evolution cause
    • isInternal

      public boolean isInternal()
      Checks if the cause was something inside the Pixelmon mod - if false it means it was a plugin or someone made a mistake :))
      Returns:
      True if from pixelmon