public class WarnCache
extends java.lang.Object
| Constructor and Description |
|---|
WarnCache() |
| Modifier and Type | Method and Description |
|---|---|
void |
addWarning(java.lang.String uuid,
java.lang.String message)
Adds a warning to the specified uuid.
|
void |
addWarning(java.util.UUID uuid,
java.lang.String message)
Adds a warning to the specified uuid.
|
void |
applyWarningAction(java.lang.String uuid)
Looks up the amount of warns on the provided UUID and applies the configured warning action (if applicable)
This will work even if the config disallows warning actions, so check that first!
|
int |
getWarnAmounts(java.lang.String uuid)
Get the current amounts of warnings a player has
|
int |
getWarnAmounts(java.util.UUID uuid)
Get the current amounts of warnings a player has
|
java.util.List<java.lang.String> |
getWarningMessage(java.lang.String uuid)
Used to get the warning messages for the player
|
void |
purgeWarnings(java.lang.String uuid)
Used to delete all warnings for a particular player and resets their warning count
|
void |
removeWarning(java.lang.String uuid,
java.lang.String message)
Used to remove a warning message from a player's warning (it will only delete one, so if there
are duplicates, only one will be removed)
|
void |
setWarningAmount(java.lang.String uuid,
int amount)
Used to set player warning amoungs
|
void |
setWarningAmount(java.util.UUID uuid,
int amount)
Used to set player warning amoungs
|
void |
subtractWarning(java.lang.String uuid)
Used to subtract a warning amount from a player
|
void |
subtractWarning(java.util.UUID uuid)
Used to subtract a warning amount from a player
|
public int getWarnAmounts(java.lang.String uuid)
uuid - public int getWarnAmounts(java.util.UUID uuid)
uuid - public void addWarning(java.lang.String uuid,
java.lang.String message)
uuid - message - public void addWarning(java.util.UUID uuid,
java.lang.String message)
uuid - message - public void setWarningAmount(java.lang.String uuid,
int amount)
uuid - The uuid to set the warning foramount - The new amountpublic void setWarningAmount(java.util.UUID uuid,
int amount)
uuid - The uuid to set the warning foramount - The new amountpublic void subtractWarning(java.lang.String uuid)
uuid - The uuid to subtract frompublic void subtractWarning(java.util.UUID uuid)
uuid - The uuid to subtract frompublic void removeWarning(java.lang.String uuid,
java.lang.String message)
uuid - The uuid to search and destroy formessage - the message to remove (case does not mattter)public java.util.List<java.lang.String> getWarningMessage(java.lang.String uuid)
uuid - The uuid to get the messages frompublic void purgeWarnings(java.lang.String uuid)
uuid - The uuid to purge the warnings forpublic void applyWarningAction(java.lang.String uuid)
uuid - The uuid to check and apply warning actions for