Skip to content

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

using endstone::BanEntry::Date =  std::chrono::system_clock::time_point;

Public Static Attributes Documentation

variable DateFormat

const std::string endstone::BanEntry::DateFormat;

Public Functions Documentation

function getCreated

Gets the date this ban entry was created.

inline Date endstone::BanEntry::getCreated () const

Returns:

the creation date


function getExpiration

Gets the date this ban expires on, or std::nullopt for no defined end date.

inline std::optional< Date > endstone::BanEntry::getExpiration () const

Returns:

the expiration date


function getReason

Gets the reason for this ban.

inline std::string endstone::BanEntry::getReason () const

Returns:

the ban reason


function getSource

Gets the source of this ban.

inline std::string endstone::BanEntry::getSource () const

Returns:

the source of the ban


function setCreated

Sets the date this ban entry was created.

inline void endstone::BanEntry::setCreated (
    Date 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.

inline void endstone::BanEntry::setExpiration (
    std::optional< Date > expiration
) 

Parameters:

  • expiration the new expiration date, or std::nullopt to indicate an infinite ban

function setReason

Sets the reason for this ban.

inline void endstone::BanEntry::setReason (
    std::string reason
) 

Parameters:

  • reason the new reason, empty values assume the implementation default

See also: save() saving changes


function setSource

Sets the source of this ban.

inline void endstone::BanEntry::setSource (
    std::string source
) 

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