Skip to Content
⚠ Under Construction

endstone.ban

Classes:

NameDescription
IpBanEntryRepresents a ban entry for an IP address.
IpBanListRepresents a ban list containing banned IP addresses.
PlayerBanEntryRepresents a ban entry for a player.
PlayerBanListRepresents a ban list containing banned players.

IpBanEntry

IpBanEntry(address:str)

Bases: BanEntry

Represents a ban entry for an IP address.

Attributes:

NameTypeDescription
addressstrGets the banned IP address.

address

address: str

Gets the banned IP address.

IpBanList

Represents a ban list containing banned IP addresses.

Methods:

NameDescription
add_banAdds a ban to this list, or updates an existing one.
get_ban_entryGets a BanEntry by IP address.
is_bannedChecks if a BanEntry exists for the target by IP address.
remove_banRemoves an IP address from the ban list.

Attributes:

NameTypeDescription
entrieslist[IpBanEntry]Gets a vector of pointers to entries in the ban list.

entries

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.

get_ban_entry

get_ban_entry(address:str) -> IpBanEntry

Gets a BanEntry by IP address.

is_banned

is_banned(address:str) -> bool

Checks if a BanEntry exists for the target by IP address.

remove_ban

remove_ban(address:str) -> None

Removes an IP address from the ban list.

PlayerBanEntry

PlayerBanEntry(name:str, uuid:UUID | None = None, xuid:str | None = None)

Bases: BanEntry

Represents a ban entry for a player.

Attributes:

NameTypeDescription
namestrGets the banned player’s name.
unique_idUUID | NoneGets the banned player’s unique ID, or None if not available.
xuidstr | NoneGets the banned player’s Xbox user ID (XUID), or None if not available.

name

name: str

Gets the banned player’s name.

unique_id

unique_id: uuid.UUID | None

Gets the banned player’s unique ID, or None if not available.

xuid

xuid: str | None

Gets the banned player’s Xbox user ID (XUID), or None if not available.

PlayerBanList

Represents a ban list containing banned players.

Methods:

NameDescription
add_banAdds a ban to this list, or updates an existing one.
get_ban_entryGets a BanEntry by player name, UUID, or XUID.
is_bannedChecks if a BanEntry exists for the target by name, UUID, or XUID.
remove_banRemoves a player from the ban list by name, UUID, or XUID.

Attributes:

NameTypeDescription
entrieslist[PlayerBanEntry]Gets a vector of pointers to entries in the ban list.

entries

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

is_banned(name:str, uuid:UUID | None = None, xuid:str | None = None) -> bool

Checks if a BanEntry exists for the target by name, UUID, or XUID.

remove_ban

remove_ban(name:str, uuid:UUID | None = None, xuid:str | None = None) -> None

Removes a player from the ban list by name, UUID, or XUID.

Last updated on