Record Class MessageReceiveEvent
java.lang.Object
java.lang.Record
net.flectone.pulse.model.event.message.MessageReceiveEvent
- All Implemented Interfaces:
Event
-
Nested Class Summary
Nested classes/interfaces inherited from interface Event
Event.Priority -
Constructor Summary
ConstructorsConstructorDescriptionMessageReceiveEvent(boolean cancelled, FPlayer player, net.kyori.adventure.text.Component component, boolean overlay) Creates an instance of aMessageReceiveEventrecord class.MessageReceiveEvent(FPlayer fPlayer, net.kyori.adventure.text.Component component, boolean overlay) -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of thecancelledrecord component.net.kyori.adventure.text.ComponentReturns the value of thecomponentrecord component.final booleanIndicates whether some other object is "equal to" this one.net.kyori.adventure.text.TranslatableComponentfinal inthashCode()Returns a hash code value for this object.booleanoverlay()Returns the value of theoverlayrecord component.player()Returns the value of theplayerrecord component.final StringtoString()Returns a string representation of this record class.withCancelled(boolean cancelled) withComponent(net.kyori.adventure.text.Component component) withOverlay(boolean overlay) withPlayer(FPlayer player)
-
Constructor Details
-
MessageReceiveEvent
public MessageReceiveEvent(FPlayer fPlayer, net.kyori.adventure.text.Component component, boolean overlay) -
MessageReceiveEvent
public MessageReceiveEvent(boolean cancelled, FPlayer player, net.kyori.adventure.text.Component component, boolean overlay) Creates an instance of aMessageReceiveEventrecord class.- Parameters:
cancelled- the value for thecancelledrecord componentplayer- the value for theplayerrecord componentcomponent- the value for thecomponentrecord componentoverlay- the value for theoverlayrecord component
-
-
Method Details
-
getTranslatableComponent
public net.kyori.adventure.text.TranslatableComponent getTranslatableComponent() -
withCancelled
- Specified by:
withCancelledin interfaceEvent- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withPlayer
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withComponent
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withOverlay
- 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
-
player
Returns the value of theplayerrecord component.- Returns:
- the value of the
playerrecord component
-
component
public net.kyori.adventure.text.Component component()Returns the value of thecomponentrecord component.- Returns:
- the value of the
componentrecord component
-
overlay
public boolean overlay()Returns the value of theoverlayrecord component.- Returns:
- the value of the
overlayrecord component
-