Interface BanEntry
- All Known Implementing Classes:
BanEntry.Address, BanEntry.Profile
Represents a ban.
- Since:
- 0.1.0
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordA ban on a client address.static final recordA ban on a player identity. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final DateTimeFormatterThe format of the dates stored in the ban lists, in the system time zone. -
Method Summary
Modifier and TypeMethodDescriptioncreated()Gets when the ban was issued.default StringGets when the ban was issued, as a readable date.Gets why the target is banned.default booleanexpired()Checks whether the expiry has already passed.expires()Gets when the ban lifts.default StringGets when the ban lifts, as a readable date.label()Gets the label for what the ban applies to.name()Gets the name recorded for display, which is the last known name of the player the ban was issued against.default booleanChecks whether this ban never lifts on its own.reason()Gets why the target is banned.Gets how long is left before the ban lifts.source()Gets who issued the ban.
-
Field Details
-
FORMAT
The format of the dates stored in the ban lists, in the system time zone.- Since:
- 0.1.0
-
-
Method Details
-
name
-
reason
-
source
Gets who issued the ban.This is an identity rather than a name, so an issuer who later changes name is still the same issuer. A ban the server itself issued has no identity to record.
- Returns:
- the identity of the issuer, or
nullwhen the server issued the ban - Since:
- 0.1.0
-
created
-
expires
-
label
-
permanent
-
expired
Checks whether the expiry has already passed.An expired entry is not an active ban. A
BanManageris expected to stop reporting it, and may discard it.- Returns:
truewhen the ban has run out- Since:
- 0.1.0
-
remaining
Gets how long is left before the ban lifts.- Returns:
- the remaining time, or empty for a permanent ban;
Duration.ZEROonce the expiry has passed - Since:
- 0.1.0
-
describeReason
-
createdLabel
-
expiresLabel
-