Record Class BanInfo
java.lang.Object
java.lang.Record
lol.trq.alts.model.BanInfo
- Record Components:
banned- whether the account is currently considered bannedobservedAt- the epoch-millis the ban was observedsource- how it was observed — e.g."self"(banned while playing) or"login"detail- the ban message or reason, if one was capturedobservedBy- the member id (Ed25519 identity) that witnessed the ban in a shared repo, ornullwhen observed locally / unattributed
public record BanInfo(boolean banned, long observedAt, String source, String detail, String observedBy)
extends Record
A locally-observed ban record for an account on one server. Servers expose no ban-status API, so this
is not a lookup — it is set when the client witnesses a ban: the player gets banned while on
this account, or logs into an account already flagged. Stored per server in
AltAccount's
bans map (keyed by server id), so the row can show which servers burned it, and shared into a
repository so members coordinate.- Since:
- 0.1.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbanned()Returns the value of thebannedrecord component.detail()Returns the value of thedetailrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static BanInfoCreates a ban record stamped at the current time, unattributed.static BanInfoCreates a ban record stamped at the current time, attributed to the observing member.longReturns the value of theobservedAtrecord component.Returns the value of theobservedByrecord component.source()Returns the value of thesourcerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
BanInfo
Creates an instance of aBanInforecord class.- Parameters:
banned- the value for thebannedrecord componentobservedAt- the value for theobservedAtrecord componentsource- the value for thesourcerecord componentdetail- the value for thedetailrecord componentobservedBy- the value for theobservedByrecord component
-
-
Method Details
-
observed
-
observed
Creates a ban record stamped at the current time, attributed to the observing member.- Parameters:
source- how the ban was observeddetail- the ban message or reason, ornullbyMember- the member id (Ed25519 identity) that witnessed the ban, ornull- Returns:
- a
bannedrecord stamped now, attributed tobyMember - Since:
- 0.1.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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
banned
-
observedAt
@SerializedName("observedAt") public long observedAt()Returns the value of theobservedAtrecord component.- Returns:
- the value of the
observedAtrecord component
-
source
-
detail
-
observedBy
Returns the value of theobservedByrecord component.- Returns:
- the value of the
observedByrecord component
-