Class endstone::BanEntry¶
ClassList > endstone > BanEntry
A single entry from a ban list.
#include <endstone/ban/ban_entry.h>
Inherited by the following classes: endstone::IpBanEntry, endstone::PlayerBanEntry
Public Types¶
Type | Name |
---|---|
typedef std::chrono::system_clock::time_point | Date |
Public Static Attributes¶
Type | Name |
---|---|
const std::string | DateFormat = = "%FT%T%Ez" |
Public Functions¶
Type | Name |
---|---|
Date | getCreated () const Gets the date this ban entry was created. |
std::optional< Date > | getExpiration () const Gets the date this ban expires on, or std::nullopt for no defined end date. |
std::string | getReason () const Gets the reason for this ban. |
std::string | getSource () const Gets the source of this ban. |
void | setCreated (Date created) Sets the date this ban entry was created. |
void | setExpiration (std::optional< Date > expiration) Sets the date this ban expires on. std::nullopt values are considered "infinite" bans. |
void | setReason (std::string reason) Sets the reason for this ban. |
void | setSource (std::string source) Sets the source of this ban. |
Public Types Documentation¶
typedef Date¶
Public Static Attributes Documentation¶
variable DateFormat¶
Public Functions Documentation¶
function getCreated¶
Gets the date this ban entry was created.
Returns:
the creation date
function getExpiration¶
Gets the date this ban expires on, or std::nullopt for no defined end date.
Returns:
the expiration date
function getReason¶
Gets the reason for this ban.
Returns:
the ban reason
function getSource¶
Gets the source of this ban.
Returns:
the source of the ban
function setCreated¶
Sets the date this ban entry was created.
Parameters:
created
the new created date
See also: save() saving changes
function setExpiration¶
Sets the date this ban expires on. std::nullopt values are considered "infinite" bans.
Parameters:
expiration
the new expiration date, or std::nullopt to indicate an infinite ban
function setReason¶
Sets the reason for this ban.
Parameters:
reason
the new reason, empty values assume the implementation default
See also: save() saving changes
function setSource¶
Sets the source of this ban.
Parameters:
source
the new source
See also: save() saving changes
The documentation for this class was generated from the following file include/endstone/ban/ban_entry.h