Record Class MessageContext
java.lang.Object
java.lang.Record
net.flectone.pulse.model.event.message.context.MessageContext
public record MessageContext(@NonNull Map<MessageFlag, Boolean> flags, @NonNull net.kyori.adventure.text.minimessage.tag.resolver.TagResolver tagResolver, @NonNull FEntity sender, @NonNull FPlayer receiver, @NonNull UUID messageUUID, @NonNull String message, @Nullable String userMessage)
extends Record
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic class -
Constructor Summary
ConstructorsConstructorDescriptionMessageContext(@NonNull Map<MessageFlag, Boolean> flags, @NonNull net.kyori.adventure.text.minimessage.tag.resolver.TagResolver tagResolver, @NonNull FEntity sender, @NonNull FPlayer receiver, @NonNull UUID messageUUID, @NonNull String message, @Nullable String userMessage) Creates an instance of aMessageContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionaddFlag(@NonNull MessageFlag flag, boolean value) addFlags(MessageFlag @NonNull [] flags, boolean @NonNull [] values) addTagResolver(@Nullable net.kyori.adventure.text.minimessage.tag.resolver.TagResolver tagResolver) addTagResolvers(@NonNull net.kyori.adventure.text.minimessage.tag.resolver.TagResolver... resolvers) builder()final booleanIndicates whether some other object is "equal to" this one.@NonNull Map<MessageFlag, Boolean> flags()Returns the value of theflagsrecord component.final inthashCode()Returns a hash code value for this object.booleanisFlag(MessageFlag flag) @NonNull Stringmessage()Returns the value of themessagerecord component.@NonNull UUIDReturns the value of themessageUUIDrecord component.@NonNull FPlayerreceiver()Returns the value of thereceiverrecord component.@NonNull FEntitysender()Returns the value of thesenderrecord component.@NonNull net.kyori.adventure.text.minimessage.tag.resolver.TagResolverReturns the value of thetagResolverrecord component.final StringtoString()Returns a string representation of this record class.@Nullable StringReturns the value of theuserMessagerecord component.withFlags(@NonNull Map<MessageFlag, Boolean> flags) withMessage(@NonNull String message) withMessageUUID(@NonNull UUID messageUUID) withReceiver(@NonNull FPlayer receiver) withSender(@NonNull FEntity sender) withTagResolver(@NonNull net.kyori.adventure.text.minimessage.tag.resolver.TagResolver tagResolver) withUserMessage(@Nullable String userMessage)
-
Constructor Details
-
MessageContext
public MessageContext(@NonNull Map<MessageFlag, Boolean> flags, @NonNull net.kyori.adventure.text.minimessage.tag.resolver.TagResolver tagResolver, @NonNull FEntity sender, @NonNull FPlayer receiver, @NonNull UUID messageUUID, @NonNull String message, @Nullable String userMessage) Creates an instance of aMessageContextrecord class.- Parameters:
flags- the value for theflagsrecord componenttagResolver- the value for thetagResolverrecord componentsender- the value for thesenderrecord componentreceiver- the value for thereceiverrecord componentmessageUUID- the value for themessageUUIDrecord componentmessage- the value for themessagerecord componentuserMessage- the value for theuserMessagerecord component
-
-
Method Details
-
addFlag
-
addFlags
@CheckReturnValue public MessageContext addFlags(MessageFlag @NonNull [] flags, boolean @NonNull [] values) -
addTagResolver
@CheckReturnValue public MessageContext addTagResolver(@Nullable net.kyori.adventure.text.minimessage.tag.resolver.TagResolver tagResolver) -
addTagResolvers
@CheckReturnValue public MessageContext addTagResolvers(@NonNull net.kyori.adventure.text.minimessage.tag.resolver.TagResolver... resolvers) -
isFlag
-
createCacheKey
-
builder
-
toBuilder
-
withFlags
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withTagResolver
public MessageContext withTagResolver(@NonNull net.kyori.adventure.text.minimessage.tag.resolver.TagResolver tagResolver) - 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).
-
withReceiver
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withMessageUUID
- 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).
-
withUserMessage
- 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). -
flags
Returns the value of theflagsrecord component.- Returns:
- the value of the
flagsrecord component
-
tagResolver
public @NonNull net.kyori.adventure.text.minimessage.tag.resolver.TagResolver tagResolver()Returns the value of thetagResolverrecord component.- Returns:
- the value of the
tagResolverrecord component
-
sender
Returns the value of thesenderrecord component.- Returns:
- the value of the
senderrecord component
-
receiver
Returns the value of thereceiverrecord component.- Returns:
- the value of the
receiverrecord component
-
messageUUID
Returns the value of themessageUUIDrecord component.- Returns:
- the value of the
messageUUIDrecord component
-
message
Returns the value of themessagerecord component.- Returns:
- the value of the
messagerecord component
-
userMessage
Returns the value of theuserMessagerecord component.- Returns:
- the value of the
userMessagerecord component
-