Class LevelUpEvent.Pre
java.lang.Object
net.neoforged.bus.api.Event
com.pixelmonmod.pixelmon.api.events.LevelUpEvent
com.pixelmonmod.pixelmon.api.events.LevelUpEvent.Pre
- All Implemented Interfaces:
- net.neoforged.bus.api.ICancellableEvent
- Enclosing class:
- LevelUpEvent
public static class LevelUpEvent.Pre
extends LevelUpEvent
implements net.neoforged.bus.api.ICancellableEvent
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. mass level up will not level up at all and won't attempt again)
- 
Nested Class SummaryNested classes/interfaces inherited from class com.pixelmonmod.pixelmon.api.events.LevelUpEventLevelUpEvent.Post, LevelUpEvent.Pre
- 
Field SummaryFields inherited from class com.pixelmonmod.pixelmon.api.events.LevelUpEventafterLevel, beforeLevel, cause, player, pokemon
- 
Constructor SummaryConstructorsConstructorDescriptionPre(net.minecraft.server.level.ServerPlayer player, Pokemon pokemon, ExperienceGainType cause, int beforeLevel, int afterLevel) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidsetAfterLevel(int afterLevel) Modifies the level the Pokemon will go toMethods inherited from class com.pixelmonmod.pixelmon.api.events.LevelUpEventgetAfterLevel, getBeforeLevel, getCause, getLevelChange, getPlayer, getPokemonMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.neoforged.bus.api.ICancellableEventisCanceled, setCanceled
- 
Constructor Details- 
Prepublic Pre(net.minecraft.server.level.ServerPlayer player, Pokemon pokemon, ExperienceGainType cause, int beforeLevel, int afterLevel) 
 
- 
- 
Method Details- 
setAfterLevelpublic void setAfterLevel(int afterLevel) Modifies the level the Pokemon will go to- Parameters:
- afterLevel- The new level the pokemon will level up to
 
 
-