public interface WarnProcessor
WarnManager basically delegates actions to a WarnProcessor.
| Modifier and Type | Method and Description |
|---|---|
default void |
disable()
Disable the given processor.
|
default void |
enable()
Enable the given processor.
|
WarnResult |
executeWarn(Warn warn)
Executes the given warn.
|
default 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
|
default 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.
|
default void enable()
default void disable()
WarnResult executeWarn(Warn warn)
The warn may not be executed for any processor-specific reason.
warn - the warn to executeWarnResult revokeWarn(UUID playerId, String revoker)
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.
playerId - the UUID of the player to unwarnrevoker - who revoke warnnull if the revocation failed.WarnResult revokeWarn(Warn warn, String revoker)
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.
warn - warn to removerevoker - who revoke warnnull if the revocation failed.default boolean isWarned(UUID playerId)
playerId - player to checkList<Warn> getWarn(UUID playerId)
playerId - UUID of playerdefault List<Warn> getActiveWarn(UUID playerId)
playerId - UUID of playerList<Warn> getActiveWarnOnSameIP(String ip)
ip - the IP where we are looking for warnString getName()