Record Class BaseEventMetadata<L extends LocalizationSetting>
java.lang.Object
java.lang.Record
net.flectone.pulse.model.event.BaseEventMetadata<L>
- All Implemented Interfaces:
EventMetadata<L>
public record BaseEventMetadata<L extends LocalizationSetting>(@NonNull UUID uuid, @NonNull FEntity sender, @NonNull Predicate<FPlayer> filter, @NonNull Map<MessageFlag, Boolean> flags, @NonNull BiFunction<FPlayer, L extends LocalizationSetting, String> format, @NonNull Destination destination, @NonNull Range range, @Nullable org.apache.commons.lang3.tuple.Pair<Sound, PermissionSetting> sound, @Nullable String message, @Nullable Function<FPlayer, net.kyori.adventure.text.minimessage.tag.resolver.TagResolver[]> tagResolvers, @Nullable ProxyDataConsumer<SafeDataOutputStream> proxy, @Nullable IntegrationMetadata integrationMetadata, @NonNull List<FPlayer> receivers)
extends Record
implements EventMetadata<L>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classNested classes/interfaces inherited from interface EventMetadata
EventMetadata.Builder<L> -
Constructor Summary
ConstructorsConstructorDescriptionBaseEventMetadata(@NonNull UUID uuid, @NonNull FEntity sender, @NonNull Predicate<FPlayer> filter, @NonNull Map<MessageFlag, Boolean> flags, @NonNull BiFunction<FPlayer, L, String> format, @NonNull Destination destination, @NonNull Range range, @Nullable org.apache.commons.lang3.tuple.Pair<Sound, PermissionSetting> sound, @Nullable String message, @Nullable Function<FPlayer, net.kyori.adventure.text.minimessage.tag.resolver.TagResolver[]> tagResolvers, @Nullable ProxyDataConsumer<SafeDataOutputStream> proxy, @Nullable IntegrationMetadata integrationMetadata, @NonNull List<FPlayer> receivers) Creates an instance of aBaseEventMetadatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionbase()static <L extends LocalizationSetting>
BaseEventMetadata.BaseEventMetadataBuilder<L> builder()@NonNull DestinationReturns the value of thedestinationrecord component.final booleanIndicates whether some other object is "equal to" this one.filter()Returns the value of thefilterrecord component.@NonNull Map<MessageFlag, Boolean> flags()Returns the value of theflagsrecord component.@NonNull BiFunction<FPlayer, L, String> format()Returns the value of theformatrecord component.final inthashCode()Returns a hash code value for this object.@Nullable IntegrationMetadataReturns the value of theintegrationMetadatarecord component.@Nullable Stringmessage()Returns the value of themessagerecord component.@Nullable ProxyDataConsumer<SafeDataOutputStream> proxy()Returns the value of theproxyrecord component.@NonNull Rangerange()Returns the value of therangerecord component.Returns the value of thereceiversrecord component.@NonNull StringresolveFormat(FPlayer fPlayer, L localization) @Nullable net.kyori.adventure.text.minimessage.tag.resolver.TagResolver[]resolveTags(FPlayer fPlayer) @NonNull FEntitysender()Returns the value of thesenderrecord component.@Nullable org.apache.commons.lang3.tuple.Pair<Sound, PermissionSetting> sound()Returns the value of thesoundrecord component.Returns the value of thetagResolversrecord component.final StringtoString()Returns a string representation of this record class.@NonNull UUIDuuid()Returns the value of theuuidrecord component.withBase(BaseEventMetadata<L> baseEventMetadata) withDestination(@NonNull Destination destination) withFilter(@NonNull Predicate<FPlayer> filter) withFlags(@NonNull Map<MessageFlag, Boolean> flags) withFormat(@NonNull BiFunction<FPlayer, L, String> format) withIntegrationMetadata(@Nullable IntegrationMetadata integrationMetadata) withMessage(@Nullable String message) withProxy(@Nullable ProxyDataConsumer<SafeDataOutputStream> proxy) withReceivers(@NonNull List<FPlayer> receivers) withSender(@NonNull FEntity sender) withSound(@Nullable org.apache.commons.lang3.tuple.Pair<Sound, PermissionSetting> sound) withTagResolvers(@Nullable Function<FPlayer, net.kyori.adventure.text.minimessage.tag.resolver.TagResolver[]> tagResolvers)
-
Constructor Details
-
BaseEventMetadata
public BaseEventMetadata(@NonNull UUID uuid, @NonNull FEntity sender, @NonNull Predicate<FPlayer> filter, @NonNull Map<MessageFlag, Boolean> flags, @NonNull BiFunction<FPlayer, L, String> format, @NonNull Destination destination, @NonNull Range range, @Nullable org.apache.commons.lang3.tuple.Pair<Sound, PermissionSetting> sound, @Nullable String message, @Nullable Function<FPlayer, net.kyori.adventure.text.minimessage.tag.resolver.TagResolver[]> tagResolvers, @Nullable ProxyDataConsumer<SafeDataOutputStream> proxy, @Nullable IntegrationMetadata integrationMetadata, @NonNull List<FPlayer> receivers) Creates an instance of aBaseEventMetadatarecord class.- Parameters:
uuid- the value for theuuidrecord componentsender- the value for thesenderrecord componentfilter- the value for thefilterrecord componentflags- the value for theflagsrecord componentformat- the value for theformatrecord componentdestination- the value for thedestinationrecord componentrange- the value for therangerecord componentsound- the value for thesoundrecord componentmessage- the value for themessagerecord componenttagResolvers- the value for thetagResolversrecord componentproxy- the value for theproxyrecord componentintegrationMetadata- the value for theintegrationMetadatarecord componentreceivers- the value for thereceiversrecord component
-
-
Method Details
-
base
- Specified by:
basein interfaceEventMetadata<L extends LocalizationSetting>
-
withBase
- Specified by:
withBasein interfaceEventMetadata<L extends LocalizationSetting>
-
resolveTags
public @Nullable net.kyori.adventure.text.minimessage.tag.resolver.TagResolver[] resolveTags(FPlayer fPlayer) - Specified by:
resolveTagsin interfaceEventMetadata<L extends LocalizationSetting>
-
resolveFormat
- Specified by:
resolveFormatin interfaceEventMetadata<L extends LocalizationSetting>
-
builder
public static <L extends LocalizationSetting> BaseEventMetadata.BaseEventMetadataBuilder<L> builder() -
withUuid
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withSender
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withFilter
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withFlags
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withFormat
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withDestination
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withRange
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withSound
public BaseEventMetadata<L> withSound(@Nullable org.apache.commons.lang3.tuple.Pair<Sound, PermissionSetting> sound) - Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withMessage
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withTagResolvers
public BaseEventMetadata<L> withTagResolvers(@Nullable Function<FPlayer, net.kyori.adventure.text.minimessage.tag.resolver.TagResolver[]> tagResolvers) - Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withProxy
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withIntegrationMetadata
public BaseEventMetadata<L> withIntegrationMetadata(@Nullable IntegrationMetadata integrationMetadata) - Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withReceivers
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
uuid
Returns the value of theuuidrecord component.- Specified by:
uuidin interfaceEventMetadata<L extends LocalizationSetting>- Returns:
- the value of the
uuidrecord component
-
sender
Returns the value of thesenderrecord component.- Specified by:
senderin interfaceEventMetadata<L extends LocalizationSetting>- Returns:
- the value of the
senderrecord component
-
filter
Returns the value of thefilterrecord component.- Specified by:
filterin interfaceEventMetadata<L extends LocalizationSetting>- Returns:
- the value of the
filterrecord component
-
flags
Returns the value of theflagsrecord component.- Specified by:
flagsin interfaceEventMetadata<L extends LocalizationSetting>- Returns:
- the value of the
flagsrecord component
-
format
Returns the value of theformatrecord component.- Specified by:
formatin interfaceEventMetadata<L extends LocalizationSetting>- Returns:
- the value of the
formatrecord component
-
destination
Returns the value of thedestinationrecord component.- Specified by:
destinationin interfaceEventMetadata<L extends LocalizationSetting>- Returns:
- the value of the
destinationrecord component
-
range
Returns the value of therangerecord component.- Specified by:
rangein interfaceEventMetadata<L extends LocalizationSetting>- Returns:
- the value of the
rangerecord component
-
sound
Returns the value of thesoundrecord component.- Specified by:
soundin interfaceEventMetadata<L extends LocalizationSetting>- Returns:
- the value of the
soundrecord component
-
message
Returns the value of themessagerecord component.- Specified by:
messagein interfaceEventMetadata<L extends LocalizationSetting>- Returns:
- the value of the
messagerecord component
-
tagResolvers
public @Nullable Function<FPlayer, net.kyori.adventure.text.minimessage.tag.resolver.TagResolver[]> tagResolvers()Returns the value of thetagResolversrecord component.- Specified by:
tagResolversin interfaceEventMetadata<L extends LocalizationSetting>- Returns:
- the value of the
tagResolversrecord component
-
proxy
Returns the value of theproxyrecord component.- Specified by:
proxyin interfaceEventMetadata<L extends LocalizationSetting>- Returns:
- the value of the
proxyrecord component
-
integrationMetadata
Returns the value of theintegrationMetadatarecord component.- Specified by:
integrationMetadatain interfaceEventMetadata<L extends LocalizationSetting>- Returns:
- the value of the
integrationMetadatarecord component
-
receivers
Returns the value of thereceiversrecord component.- Specified by:
receiversin interfaceEventMetadata<L extends LocalizationSetting>- Returns:
- the value of the
receiversrecord component
-