public interface NucleusWarningService
Modifier and Type | Method and Description |
---|---|
boolean |
addWarning(User toWarn,
CommandSource warner,
String reason,
Duration duration)
Adds a warning to a player.
|
boolean |
expireWarning(User user,
Warning warning,
Cause cause)
Expires (or removes) a warning.
|
List<Warning> |
getWarnings(User user)
Gets all warnings (active and expired) for a
User |
boolean addWarning(User toWarn, CommandSource warner, String reason, @Nullable Duration duration)
toWarn
- The user to warn.warner
- The CommandSource
to attribute the warning to.reason
- The reason for the warning.duration
- The Duration
the warning should last for from this moment before it expires. Set to null
if infinite.true
if successful.