Record Class PlayerQuitEvent
java.lang.Object
java.lang.Record
net.flectone.pulse.model.event.player.PlayerQuitEvent
- All Implemented Interfaces:
Event, PlayerEvent
public record PlayerQuitEvent(boolean cancelled, FPlayer player)
extends Record
implements PlayerEvent
-
Nested Class Summary
Nested classes/interfaces inherited from interface Event
Event.Priority -
Constructor Summary
ConstructorsConstructorDescriptionPlayerQuitEvent(boolean cancelled, FPlayer player) Creates an instance of aPlayerQuitEventrecord class.PlayerQuitEvent(FPlayer player) -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of thecancelledrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.player()Returns the value of theplayerrecord component.final StringtoString()Returns a string representation of this record class.withCancelled(boolean cancelled) withPlayer(FPlayer player)
-
Constructor Details
-
PlayerQuitEvent
-
PlayerQuitEvent
Creates an instance of aPlayerQuitEventrecord class.- Parameters:
cancelled- the value for thecancelledrecord componentplayer- the value for theplayerrecord 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).
-
withPlayer
- Specified by:
withPlayerin interfacePlayerEvent- 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.- Specified by:
playerin interfacePlayerEvent- Returns:
- the value of the
playerrecord component
-