# VoiceMuteInfo

One server-side voice mute, as addons and the console see it.

Source: https://socketsvc.vercel.app/zh-TW/api/shared/VoiceMuteInfo
<Callout title="Generated from source">
  Record `com.socketsvc.api.VoiceMuteInfo` — generated from [VoiceMuteInfo.java](https://github.com/HippoDev03/SocketSVC/blob/main/common/core/src/main/java/com/socketsvc/api/VoiceMuteInfo.java). Edit the Javadoc in the Java source, then run `pnpm gen:api`.
</Callout>

```java
package com.socketsvc.api;

public record VoiceMuteInfo(UUID player, String playerName, long issuedAtMillis, long expiresAtMillis, String reason, String moderator) { ... }
```

One server-side voice mute, as addons and the console see it.

A mute stops a player _talking_ - microphone, soundboard, instrument and group audio
alike. It never stops them hearing: a muted player still receives everyone else, which is what
makes a mute a moderation tool rather than a disconnection.

## Components

| Component | Description |
| --- | --- |
| `UUID player` | who is muted |
| `String playerName` | their name when the mute was issued, kept so the list can name somebody who has since logged off; `null` if it was not known |
| `long issuedAtMillis` | wall-clock time the mute was issued |
| `long expiresAtMillis` | wall-clock time it lapses, or `0` for a mute that does not |
| `String reason` | operator-written text shown to the player, or `null` |
| `String moderator` | who issued it, or `null` for the console and for addons that did not say |

## Methods

### permanent

```java
public boolean permanent()
```

Whether this mute stands until somebody lifts it.

### expiredAt

```java
public boolean expiredAt(long nowMillis)
```

Whether this mute has lapsed by `nowMillis`.

### remainingMillis

```java
public long remainingMillis(long nowMillis)
```

Milliseconds left at `nowMillis`, or `-1` for a permanent mute. Never negative:
an expired mute answers `0`, so a caller formatting this never prints a negative
countdown in the window between lapsing and being swept.