Class BanManager
java.lang.Object
com.gamersafer.minecraft.auth.common.ban.BanManager
-
Constructor Summary
ConstructorsConstructorDescriptionBanManager(IBanStorage db, ReportLogManager reportLogManager, IntegrationManager integrationManager) -
Method Summary
Modifier and TypeMethodDescriptionbanUser(String organization, @Nullable String uniqueServerId, Date banTime, @Nullable Date endTime, @Nullable String guildMemberId, UUID playerUuid, String playerName, @Nullable String playerHostAddress, boolean ipBan, @Nullable String reporterGuildMemberId, UUID reporterPlayerUuid, String reporterPlayerName, Category category, boolean wasChildInvolved, String message) getBans(UserIdentity identity, @Nullable String guildMemberId) Gets all bans associated with the given user identity.Gets all bans associated with the given guild member id.getSignificantActiveBan(UserIdentity identity, @Nullable String guildMemberId) Gets the most recent and relevant active ban.importBans(List<Ban> bans) isUserBanned(UserIdentity identity, @Nullable String guildMemberId) Checks whether the given used is banned.isUserBanned(UserIdentity identity, @Nullable String guildMemberId, boolean excludeIpBans) Checks whether the given user is banned.isUserIpBanned(UserIdentity identity, @Nullable String guildMemberId) Checks whether the given used is IP-banned.voidshutdown()Waits for the background saving task to finish.unbanIpUser(String organization, @Nullable String uniqueServerId, Date unbanTime, @Nullable String guildMemberId, UUID playerUuid, String playerName, @NonNull String playerHostAddress, @Nullable String reporterGuildMemberId, UUID reporterPlayerUuid, String reporterPlayerName, String message) unbanUser(String organization, @Nullable String uniqueServerId, Date unbanTime, @Nullable String guildMemberId, UUID playerUuid, String playerName, @Nullable String reporterGuildMemberId, UUID reporterPlayerUuid, String reporterPlayerName, String message)
-
Constructor Details
-
BanManager
public BanManager(IBanStorage db, ReportLogManager reportLogManager, IntegrationManager integrationManager)
-
-
Method Details
-
banUser
public CompletableFuture<Ban> banUser(String organization, @Nullable String uniqueServerId, Date banTime, @Nullable Date endTime, @Nullable String guildMemberId, UUID playerUuid, String playerName, @Nullable String playerHostAddress, boolean ipBan, @Nullable String reporterGuildMemberId, UUID reporterPlayerUuid, String reporterPlayerName, Category category, boolean wasChildInvolved, String message) -
unbanUser
-
unbanIpUser
public CompletableFuture<Void> unbanIpUser(String organization, @Nullable String uniqueServerId, Date unbanTime, @Nullable String guildMemberId, UUID playerUuid, String playerName, @NonNull String playerHostAddress, @Nullable String reporterGuildMemberId, UUID reporterPlayerUuid, String reporterPlayerName, String message) -
getBans
Gets all bans associated with the given guild member id. NOTE: this might not return IP punishments. SeegetBans(UserIdentity, String)- Parameters:
guildMemberId- the guild member id- Returns:
- the bans associated with the given guild member id
-
shutdown
public void shutdown()Waits for the background saving task to finish. -
importBans