Class PlayerXpEvent.LevelChange

All Implemented Interfaces:
net.neoforged.bus.api.ICancellableEvent
Enclosing class:
PlayerXpEvent

public static class PlayerXpEvent.LevelChange extends PlayerXpEvent implements net.neoforged.bus.api.ICancellableEvent
This event is fired when the player's experience level changes through the Player.giveExperienceLevels(int) method. It can be cancelled, and no further processing will be done.
  • Field Details

    • levels

      private int levels
  • Constructor Details

    • LevelChange

      public LevelChange(Player player, int levels)
  • Method Details

    • getLevels

      public int getLevels()
    • setLevels

      public void setLevels(int levels)