Class 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.
  • Field Details

    • amount

      private int amount
  • Constructor Details

    • XpChange

      public XpChange(Player player, int amount)
  • Method Details

    • getAmount

      public int getAmount()
    • setAmount

      public void setAmount(int amount)