public class LevelUpEvent
extends net.minecraftforge.eventbus.api.Event
Modifier and Type | Class and Description |
---|---|
static class |
LevelUpEvent.Post
Fired just after the pokemon's level changes
Cannot be cancelled
|
static class |
LevelUpEvent.Pre
Fired just before the level up occurs
Cancelling will prevent the pokemon's level from increasing, and any subsequent changes that'd have happened
after (i.e.
|
Modifier and Type | Field and Description |
---|---|
protected int |
afterLevel |
protected int |
beforeLevel |
protected ExperienceGainType |
cause |
protected net.minecraft.entity.player.ServerPlayerEntity |
player |
protected PokemonLink |
pokemon |
Modifier | Constructor and Description |
---|---|
protected |
LevelUpEvent(net.minecraft.entity.player.ServerPlayerEntity player,
PokemonLink pokemon,
ExperienceGainType cause,
int beforeLevel,
int afterLevel) |
Modifier and Type | Method and Description |
---|---|
int |
getAfterLevel()
Gets the Pokemon's level after it was changed
|
int |
getBeforeLevel()
Gets the Pokemon's level before it was changed
|
ExperienceGainType |
getCause()
Gets the cause of the level up
|
int |
getLevelChange()
Gets the numerical difference in level from before & after the event
|
net.minecraft.entity.player.ServerPlayerEntity |
getPlayer()
Gets the player
|
Pokemon |
getPokemon()
Gets the Pokemon leveling up
|
PokemonLink |
getPokemonLink()
Gets the link of the Pokemon leveling up
|
protected final net.minecraft.entity.player.ServerPlayerEntity player
protected final PokemonLink pokemon
protected final ExperienceGainType cause
protected int beforeLevel
protected int afterLevel
protected LevelUpEvent(net.minecraft.entity.player.ServerPlayerEntity player, PokemonLink pokemon, ExperienceGainType cause, int beforeLevel, int afterLevel)
@Nullable public net.minecraft.entity.player.ServerPlayerEntity getPlayer()
public PokemonLink getPokemonLink()
public Pokemon getPokemon()
public ExperienceGainType getCause()
public int getBeforeLevel()
public int getAfterLevel()
public int getLevelChange()