Interface Facet.BossBarEntity<V,​P>

  • Type Parameters:
    V - a viewer type
    P - a position type
    All Superinterfaces:
    java.lang.AutoCloseable, net.kyori.adventure.bossbar.BossBar.Listener, java.io.Closeable, Facet<V>, Facet.BossBar<V>, Facet.FakeEntity<V,​P>, Facet.Position<V,​P>
    Enclosing interface:
    Facet<V>

    public static interface Facet.BossBarEntity<V,​P>
    extends Facet.BossBar<V>, Facet.FakeEntity<V,​P>
    A facet that listens to boss bar changes, using fake entities.
    • Method Detail

      • bossBarPercentChanged

        default void bossBarPercentChanged​(@NonNull net.kyori.adventure.bossbar.BossBar bar,
                                           float oldPercent,
                                           float newPercent)
        Specified by:
        bossBarPercentChanged in interface net.kyori.adventure.bossbar.BossBar.Listener
      • bossBarNameChanged

        default void bossBarNameChanged​(@NonNull net.kyori.adventure.bossbar.BossBar bar,
                                        @NonNull net.kyori.adventure.text.Component oldName,
                                        @NonNull net.kyori.adventure.text.Component newName)
        Specified by:
        bossBarNameChanged in interface net.kyori.adventure.bossbar.BossBar.Listener
      • addViewer

        default void addViewer​(@NonNull V viewer)
        Description copied from interface: Facet.BossBar
        Adds a viewer to the boss bar.
        Specified by:
        addViewer in interface Facet.BossBar<V>
        Parameters:
        viewer - a viewer
      • removeViewer

        default void removeViewer​(@NonNull V viewer)
        Description copied from interface: Facet.BossBar
        Removes a viewer from the boss bar.
        Specified by:
        removeViewer in interface Facet.BossBar<V>
        Parameters:
        viewer - a viewer