Package org.bukkit.event.player
Class PlayerAdvancementDoneEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
org.bukkit.event.player.PlayerAdvancementDoneEvent
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
ConstructorDescriptionPlayerAdvancementDoneEvent(@NotNull Player who, @NotNull Advancement advancement)
PlayerAdvancementDoneEvent(@NotNull Player who, @NotNull Advancement advancement, @Nullable Component message)
-
Method Summary
Modifier and TypeMethodDescriptionGet the advancement which has been completed.static @NotNull HandlerList
message()
Gets the message to send to all online players.void
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
-
Constructor Details
-
PlayerAdvancementDoneEvent
-
PlayerAdvancementDoneEvent
-
-
Method Details
-
getAdvancement
Get the advancement which has been completed.- Returns:
- completed advancement
-
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
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
- Specified by:
getHandlers
in classEvent
-
getHandlerList
-