Record Class FloodgateDataHandler.JoinResult
java.lang.Object
java.lang.Record
org.geysermc.floodgate.core.connection.FloodgateDataHandler.JoinResult
- Enclosing class:
- FloodgateDataHandler
public static record FloodgateDataHandler.JoinResult(FloodgateConnection connection, @MonotonicNonNull String disconnectReason)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionJoinResult(FloodgateConnection connection, @MonotonicNonNull String disconnectReason) Creates an instance of aJoinResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theconnectionrecord component.@MonotonicNonNull StringReturns the value of thedisconnectReasonrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanfinal StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
JoinResult
Creates an instance of aJoinResultrecord class.- Parameters:
connection- the value for theconnectionrecord componentdisconnectReason- the value for thedisconnectReasonrecord component
-
-
Method Details
-
shouldDisconnect
public boolean shouldDisconnect() -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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). -
connection
Returns the value of theconnectionrecord component.- Returns:
- the value of the
connectionrecord component
-
disconnectReason
Returns the value of thedisconnectReasonrecord component.- Returns:
- the value of the
disconnectReasonrecord component
-