endstone::BanEntry
A single entry from a ban list.
Types:
| Name | Description |
|---|---|
Date |
Attributes:
| Name | Description |
|---|---|
DateFormat |
Functions:
| Name | Description |
|---|---|
getCreated | Gets the date this ban entry was created. |
getExpiration | Gets the date this ban expires on, or std::nullopt for no defined end date. |
getReason | Gets the reason for this ban. |
getSource | Gets the source of this ban. |
setCreated | Sets the date this ban entry was created. |
setExpiration | Sets the date this ban expires on. std::nullopt values are considered “infinite” bans. |
setReason | Sets the reason for this ban. |
setSource | Sets the source of this ban. |
Date
using endstone::BanEntry::Date = std::chrono::system_clock::time_point; DateFormat
const std::string endstone::BanEntry::DateFormat; getCreated
Date getCreated() constGets the date this ban entry was created.
Returns:
the creation date
getExpiration
std::optional<Date> getExpiration() constGets the date this ban expires on, or std::nullopt for no defined end date.
Returns:
the expiration date
getReason
std::string getReason() constGets the reason for this ban.
Returns:
the ban reason
getSource
std::string getSource() constGets the source of this ban.
Returns:
the source of the ban
setCreated
void setCreated(Date created)Sets the date this ban entry was created.
Parameters:
createdthe new created date
See also: save() saving changes
setExpiration
void setExpiration(std::optional<Date> expiration)Sets the date this ban expires on. std::nullopt values are considered “infinite” bans.
Parameters:
expirationthe new expiration date, or std::nullopt to indicate an infinite ban
setReason
void setReason(std::string reason)Sets the reason for this ban.
Parameters:
reasonthe new reason, empty values assume the implementation default
See also: save() saving changes
setSource
void setSource(std::string source)Sets the source of this ban.
Parameters:
sourcethe new source
See also: save() saving changes
Last updated on