Interface EventMetadata

All Known Implementing Classes:
EventMetadataImpl

public interface EventMetadata
Everything the dispatcher needs to deliver a message besides its text, namely who receives it, where it is shown, how far it travels and which sound plays.
  • Method Details

    • builder

      static EventMetadata.Builder builder()
      Starts building event metadata.
      Returns:
      a new builder
    • base

      The underlying metadata this instance delegates to.
      Returns:
      the base metadata
    • filter

      default @NonNull Predicate<FPlayer> filter()
      Decides which players receive the message.
      Returns:
      the receiver filter
    • destination

      default @NonNull Destination destination()
      Where on the client the message is drawn.
      Returns:
      the destination
    • range

      default @NonNull Range range()
      How far the message travels from its sender.
      Returns:
      the range
    • sound

      default @Nullable Pair<Sound, PermissionSetting> sound()
      The sound played with the message, paired with the permission that allows hearing it.
      Returns:
      the sound and its permission, or null if no sound is played
    • proxy

      default @Nullable ProxyDataConsumer<DataOutputStream> proxy()
      Writes the extra payload sent to other servers when the range reaches the proxy.
      Returns:
      the payload writer, or null if the message never leaves this server
    • integration

      default @Nullable Supplier<IntegrationMessageFormat> integration()
      Supplies the formatting used when the message is mirrored to Discord, Telegram or Twitch.
      Returns:
      the integration format supplier, or null if the message is not mirrored
    • resolveMessageContext

      default @NonNull MessageContext resolveMessageContext(FPlayer fPlayer)
      Builds the message context for one receiver, so each player can get their own wording.
      Parameters:
      fPlayer - the receiving player
      Returns:
      the context for that player
    • resolveIntegrationMessageFormat

      default @Nullable IntegrationMessageFormat resolveIntegrationMessageFormat()
      Resolves the integration format, if one was supplied.
      Returns:
      the format, or null if the message is not mirrored