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
banTypeBanHandler.BanTypeType of the ban (UserID/IP).
idstringThe UserID or IP address to ban.
reasonstringThe ban reason.
durationdoubleDuration in seconds.
issuerstringThe 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
banTypeBanHandler.BanTypeType of the ban (UserID/IP).
idstringThe UserID or IP address to ban.
reasonstringThe ban reason.
durationTimeSpanA TimeSpanrepresenting the duration.
issuerstringThe 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
banTypeBanHandler.BanTypeType of the ban (UserID/IP).
idstringThe UserID or IP address to ban.