Record Class BanDetails
java.lang.Object
java.lang.Record
com.mojang.authlib.minecraft.BanDetails
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final InstantThe field for theexpiresrecord component.private final UUIDThe field for theidrecord component.static final Stringprivate final StringThe field for thereasonrecord component.private final StringThe field for thereasonMessagerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionBanDetails(UUID id, Instant expires, String reason, String reasonMessage) Creates an instance of aBanDetailsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.expires()Returns the value of theexpiresrecord component.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.reason()Returns the value of thereasonrecord component.Returns the value of thereasonMessagerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
id
The field for theidrecord component. -
expires
The field for theexpiresrecord component. -
reason
The field for thereasonrecord component. -
reasonMessage
The field for thereasonMessagerecord component. -
MULTIPLAYER_SCOPE
- See Also:
-
-
Constructor Details
-
BanDetails
public BanDetails(UUID id, @Nullable Instant expires, @Nullable String reason, @Nullable String reasonMessage) Creates an instance of aBanDetailsrecord class.- Parameters:
id- the value for theidrecord componentexpires- the value for theexpiresrecord componentreason- the value for thereasonrecord componentreasonMessage- the value for thereasonMessagerecord 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). -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
expires
Returns the value of theexpiresrecord component.- Returns:
- the value of the
expiresrecord component
-
reason
Returns the value of thereasonrecord component.- Returns:
- the value of the
reasonrecord component
-
reasonMessage
Returns the value of thereasonMessagerecord component.- Returns:
- the value of the
reasonMessagerecord component
-