Interface ForwardingAudience

All Superinterfaces:
Audience
All Known Subinterfaces:
ForwardingAudience.Single
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface
public interface ForwardingAudience
extends Audience
A receiver that wraps one or more receivers.

ForwardingAudience is designed to easily allow users or implementations wrap an existing (collection of) Audience(s).

Since:
4.0.0
See Also:
Audience
  • Method Details

    • audiences

      @OverrideOnly @NonNull Iterable<? extends Audience> audiences()
      Gets the audiences.
      Returns:
      the audiences
      Since:
      4.0.0
    • sendMessage

      default void sendMessage​(@NonNull Identified source, @NonNull Component message, @NonNull MessageType type)
      Description copied from interface: Audience
      Sends a chat message.
      Specified by:
      sendMessage in interface Audience
      Parameters:
      source - the source of the message
      message - a message
      type - the type
      See Also:
      Component
    • sendMessage

      default void sendMessage​(@NonNull Identity source, @NonNull Component message, @NonNull MessageType type)
      Description copied from interface: Audience
      Sends a chat message.
      Specified by:
      sendMessage in interface Audience
      Parameters:
      source - the identity of the source of the message
      message - a message
      type - the type
      See Also:
      Component
    • sendActionBar

      default void sendActionBar​(@NonNull Component message)
      Description copied from interface: Audience
      Sends a message on the action bar.
      Specified by:
      sendActionBar in interface Audience
      Parameters:
      message - a message
      See Also:
      Component
    • sendPlayerListHeader

      default void sendPlayerListHeader​(@NonNull Component header)
      Description copied from interface: Audience
      Sends the player list header.

      Depending on the implementation of this Audience, an existing footer may be displayed. If you wish to set both the header and the footer, please use Audience.sendPlayerListHeaderAndFooter(Component, Component).

      Specified by:
      sendPlayerListHeader in interface Audience
      Parameters:
      header - the header
    • sendPlayerListFooter

      default void sendPlayerListFooter​(@NonNull Component footer)
      Description copied from interface: Audience
      Sends the player list footer.

      Depending on the implementation of this Audience, an existing footer may be displayed. If you wish to set both the header and the footer, please use Audience.sendPlayerListHeaderAndFooter(Component, Component).

      Specified by:
      sendPlayerListFooter in interface Audience
      Parameters:
      footer - the footer
    • sendPlayerListHeaderAndFooter

      default void sendPlayerListHeaderAndFooter​(@NonNull Component header, @NonNull Component footer)
      Description copied from interface: Audience
      Sends the player list header and footer.
      Specified by:
      sendPlayerListHeaderAndFooter in interface Audience
      Parameters:
      header - the header
      footer - the footer
    • showTitle

      default void showTitle​(@NonNull Title title)
      Description copied from interface: Audience
      Shows a title.
      Specified by:
      showTitle in interface Audience
      Parameters:
      title - a title
      See Also:
      Title
    • clearTitle

      default void clearTitle()
      Description copied from interface: Audience
      Clears the title, if one is being displayed.
      Specified by:
      clearTitle in interface Audience
      See Also:
      Title
    • resetTitle

      default void resetTitle()
      Description copied from interface: Audience
      Resets the title and timings back to their default.
      Specified by:
      resetTitle in interface Audience
      See Also:
      Title
    • showBossBar

      default void showBossBar​(@NonNull BossBar bar)
      Description copied from interface: Audience
      Shows a boss bar.
      Specified by:
      showBossBar in interface Audience
      Parameters:
      bar - a boss bar
      See Also:
      BossBar
    • hideBossBar

      default void hideBossBar​(@NonNull BossBar bar)
      Description copied from interface: Audience
      Hides a boss bar.
      Specified by:
      hideBossBar in interface Audience
      Parameters:
      bar - a boss bar
      See Also:
      BossBar
    • playSound

      default void playSound​(@NonNull Sound sound)
      Description copied from interface: Audience
      Plays a sound.
      Specified by:
      playSound in interface Audience
      Parameters:
      sound - a sound
      See Also:
      Sound
    • playSound

      default void playSound​(@NonNull Sound sound, double x, double y, double z)
      Description copied from interface: Audience
      Plays a sound at a location.
      Specified by:
      playSound in interface Audience
      Parameters:
      sound - a sound
      x - x coordinate
      y - y coordinate
      z - z coordinate
      See Also:
      Sound
    • stopSound

      default void stopSound​(@NonNull SoundStop stop)
      Description copied from interface: Audience
      Stops a sound, or many sounds.
      Specified by:
      stopSound in interface Audience
      Parameters:
      stop - a sound stop
      See Also:
      SoundStop
    • openBook

      default void openBook​(@NonNull Book book)
      Description copied from interface: Audience
      Opens a book.

      When possible, no item should persist after closing the book.

      Specified by:
      openBook in interface Audience
      Parameters:
      book - a book
      See Also:
      Book