public interface NucleusWarningService
| Modifier and Type | Method and Description |
|---|---|
boolean |
addWarning(org.spongepowered.api.entity.living.player.User toWarn,
org.spongepowered.api.command.CommandSource warner,
String reason,
Duration duration)
Adds a warning to a player.
|
boolean |
expireWarning(org.spongepowered.api.entity.living.player.User user,
Warning warning,
org.spongepowered.api.event.cause.Cause cause)
Expires (or removes) a warning.
|
List<Warning> |
getWarnings(org.spongepowered.api.entity.living.player.User user)
Gets all warnings (active and expired) for a
User |
boolean addWarning(org.spongepowered.api.entity.living.player.User toWarn,
org.spongepowered.api.command.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.List<Warning> getWarnings(org.spongepowered.api.entity.living.player.User user)
Useruser - The User to get the warnings for.Warnings.boolean expireWarning(org.spongepowered.api.entity.living.player.User user,
Warning warning,
org.spongepowered.api.event.cause.Cause cause)
user - The User to remove the warning from.warning - The Warning to remove.cause - The Cause. This should normally have your plugin as the root, but can be a player if it is due to a direct
action of that player.true if successful.