Interface AudienceMessageEvent

All Superinterfaces:
Event, MessageEvent
All Known Subinterfaces:
AdvancementEvent.Grant, DestructEntityEvent, DestructEntityEvent.Death, ServerSideConnectionEvent.Disconnect, ServerSideConnectionEvent.Join, SystemMessageEvent

public interface AudienceMessageEvent extends MessageEvent
Describes events when a involving a Component message and Audiences.
  • Method Details

    • originalAudience

      Audience originalAudience()
      Gets the original audience that this message will be sent to.
      Returns:
      The original audience to send to
    • audience

      Optional<Audience> audience()
      Gets the current audience that this message will be sent to.
      Returns:
      The message channel the message in this event will be sent to
    • setAudience

      void setAudience(@Nullable Audience audience)
      Sets the audience for this message to go to.
      Parameters:
      audience - The audience to set
    • filterAudience

      default void filterAudience(Predicate<Audience> predicate)
      Filters the current audience with given predicate.
      Parameters:
      predicate - the predicate