public interface NucleusMuteService
Modifier and Type | Field and Description |
---|---|
static String |
MUTED_CONTEXT
The permission context key that indicates a player is muted.
|
Modifier and Type | Method and Description |
---|---|
Optional<MuteInfo> |
getPlayerMuteInfo(User user)
Gets the
MuteInfo about a player. |
boolean |
isMuted(User user)
Gets whether a
User is muted. |
boolean |
mutePlayer(User user,
String reason,
Duration duration,
Cause cause)
Mutes a player.
|
boolean |
unmutePlayer(User user,
Cause cause)
Unmutes a player.
|
static final String MUTED_CONTEXT
The value of this context will always be true if set.
boolean isMuted(User user)
User
is muted.user
- The User
to check.true
if so.boolean mutePlayer(User user, String reason, @Nullable Duration duration, 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.