Package org.bukkit.event.player

# Class PlayerExpChangeEvent

java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
org.bukkit.event.player.PlayerExpChangeEvent

public class PlayerExpChangeEvent extends PlayerEvent
Called when a players experience changes naturally

## Nested Class Summary

## Nested classes/interfaces inherited from class org.bukkit.event.Event

`Event.Result`

## Field Summary

### Fields inherited from class org.bukkit.event.player.PlayerEvent

`player`

## Constructor Summary

Constructors
Constructor
Description
`PlayerExpChangeEvent(@NotNull Player player, int expAmount)`
`PlayerExpChangeEvent(@NotNull Player player, @Nullable Entity sourceEntity, int expAmount)`

## Method Summary

Modifier and Type
Method
Description
`int`
`getAmount()`
Get the amount of experience the player will receive
`static @NotNull HandlerList`
`getHandlerList()`
`@NotNull HandlerList`
`getHandlers()`
`@Nullable Entity`
`getSource()`
Get the source that provided the experience.
`void`
`setAmount(int amount)`
Set the amount of experience the player will receive

### Methods inherited from class org.bukkit.event.player.PlayerEvent

`getPlayer`

### Methods inherited from class org.bukkit.event.Event

`callEvent, getEventName, isAsynchronous`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### PlayerExpChangeEvent

public PlayerExpChangeEvent(@NotNull @NotNull Player player, int expAmount)

### PlayerExpChangeEvent

public PlayerExpChangeEvent(@NotNull @NotNull Player player, @Nullable @Nullable Entity sourceEntity, int expAmount)

## Method Details

### getSource

@Nullable public @Nullable Entity getSource()
Get the source that provided the experience.

Returns:
  The source of the experience

### getAmount

public int getAmount()
Get the amount of experience the player will receive

Returns:
  The amount of experience

### setAmount

public void setAmount(int amount)
Set the amount of experience the player will receive

Parameters:
  `amount` - The amount of experience to set

### getHandlers

@NotNull public @NotNull HandlerList getHandlers()

Specified by:
  `getHandlers` in class `Event`

### getHandlerList

@NotNull public static @NotNull HandlerList getHandlerList()