public interface BanProcessor
BanManager
basically delegates actions to a BanProcessor.
Modifier and Type | Method and Description |
---|---|
BanResult |
executeBan(Ban ban)
Executes the given ban.
|
@Nullable Ban |
getActiveBan(UUID playerId) |
List<Ban> |
getActiveBanOnSameIP(String ip)
Get all active ban on the same IP
|
List<Ban> |
getAllBans()
Get all current ban.
|
List<String> |
getDescription()
Get the description of the processor, including what's not available with this
|
List<Ban> |
getLoggedBans(UUID playerId)
Get revoked ban of the specified player
Don't include active one
|
String |
getName()
Get the name of the processor
|
default boolean |
isBanned(UUID playerId) |
default boolean |
isHandledByNegativity() |
BanResult |
revokeBan(UUID playerId)
Revokes the active ban of the player identified by the given UUID.
|
BanResult executeBan(Ban ban)
The ban may not be executed for any processor-specific reason.
ban
- the ban to executeBanResult revokeBan(UUID playerId)
The revocation may fail for any processor-specific reason.
If the revocation was successful a LoggedBan must always be returned, even if it will not persist in any way.
playerId
- the UUID of the player to unbannull
if the revocation failed.default boolean isBanned(UUID playerId)
List<Ban> getLoggedBans(UUID playerId)
playerId
- the UUID of the player to get logged banList<Ban> getActiveBanOnSameIP(String ip)
ip
- the IP where we are looking for banString getName()
List<String> getDescription()
default boolean isHandledByNegativity()
false
if bans are handled by another plugin.