Interface CelebrationService
public interface CelebrationService
Victory celebrations: the catalog winners choose from and the previews of the cosmetics menu.
When a match is won, each winner still in it celebrates with the celebration they chose and
own - see CosmeticsService - or the server's
default. VictoryCelebrationEvent lets an
addon change or suppress those choices before playback starts. A celebration that fails never
delays the match's restart.
Celebrations are part of every edition, Free included, as are the victory-effect cosmetics that choose them. Methods that change something must be called on the main thread.
- Since:
- 1.8.0
-
Method Summary
Modifier and TypeMethodDescription@NotNull Optional<CelebrationDefinition> getCelebration(@NotNull String id) The celebration with this ID.@NotNull List<CelebrationDefinition> Every celebration, in the server's order.@NotNull Optional<CelebrationDefinition> The celebration winners play when they chose none.booleanWhether celebrations exist on this server.booleanPlays a celebration for one player only, wherever they are, as the cosmetics menu previews it; nobody else sees or hears it.voidstopPreview(@NotNull org.bukkit.entity.Player player) Ends the player's preview, if one plays.
-
Method Details
-
isAvailable
boolean isAvailable()Whether celebrations exist on this server. -
getCelebrations
Every celebration, in the server's order. -
getCelebration
The celebration with this ID. -
getDefaultCelebration
The celebration winners play when they chose none. -
preview
boolean preview(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull String celebrationId) Plays a celebration for one player only, wherever they are, as the cosmetics menu previews it; nobody else sees or hears it.- Returns:
- whether anything plays
-
stopPreview
void stopPreview(@NotNull @NotNull org.bukkit.entity.Player player) Ends the player's preview, if one plays.
-