Class PokedexEvent.Pre
java.lang.Object
net.neoforged.bus.api.Event
com.pixelmonmod.pixelmon.api.events.PokedexEvent
com.pixelmonmod.pixelmon.api.events.PokedexEvent.Pre
- All Implemented Interfaces:
net.neoforged.bus.api.ICancellableEvent
- Enclosing class:
PokedexEvent
public static class PokedexEvent.Pre
extends PokedexEvent
implements net.neoforged.bus.api.ICancellableEvent
Event fired just before the player's pokedex is updated
Cancelling will mean the pokemon doesn't get modified in their pokedex
-
Nested Class Summary
Nested classes/interfaces inherited from class com.pixelmonmod.pixelmon.api.events.PokedexEvent
PokedexEvent.Constants, PokedexEvent.Post, PokedexEvent.Pre
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionPre
(UUID uuid, Pokemon pokemon, PokedexRegistrationStatus newStatus, String cause) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Sets the cause of the eventvoid
setNewStatus
(PokedexRegistrationStatus newStatus) Sets the new status it's transitioning tovoid
setPokemon
(Pokemon pokemon) Sets the pokemon the status is being changed forMethods inherited from class com.pixelmonmod.pixelmon.api.events.PokedexEvent
getCause, getNewStatus, getOldStatus, getPlayer, getPlayerUUID, getPokedex, getPokemon, isBeingSeenByPokedexKey, isCausedBy, isCausedByCapture, isCausedByEggHatching, isCausedByEvolution, isCausedByNPCTrade, isCausedByPlayerTrade, isCausedBySidemod, isCausedByStorageMovement, isInternal
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.neoforged.bus.api.ICancellableEvent
isCanceled, setCanceled
-
Constructor Details
-
Pre
-
-
Method Details
-
setNewStatus
Sets the new status it's transitioning to- Parameters:
newStatus
- The new status being set in the Player's pokedex
-
setPokemon
Sets the pokemon the status is being changed for- Parameters:
pokemon
- The pokemon
-
setCause
Sets the cause of the event- Parameters:
cause
- The cause
-