public class PokedexEvent
extends net.minecraftforge.eventbus.api.Event
Modifier and Type | Class and Description |
---|---|
static class |
PokedexEvent.Constants
Class used for storing constants relating to the cause of the
PokedexEvent |
static class |
PokedexEvent.Post
Fired after the player's pokedex is updated
|
static class |
PokedexEvent.Pre
Event fired just before the player's pokedex is updated
Cancelling will mean the pokemon doesn't get modified in their pokedex
|
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
cause |
protected PokedexRegistrationStatus |
newStatus |
protected PokedexRegistrationStatus |
oldStatus |
protected Pokemon |
pokemon |
protected java.util.UUID |
uuid |
Modifier | Constructor and Description |
---|---|
|
PokedexEvent(java.util.UUID uuid,
PokedexRegistrationStatus oldStatus,
Pokemon pokemon,
PokedexRegistrationStatus newStatus,
java.lang.String cause) |
protected |
PokedexEvent(java.util.UUID uuid,
Pokemon pokemon,
PokedexRegistrationStatus newStatus,
java.lang.String cause) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getCause()
Gets the cause of the event
|
PokedexRegistrationStatus |
getNewStatus()
Gets the registration status it's transitioning to
|
PokedexRegistrationStatus |
getOldStatus()
Gets the registration status it's transitioning from
|
net.minecraft.entity.player.ServerPlayerEntity |
getPlayer()
Gets the player relating to the event
|
java.util.UUID |
getPlayerUUID()
Gets the UUID of the player for the event
|
PlayerPokedex |
getPokedex() |
Pokemon |
getPokemon()
Gets the Pokemon relevant to the dex event
|
boolean |
isBeingSeenByPokedexKey() |
boolean |
isCausedBy(java.lang.String... causes)
Checks if the event was caused by one of the given causes
|
boolean |
isCausedByCapture() |
boolean |
isCausedByEggHatching() |
boolean |
isCausedByEvolution() |
boolean |
isCausedByNPCTrade() |
boolean |
isCausedByPlayerTrade() |
boolean |
isCausedBySidemod() |
boolean |
isCausedByStorageMovement() |
boolean |
isInternal() |
protected final java.util.UUID uuid
protected final PokedexRegistrationStatus oldStatus
protected Pokemon pokemon
protected PokedexRegistrationStatus newStatus
protected java.lang.String cause
protected PokedexEvent(java.util.UUID uuid, Pokemon pokemon, PokedexRegistrationStatus newStatus, java.lang.String cause)
public PokedexEvent(java.util.UUID uuid, PokedexRegistrationStatus oldStatus, Pokemon pokemon, PokedexRegistrationStatus newStatus, java.lang.String cause)
public java.util.UUID getPlayerUUID()
public net.minecraft.entity.player.ServerPlayerEntity getPlayer()
public Pokemon getPokemon()
public PlayerPokedex getPokedex()
public PokedexRegistrationStatus getNewStatus()
public PokedexRegistrationStatus getOldStatus()
public java.lang.String getCause()
public boolean isCausedBy(java.lang.String... causes)
causes
- The causepublic boolean isCausedByCapture()
public boolean isCausedByPlayerTrade()
public boolean isCausedByNPCTrade()
public boolean isCausedByEvolution()
public boolean isCausedByEggHatching()
public boolean isCausedByStorageMovement()
public boolean isBeingSeenByPokedexKey()
public boolean isCausedBySidemod()
public boolean isInternal()