public class NegativityDatabaseWarnProcessor extends Object implements WarnProcessor
| Constructor and Description |
|---|
NegativityDatabaseWarnProcessor() |
| Modifier and Type | Method and Description |
|---|---|
void |
enable()
Enable the given processor.
|
WarnResult |
executeWarn(Warn warn)
Executes the given warn.
|
List<Warn> |
getActiveWarn(UUID playerId)
Get all active warns of a given player
|
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
|
boolean |
isWarned(UUID playerId)
Check if the player is warned with an active one
|
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, waitdisablepublic void enable()
WarnProcessorenable in interface WarnProcessorpublic WarnResult executeWarn(Warn warn)
WarnProcessorThe warn may not be executed for any processor-specific reason.
executeWarn in interface WarnProcessorwarn - the warn to executepublic WarnResult revokeWarn(UUID playerId, String revoker)
WarnProcessorThe 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 WarnProcessorplayerId - the UUID of the player to unwarnrevoker - who revoke warnnull if the revocation failed.public WarnResult revokeWarn(Warn warn, String revoker)
WarnProcessorThe 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 WarnProcessorwarn - warn to removerevoker - who revoke warnnull if the revocation failed.public boolean isWarned(UUID playerId)
WarnProcessorisWarned in interface WarnProcessorplayerId - player to checkpublic List<Warn> getWarn(UUID playerId)
WarnProcessorgetWarn in interface WarnProcessorplayerId - UUID of playerpublic List<Warn> getActiveWarn(UUID playerId)
WarnProcessorgetActiveWarn in interface WarnProcessorplayerId - UUID of playerpublic List<Warn> getActiveWarnOnSameIP(String ip)
WarnProcessorgetActiveWarnOnSameIP in interface WarnProcessorip - the IP where we are looking for warnpublic String getName()
WarnProcessorgetName in interface WarnProcessorpublic List<String> getDescription()
WarnProcessorgetDescription in interface WarnProcessor