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
Modifier and TypeClassDescriptionstatic final class
Represents all evolve causesstatic 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 cancellablestatic class
The event fired before the evolution checks are completed and before any evolution logic is done Cancelling this will prevent any evolution from occurringNested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
-
Constructor Summary
ModifierConstructorDescriptionprotected
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 TypeMethodDescriptiongetCause()
Gets the cause of the evolutionGets the evolution that is taking placenet.minecraft.server.level.ServerPlayer
Gets the player the evolution is happening forGets the evolving Pokémonboolean
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
-
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 playerpokemon
- The Pokémon evolvingevolution
- The evolutioncause
- 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
Gets the evolving Pokémon- Returns:
- The Pokémon evolving
-
getEvolution
Gets the evolution that is taking place- Returns:
- The evolution
-
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
-