Record Class PlayerDisconnectedEvent
java.lang.Object
java.lang.Record
com.zenith.event.player.PlayerDisconnectedEvent
public record PlayerDisconnectedEvent(@Nullable String reason, ServerSession session, @Nullable GameProfile clientGameProfile)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionPlayerDisconnectedEvent(@Nullable String reason, ServerSession session, @Nullable GameProfile clientGameProfile) Creates an instance of aPlayerDisconnectedEventrecord class.PlayerDisconnectedEvent(String reason, ServerSession session) -
Method Summary
Modifier and TypeMethodDescription@Nullable GameProfileReturns the value of theclientGameProfilerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@Nullable Stringreason()Returns the value of thereasonrecord component.session()Returns the value of thesessionrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PlayerDisconnectedEvent
-
PlayerDisconnectedEvent
public PlayerDisconnectedEvent(@Nullable String reason, ServerSession session, @Nullable GameProfile clientGameProfile) Creates an instance of aPlayerDisconnectedEventrecord class.- Parameters:
reason- the value for thereasonrecord componentsession- the value for thesessionrecord componentclientGameProfile- the value for theclientGameProfilerecord component
-
-
Method Details
-
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). -
reason
Returns the value of thereasonrecord component.- Returns:
- the value of the
reasonrecord component
-
session
Returns the value of thesessionrecord component.- Returns:
- the value of the
sessionrecord component
-
clientGameProfile
Returns the value of theclientGameProfilerecord component.- Returns:
- the value of the
clientGameProfilerecord component
-