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.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classCollects the metadata pieces. -
Method Summary
Modifier and TypeMethodDescriptionbase()The underlying metadata this instance delegates to.static EventMetadata.Builderbuilder()Starts building event metadata.default @NonNull DestinationWhere on the client the message is drawn.filter()Decides which players receive the message.default @Nullable Supplier<IntegrationMessageFormat> Supplies the formatting used when the message is mirrored to Discord, Telegram or Twitch.default @Nullable ProxyDataConsumer<DataOutputStream> proxy()Writes the extra payload sent to other servers when the range reaches the proxy.default @NonNull Rangerange()How far the message travels from its sender.default @Nullable IntegrationMessageFormatResolves the integration format, if one was supplied.default @NonNull MessageContextresolveMessageContext(FPlayer fPlayer) Builds the message context for one receiver, so each player can get their own wording.default @Nullable Pair<Sound, PermissionSetting> sound()The sound played with the message, paired with the permission that allows hearing it.
-
Method Details
-
builder
-
base
-
filter
-
destination
Where on the client the message is drawn.- Returns:
- the destination
-
range
-
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
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
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
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
Resolves the integration format, if one was supplied.- Returns:
- the format, or null if the message is not mirrored
-