public class PlayerAdvancementDoneEvent extends PlayerEvent
Event.Result
player
Constructor and Description |
---|
PlayerAdvancementDoneEvent(@NotNull Player who,
@NotNull Advancement advancement) |
PlayerAdvancementDoneEvent(@NotNull Player who,
@NotNull Advancement advancement,
@Nullable net.kyori.adventure.text.Component message) |
Modifier and Type | Method and Description |
---|---|
@NotNull Advancement |
getAdvancement()
Get the advancement which has been completed.
|
static @NotNull HandlerList |
getHandlerList() |
@NotNull HandlerList |
getHandlers() |
@Nullable net.kyori.adventure.text.Component |
message()
Gets the message to send to all online players.
|
void |
message(@Nullable net.kyori.adventure.text.Component message)
Sets the message to send to all online players.
|
getPlayer
callEvent, getEventName, isAsynchronous
public PlayerAdvancementDoneEvent(@NotNull @NotNull Player who, @NotNull @NotNull Advancement advancement)
@NotNull public @NotNull Advancement getAdvancement()
@Nullable public @Nullable net.kyori.adventure.text.Component message()
Will be null if the advancement does not announce to chat, for example if it is a recipe unlock or a root advancement.
public void message(@Nullable @Nullable net.kyori.adventure.text.Component message)
If set to null the message will not be sent.
message
- The new message@NotNull public @NotNull HandlerList getHandlers()
getHandlers
in class Event
@NotNull public static @NotNull HandlerList getHandlerList()
Copyright © 2021. All rights reserved.