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(org.spongepowered.api.entity.living.player.User user)
Gets the
MuteInfo 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,
String reason,
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 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.Optional<MuteInfo> getPlayerMuteInfo(org.spongepowered.api.entity.living.player.User user)
MuteInfo about a player.user - The User to checkMuteInfo, if applicable.boolean mutePlayer(org.spongepowered.api.entity.living.player.User user,
String reason,
@Nullable
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 Causetrue if the player was unmuted.