public interface NucleusMuteService
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
MUTED_CONTEXT
The permission context key that indicates a player is muted.
|
Modifier and Type | Method and Description |
---|---|
java.util.Optional<Mute> |
getPlayerMuteInfo(org.spongepowered.api.entity.living.player.User user)
Gets the
Mute about a player. |
boolean |
isMuted(org.spongepowered.api.entity.living.player.User user)
Gets whether a
User is muted. |
boolean |
mutePlayer(org.spongepowered.api.entity.living.player.User user,
java.lang.String reason,
java.time.Duration duration,
org.spongepowered.api.event.cause.Cause cause)
Mutes a player.
|
boolean |
unmutePlayer(org.spongepowered.api.entity.living.player.User user,
org.spongepowered.api.event.cause.Cause cause)
Unmutes a player.
|
static final java.lang.String MUTED_CONTEXT
The value of this context will always be true if set.
boolean isMuted(org.spongepowered.api.entity.living.player.User user)
User
is muted.user
- The User
to check.true
if so.java.util.Optional<Mute> getPlayerMuteInfo(org.spongepowered.api.entity.living.player.User user)
Mute
about a player.user
- The User
to checkMute
, if applicable.boolean mutePlayer(org.spongepowered.api.entity.living.player.User user, java.lang.String reason, @Nullable java.time.Duration duration, org.spongepowered.api.event.cause.Cause cause)
user
- The User
to mute.reason
- The reason to mute them for.duration
- The length of time to mute for, or null
for indefinite.cause
- The Cause
of the mute. The first User
in the cause will be designated as the muter.true
if the user was muted, false
if the user was already muted.boolean unmutePlayer(org.spongepowered.api.entity.living.player.User user, org.spongepowered.api.event.cause.Cause cause)
user
- The User
to unmute.cause
- The Cause
true
if the player was unmuted.