# Configuration

# Configuration

KS Nameplates uses two main configuration files located in the plugin's data directory.

## config.json

Main plugin settings.

```json
{
  "nameplate": {
    "format": "{tags} {name}",
    "separator": " ",
    "maxTags": 3,
    "updateInterval": 20
  },
  "chat": {
    "enabled": true
  },
  "permissions": {
    "adminPermission": "kyuubisoft.nameplates.admin"
  }
}
```

### Nameplate Settings

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| `format` | String | `{tags} {name}` | Nameplate format. `{tags}` = active tags, `{name}` = player name |
| `separator` | String | `" "` | Separator between multiple tags |
| `maxTags` | Integer | `3` | Maximum number of tags shown at once |
| `updateInterval` | Integer | `20` | Periodic nameplate refresh interval in seconds |

### Chat Settings

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| `enabled` | Boolean | `true` | Enable colored tag prefixes in chat |

### Permission Settings

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| `adminPermission` | String | `kyuubisoft.nameplates.admin` | Permission required for admin commands, in addition to `ks.nameplate.admin` |

## tags.json

Defines all available tags and tag groups.

### Groups

```json
{
  "groups": [
    {
      "id": "ranks",
      "displayName": "Server Ranks",
      "priority": 1,
      "exclusive": true
    }
  ]
}
```

| Key | Type | Description |
|-----|------|-------------|
| `id` | String | Unique group identifier |
| `displayName` | String | Display name shown in UI |
| `priority` | Integer | Sort order (lower = first) |
| `exclusive` | Boolean | If true, only one tag per group can be active |

### Tags

```json
{
  "tags": [
    {
      "id": "vip",
      "displayText": "[VIP]",
      "chatColor": "#FFD700",
      "permission": "nameplates.tag.vip",
      "groupId": "ranks",
      "type": "PREFIX",
      "priority": 4,
      "defaultActive": true,
      "imagePath": null
    }
  ]
}
```

| Key | Type | Description |
|-----|------|-------------|
| `id` | String | Unique tag identifier |
| `displayText` | String | Text shown in nameplate and chat |
| `chatColor` | String | Hex color for chat display (e.g., `#FFD700`) |
| `permission` | String | Permission node required to use this tag (null = everyone) |
| `groupId` | String | Group this tag belongs to |
| `type` | String | `PREFIX`, `SUFFIX`, or `ABOVE` |
| `priority` | Integer | Sort order within group (lower = first) |
| `defaultActive` | Boolean | Auto-activate when player has permission |
| `imagePath` | String | Optional PNG path for image tags |

### Tag Types

- **PREFIX** — Shown before the player name: `[VIP] PlayerName`
- **SUFFIX** — Shown after the player name: `PlayerName [VIP]`
- **ABOVE** — Shown on a separate line above the name

## Localization

Language files are stored in the `localization/` directory. Supported languages:
- `en-US.json` (English)
- `de-DE.json` (German)