public class CommandBanProcessor extends Object implements BanProcessor
Constructor and Description |
---|
CommandBanProcessor(List<String> banCommands,
List<String> unbanCommands) |
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
|
BanResult |
revokeBan(UUID playerId)
Revokes the active ban of the player identified by the given UUID.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isBanned, isHandledByNegativity
public BanResult executeBan(Ban ban)
BanProcessor
The ban may not be executed for any processor-specific reason.
executeBan
in interface BanProcessor
ban
- the ban to executepublic BanResult revokeBan(UUID playerId)
BanProcessor
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.
revokeBan
in interface BanProcessor
playerId
- the UUID of the player to unbannull
if the revocation failed.public @Nullable Ban getActiveBan(UUID playerId)
getActiveBan
in interface BanProcessor
public List<Ban> getLoggedBans(UUID playerId)
BanProcessor
getLoggedBans
in interface BanProcessor
playerId
- the UUID of the player to get logged banpublic List<Ban> getActiveBanOnSameIP(String ip)
BanProcessor
getActiveBanOnSameIP
in interface BanProcessor
ip
- the IP where we are looking for banpublic List<Ban> getAllBans()
BanProcessor
getAllBans
in interface BanProcessor
public String getName()
BanProcessor
getName
in interface BanProcessor
public List<String> getDescription()
BanProcessor
getDescription
in interface BanProcessor