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, wait
disable
public void enable()
WarnProcessor
enable
in interface WarnProcessor
public WarnResult executeWarn(Warn warn)
WarnProcessor
The warn may not be executed for any processor-specific reason.
executeWarn
in interface WarnProcessor
warn
- 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 boolean isWarned(UUID playerId)
WarnProcessor
isWarned
in interface WarnProcessor
playerId
- player to checkpublic List<Warn> getWarn(UUID playerId)
WarnProcessor
getWarn
in interface WarnProcessor
playerId
- UUID of playerpublic List<Warn> getActiveWarn(UUID playerId)
WarnProcessor
getActiveWarn
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