Package org.bukkit.event.player

# Class PlayerAdvancementDoneEvent

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

public class PlayerAdvancementDoneEvent extends PlayerEvent
Called when a player has completed all criteria in an advancement.

## 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
`PlayerAdvancementDoneEvent(@NotNull Player who, @NotNull Advancement advancement)`
`PlayerAdvancementDoneEvent(@NotNull Player who, @NotNull Advancement advancement, @Nullable Component message)`

## Method Summary

Modifier and Type
Method
Description
`@NotNull Advancement`
`getAdvancement()`
Get the advancement which has been completed.
`static @NotNull HandlerList`
`getHandlerList()`
`@NotNull HandlerList`
`getHandlers()`
`@Nullable Component`
`message()`
Gets the message to send to all online players.
`void`
`message(@Nullable Component message)`
Sets the message to send to all online players.

### 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

### PlayerAdvancementDoneEvent

public PlayerAdvancementDoneEvent(@NotNull @NotNull Player who, @NotNull @NotNull Advancement advancement)

### PlayerAdvancementDoneEvent

public PlayerAdvancementDoneEvent(@NotNull @NotNull Player who, @NotNull @NotNull Advancement advancement, @Nullable @Nullable Component message)

## Method Details

### getAdvancement

@NotNull public @NotNull Advancement getAdvancement()
Get the advancement which has been completed.

Returns:
  completed advancement

### message

@Nullable public @Nullable Component message()
Gets the message to send to all online players.

Will be null if the advancement does not announce to chat, for example if it is a recipe unlock or a root advancement.

Returns:
  The announcement message, or null

### message

public void message(@Nullable @Nullable Component message)
Sets the message to send to all online players.

If set to null the message will not be sent.

Parameters:
  `message` - The new message

### getHandlers

@NotNull public @NotNull HandlerList getHandlers()

Specified by:
  `getHandlers` in class `Event`

### getHandlerList

@NotNull public static @NotNull HandlerList getHandlerList()