public class CommandWarnProcessor extends Object implements WarnProcessor
Constructor and Description |
---|
CommandWarnProcessor(List<String> warnCommands,
List<String> unWarnCommands) |
Modifier and Type | Method and Description |
---|---|
WarnResult |
executeWarn(Warn ban)
Executes the given warn.
|
List<Warn> |
getActiveWarnOnSameIP(String ip)
Get all active warn on the same IP
|
List<String> |
getDescription()
Get the description of the processor, including what's not available with this
|
String |
getName()
Get the name of the processor
|
List<Warn> |
getWarn(UUID playerId)
Get all warns of a given player
|
WarnResult |
revokeWarn(UUID playerId,
String revoker)
Revokes all active warns for the given player
The revocation may fail for any processor-specific reason.
|
WarnResult |
revokeWarn(Warn warn,
String revoker)
Revokes only given warn for the given player
The revocation may fail for any processor-specific reason.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
disable, enable, getActiveWarn, isWarned
public WarnResult executeWarn(Warn ban)
WarnProcessor
The warn may not be executed for any processor-specific reason.
executeWarn
in interface WarnProcessor
ban
- the warn to executepublic WarnResult revokeWarn(UUID playerId, String revoker)
WarnProcessor
The revocation may fail for any processor-specific reason.
If the revocation was successful a LoggedWarn must always be returned, even if it will not persist in any way.
revokeWarn
in interface WarnProcessor
playerId
- the UUID of the player to unwarnrevoker
- who revoke warnnull
if the revocation failed.public WarnResult revokeWarn(Warn warn, String revoker)
WarnProcessor
The revocation may fail for any processor-specific reason.
If the revocation was successful a LoggedWarn must always be returned, even if it will not persist in any way.
revokeWarn
in interface WarnProcessor
warn
- warn to removerevoker
- who revoke warnnull
if the revocation failed.public List<Warn> getWarn(UUID playerId)
WarnProcessor
getWarn
in interface WarnProcessor
playerId
- UUID of playerpublic List<Warn> getActiveWarnOnSameIP(String ip)
WarnProcessor
getActiveWarnOnSameIP
in interface WarnProcessor
ip
- the IP where we are looking for warnpublic String getName()
WarnProcessor
getName
in interface WarnProcessor
public List<String> getDescription()
WarnProcessor
getDescription
in interface WarnProcessor