Table of Contents

Class BanManager

Namespace
Exiled.API.Features
Assembly
Exiled.API.dll

Useful class to manage player bans.

public static class BanManager
Inheritance
BanManager
Inherited Members

Methods

OfflineBanPlayer(BanType, string, string, double, string)

Bans an offline player.

public static bool OfflineBanPlayer(BanHandler.BanType banType, string id, string reason, double duration, string issuer = "SERVER CONSOLE")

Parameters

banType BanHandler.BanType

Type of the ban (UserID/IP).

id string

The UserID or IP address to ban.

reason string

The ban reason.

duration double

Duration in seconds.

issuer string

The Nickname of the ban issuer.

Returns

bool

Whether the ban was successful.

OfflineBanPlayer(BanType, string, string, TimeSpan, string)

Bans an offline player.

public static bool OfflineBanPlayer(BanHandler.BanType banType, string id, string reason, TimeSpan duration, string issuer = "SERVER CONSOLE")

Parameters

banType BanHandler.BanType

Type of the ban (UserID/IP).

id string

The UserID or IP address to ban.

reason string

The ban reason.

duration TimeSpan

A TimeSpanrepresenting the duration.

issuer string

The Nickname of the ban issuer.

Returns

bool

Whether the ban was successful.

UnbanPlayer(BanType, string)

Unbans a player.

public static void UnbanPlayer(BanHandler.BanType banType, string id)

Parameters

banType BanHandler.BanType

Type of the ban (UserID/IP).

id string

The UserID or IP address to ban.