Ban
endstone.ban ¶
Classes relevant to bans.
Classes:
| Name | Description |
|---|---|
BanEntry |
A single entry from a ban list. |
IpBanEntry |
Represents a ban entry for an IP address. |
IpBanList |
Represents a ban list containing banned IP addresses. |
PlayerBanEntry |
Represents a ban entry for a player. |
PlayerBanList |
Represents a ban list containing banned players. |
BanEntry ¶
A single entry from a ban list.
Attributes:
| Name | Type | Description |
|---|---|---|
created |
datetime
|
Gets or sets the date this ban entry was created. |
expiration |
datetime | None
|
Gets or sets the date this ban expires on. |
reason |
str
|
Gets or sets the reason for this ban. |
source |
str
|
Gets or sets the source of this ban. |
IpBanList ¶
Represents a ban list containing banned IP addresses.
Methods:
| Name | Description |
|---|---|
add_ban |
Adds a ban to this list, or updates an existing one. |
get_ban_entry |
Gets a BanEntry by IP address. |
is_banned |
Checks if a BanEntry exists for the target by IP address. |
remove_ban |
Removes an IP address from the ban list. |
Attributes:
| Name | Type | Description |
|---|---|---|
entries |
list[IpBanEntry]
|
Gets a vector of pointers to entries in the ban list. |
entries
property
¶
entries: list [IpBanEntry ]
Gets a vector of pointers to entries in the ban list.
add_ban ¶
add_ban(
address: str ,
reason: str | None = None,
expires: datetime | None = None,
source: str | None = None,
) -> IpBanEntry
Adds a ban to this list, or updates an existing one.
is_banned ¶
Checks if a BanEntry exists for the target by IP address.
PlayerBanEntry ¶
PlayerBanList ¶
Represents a ban list containing banned players.
Methods:
| Name | Description |
|---|---|
add_ban |
Adds a ban to this list, or updates an existing one. |
get_ban_entry |
Gets a BanEntry by player name, UUID, or XUID. |
is_banned |
Checks if a BanEntry exists for the target by name, UUID, or XUID. |
remove_ban |
Removes a player from the ban list by name, UUID, or XUID. |
Attributes:
| Name | Type | Description |
|---|---|---|
entries |
list[PlayerBanEntry]
|
Gets a vector of pointers to entries in the ban list. |
entries
property
¶
entries: list [PlayerBanEntry ]
Gets a vector of pointers to entries in the ban list.
add_ban ¶
add_ban(
name: str ,
uuid: UUID | None = None,
xuid: str | None = None,
reason: str | None = None,
expires: datetime | None = None,
source: str | None = None,
) -> PlayerBanEntry
Adds a ban to this list, or updates an existing one.
get_ban_entry ¶
get_ban_entry(
name: str ,
uuid: UUID | None = None,
xuid: str | None = None,
) -> PlayerBanEntry
Gets a BanEntry by player name, UUID, or XUID.
is_banned ¶
Checks if a BanEntry exists for the target by name, UUID, or XUID.