Class BanManager
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.BanTypeType of the ban (UserID/IP).
id
stringThe UserID or IP address to ban.
reason
stringThe ban reason.
duration
doubleDuration in seconds.
issuer
stringThe 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.BanTypeType of the ban (UserID/IP).
id
stringThe UserID or IP address to ban.
reason
stringThe ban reason.
duration
TimeSpanA TimeSpanrepresenting the duration.
issuer
stringThe 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.BanTypeType of the ban (UserID/IP).
id
stringThe UserID or IP address to ban.