mute

abstract fun mute(@NotNull playerId: @NotNull UUID, @Nullable mutedById: UUID, duration: Long, @Nullable durationUnit: MuteDurationUnit, @Nullable reason: String, silent: Boolean): Optional<ServerMuteInfo>

Mutes a player.

Return

An Optional containing ServerMuteInfo if the player was muted successfully, or empty otherwise.

Parameters

playerId

The UUID of the player to be muted.

mutedById

The UUID of the player who mutes the target player.

duration

The duration of the mute in durationTime.

durationUnit

The unit of duration (e.g., seconds, minutes, hours). If null and duration is 0, the mute will be permanent.

reason

The reason for the mute.

silent

If true, the player won't receive a notification about the mute.