Record Class MessageSendEvent
java.lang.Object
java.lang.Record
net.flectone.pulse.model.event.message.MessageSendEvent
- All Implemented Interfaces:
Event
public record MessageSendEvent(boolean cancelled, ModuleName moduleName, FEntity sender, FPlayer receiver, net.kyori.adventure.text.Component message, net.kyori.adventure.text.Component submessage, EventMetadata<?> eventMetadata)
extends Record
implements Event
-
Nested Class Summary
Nested classes/interfaces inherited from interface Event
Event.Priority -
Constructor Summary
ConstructorsConstructorDescriptionMessageSendEvent(boolean cancelled, ModuleName moduleName, FEntity sender, FPlayer receiver, net.kyori.adventure.text.Component message, net.kyori.adventure.text.Component submessage, EventMetadata<?> eventMetadata) Creates an instance of aMessageSendEventrecord class.MessageSendEvent(ModuleName moduleName, FPlayer sender, net.kyori.adventure.text.Component message) MessageSendEvent(ModuleName moduleName, FPlayer receiver, net.kyori.adventure.text.Component message, net.kyori.adventure.text.Component submessage, EventMetadata<?> eventMetadata) -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of thecancelledrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theeventMetadatarecord component.final inthashCode()Returns a hash code value for this object.net.kyori.adventure.text.Componentmessage()Returns the value of themessagerecord component.Returns the value of themoduleNamerecord component.receiver()Returns the value of thereceiverrecord component.sender()Returns the value of thesenderrecord component.net.kyori.adventure.text.ComponentReturns the value of thesubmessagerecord component.final StringtoString()Returns a string representation of this record class.withCancelled(boolean cancelled) withEventMetadata(EventMetadata<?> eventMetadata) withMessage(net.kyori.adventure.text.Component message) withModuleName(ModuleName moduleName) withReceiver(FPlayer receiver) withSender(FEntity sender) withSubmessage(net.kyori.adventure.text.Component submessage)
-
Constructor Details
-
MessageSendEvent
public MessageSendEvent(ModuleName moduleName, FPlayer receiver, net.kyori.adventure.text.Component message, net.kyori.adventure.text.Component submessage, EventMetadata<?> eventMetadata) -
MessageSendEvent
public MessageSendEvent(ModuleName moduleName, FPlayer sender, net.kyori.adventure.text.Component message) -
MessageSendEvent
public MessageSendEvent(boolean cancelled, ModuleName moduleName, FEntity sender, FPlayer receiver, net.kyori.adventure.text.Component message, net.kyori.adventure.text.Component submessage, EventMetadata<?> eventMetadata) Creates an instance of aMessageSendEventrecord class.- Parameters:
cancelled- the value for thecancelledrecord componentmoduleName- the value for themoduleNamerecord componentsender- the value for thesenderrecord componentreceiver- the value for thereceiverrecord componentmessage- the value for themessagerecord componentsubmessage- the value for thesubmessagerecord componenteventMetadata- the value for theeventMetadatarecord component
-
-
Method Details
-
withCancelled
- Specified by:
withCancelledin interfaceEvent- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withModuleName
- 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).
-
withMessage
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withSubmessage
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withEventMetadata
- 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
cancelled
-
moduleName
Returns the value of themoduleNamerecord component.- Returns:
- the value of the
moduleNamerecord 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
-
message
public net.kyori.adventure.text.Component message()Returns the value of themessagerecord component.- Returns:
- the value of the
messagerecord component
-
submessage
public net.kyori.adventure.text.Component submessage()Returns the value of thesubmessagerecord component.- Returns:
- the value of the
submessagerecord component
-
eventMetadata
Returns the value of theeventMetadatarecord component.- Returns:
- the value of the
eventMetadatarecord component
-