Record Class PlayerAttributes.Ban
java.lang.Object
java.lang.Record
lol.trq.alts.account.PlayerAttributes.Ban
- Record Components:
banId- the ban's idexpires- when the ban lifts, ornullfor a ban with no stated endreason- the service's reason codereasonMessage- the service's human-readable reason, when it gave one
- Enclosing class:
PlayerAttributes
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether the ban is in force at the given instant.banId()Returns the value of thebanIdrecord component.final 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.booleanReturns whether the ban has no stated end.reason()Returns the value of thereasonrecord component.Returns the value of thereasonMessagerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Ban
Creates an instance of aBanrecord class.- Parameters:
banId- the value for thebanIdrecord componentexpires- the value for theexpiresrecord componentreason- the value for thereasonrecord componentreasonMessage- the value for thereasonMessagerecord component
-
-
Method Details
-
permanent
public boolean permanent()Returns whether the ban has no stated end.- Returns:
- true if no expiry was given
- Since:
- 0.12.0
-
activeAt
Returns whether the ban is in force at the given instant.- Parameters:
now- the instant to measure against- Returns:
- true if the ban is permanent or has not yet expired
- Since:
- 0.12.0
-
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). -
banId
-
expires
-
reason
-
reasonMessage
Returns the value of thereasonMessagerecord component.- Returns:
- the value of the
reasonMessagerecord component
-