Package net.kyori.adventure.bossbar
Interface BossBar.Listener
- Enclosing interface:
- BossBar
public static interface BossBar.Listener
A listener for changes that happen on a
BossBar
.- Since:
- 4.0.0
-
Method Summary
Modifier and Type Method Description default void
bossBarColorChanged(@NonNull BossBar bar, @NonNull BossBar.Color oldColor, @NonNull BossBar.Color newColor)
Bossbar color changed.default void
bossBarFlagsChanged(@NonNull BossBar bar, @NonNull Set<BossBar.Flag> flagsAdded, @NonNull Set<BossBar.Flag> flagsRemoved)
Bossbar flags changed.default void
bossBarNameChanged(@NonNull BossBar bar, @NonNull Component oldName, @NonNull Component newName)
Bossbar name changed.default void
bossBarOverlayChanged(@NonNull BossBar bar, @NonNull BossBar.Overlay oldOverlay, @NonNull BossBar.Overlay newOverlay)
Bossbar overlay changed.default void
bossBarPercentChanged(@NonNull BossBar bar, float oldProgress, float newProgress)
Deprecated.for removal since 4.2.0, usebossBarProgressChanged(BossBar, float, float)
default void
bossBarProgressChanged(@NonNull BossBar bar, float oldProgress, float newProgress)
Bossbar progress changed.
-
Method Details
-
bossBarNameChanged
default void bossBarNameChanged(@NonNull BossBar bar, @NonNull Component oldName, @NonNull Component newName)Bossbar name changed.- Parameters:
bar
- the bossbaroldName
- the old namenewName
- the new name- Since:
- 4.0.0
-
bossBarProgressChanged
Bossbar progress changed.- Parameters:
bar
- the bossbaroldProgress
- the old progressnewProgress
- the new progress- Since:
- 4.0.0
-
bossBarPercentChanged
@Deprecated default void bossBarPercentChanged(@NonNull BossBar bar, float oldProgress, float newProgress)Deprecated.for removal since 4.2.0, usebossBarProgressChanged(BossBar, float, float)
Bossbar progress changed.- Parameters:
bar
- the bossbaroldProgress
- the old progressnewProgress
- the new progress- Since:
- 4.0.0
-
bossBarColorChanged
default void bossBarColorChanged(@NonNull BossBar bar, @NonNull BossBar.Color oldColor, @NonNull BossBar.Color newColor)Bossbar color changed.- Parameters:
bar
- the bossbaroldColor
- the old colornewColor
- the new color- Since:
- 4.0.0
-
bossBarOverlayChanged
default void bossBarOverlayChanged(@NonNull BossBar bar, @NonNull BossBar.Overlay oldOverlay, @NonNull BossBar.Overlay newOverlay)Bossbar overlay changed.- Parameters:
bar
- the bossbaroldOverlay
- the old overlaynewOverlay
- the new overlay- Since:
- 4.0.0
-
bossBarFlagsChanged
default void bossBarFlagsChanged(@NonNull BossBar bar, @NonNull Set<BossBar.Flag> flagsAdded, @NonNull Set<BossBar.Flag> flagsRemoved)Bossbar flags changed.- Parameters:
bar
- the bossbarflagsAdded
- the flags added to the bossbarflagsRemoved
- the flags removed from the bossbar- Since:
- 4.0.0
-