Class PlayerXpEvent.XpChange
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.event.entity.EntityEvent
net.neoforged.neoforge.event.entity.living.LivingEvent
net.neoforged.neoforge.event.entity.player.PlayerEvent
net.neoforged.neoforge.event.entity.player.PlayerXpEvent
net.neoforged.neoforge.event.entity.player.PlayerXpEvent.XpChange
- All Implemented Interfaces:
net.neoforged.bus.api.ICancellableEvent
- Enclosing class:
PlayerXpEvent
public static class PlayerXpEvent.XpChange
extends PlayerXpEvent
implements net.neoforged.bus.api.ICancellableEvent
This event is fired when the player's experience changes through the
Player.giveExperiencePoints(int)
method.
It can be cancelled, and no further processing will be done.-
Nested Class Summary
Nested classes/interfaces inherited from class net.neoforged.neoforge.event.entity.player.PlayerXpEvent
PlayerXpEvent.LevelChange, PlayerXpEvent.PickupXp, PlayerXpEvent.XpChange
Nested classes/interfaces inherited from class net.neoforged.neoforge.event.entity.player.PlayerEvent
PlayerEvent.BreakSpeed, PlayerEvent.Clone, PlayerEvent.HarvestCheck, PlayerEvent.ItemCraftedEvent, PlayerEvent.ItemSmeltedEvent, PlayerEvent.LoadFromFile, PlayerEvent.NameFormat, PlayerEvent.PlayerChangedDimensionEvent, PlayerEvent.PlayerChangeGameModeEvent, PlayerEvent.PlayerLoggedInEvent, PlayerEvent.PlayerLoggedOutEvent, PlayerEvent.PlayerRespawnEvent, PlayerEvent.SaveToFile, PlayerEvent.StartTracking, PlayerEvent.StopTracking, PlayerEvent.TabListNameFormat
Nested classes/interfaces inherited from class net.neoforged.neoforge.event.entity.living.LivingEvent
LivingEvent.LivingJumpEvent, LivingEvent.LivingVisibilityEvent
Nested classes/interfaces inherited from class net.neoforged.neoforge.event.entity.EntityEvent
EntityEvent.EnteringSection, EntityEvent.EntityConstructing, EntityEvent.Size
-
Field Summary
-
Constructor Summary
-
Method Summary
Methods inherited from class net.neoforged.neoforge.event.entity.player.PlayerEvent
getEntity
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
-
Field Details
-
amount
private int amount
-
-
Constructor Details
-
XpChange
-
-
Method Details
-
getAmount
public int getAmount() -
setAmount
public void setAmount(int amount)
-