summaryrefslogtreecommitdiff
path: root/docs/src/en/guide/admin/configuration.md
blob: 1fdf5b5fbbab25e68a2b72eba795cc951eb3a056 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
# Configuration

```yaml
# ----------------------------------------------
# --------------   LunaticChat   ---------------
# ----------------------------------------------
#
#  Docs: https://lc.m1sk9.dev
#  GitHub: https://github.com/m1sk9/LunaticChat
#
#  This configuration file is for customizing LunaticChat's behavior.
#  Please specify appropriate values to ensure LunaticChat functions correctly.
#
#  For detailed configuration options, please refer to the documentation:
#       https://lc.m1sk9.dev/guide/configuration
# ----------------------------------------------

# If enabled, Activate LunaticChat's debug mode, which provides detailed logging for troubleshooting.
debug: false

# Path to the YAML file storing player settings
userSettingsFilePath: "player-settings.yaml"

# If enabled, LunaticChat will check for updates on startup.
checkForUpdates: true

# Plugin Configuration Language. This setting applies only to player feedback and does not affect plugin logs or similar outputs.
language: "en"

# ----------------------------------------------
# -----------   Features Settings   ------------
# ----------------------------------------------

features:
  quickReplies:
    # If enabled, the quick reply feature via the /reply command will be activated.
    enabled: true
  japaneseConversion:
    # If enabled, enables the conversion function from Roman letters to hiragana.
    enabled: false
    cache:
      # Specifies the maximum number of entries to store in the Romanization conversion cache.
      maxEntries: 500
      # Specify the interval (in seconds) for saving the Romanization conversion cache to disk.
      saveIntervalSeconds: 300
      # Specify the file path where the cache for Romanization conversion is saved.
      filePath: "conversion_cache.json"
    api:
      # Specify the timeout duration (in milliseconds) for API requests to the Romanization conversion service.
      timeout: 3000
      # Specify the number of retry attempts for failed API requests to the Romanization conversion service.
      retryAttempts: 2

# ----------------------------------------------
# ---------   Message Format Settings   --------
# ----------------------------------------------
#
# Customize the format of various chat messages here.
# You can use placeholders such as {sender}, {message}, etc.
#
# {sender} - The name of the message sender
# {recipient} - The name of the message recipient
# {message} - The content of the message
# ----------------------------------------------

messageFormat:
  # Configure the format for direct messages sent via /tell or /msg
  directMessageFormat: "§7[§e{sender} §7>> §e{recipient}§7] §f{message}"
```

## General Settings

### `debug`

- Type: `boolean`
- Default: `false`

Starts LunaticChat in debug mode.

### `userSettingsFilePath`

- Type: `string`
- Default: `player-settings.yaml`

Specifies the path to the YAML file where LunaticChat saves player settings.

### `checkForUpdates`

- Type: `boolean`
- Default: `true`

Configures whether to prompt for LunaticChat updates at startup and when players with the required permissions join the server.

### `language`

- Type: `string`
- Default: `en`

Specifies the language for LunaticChat's player-facing messages.

### Supported languages:

- `en`: English
- `ja`: Japanese (日本語)

## Features Settings

### `features.quickReplies.enabled`

- Type: `boolean`
- Default: `true`

Enables the quick reply feature via the [`/reply`](../../reference/commands/reply.md) command in LunaticChat.

When disabled, the [`/reply`](../../reference/commands/reply.md) command will not be registered with Paper and cannot be used.

### `features.japaneseConversion.enabled`

- Type: `boolean`
- Default: `false`

Enables the conversion feature from romaji to hiragana.

### `features.japaneseConversion`

#### `cache.maxEntries`

- Type: `integer`
- Default: `500`

Specifies the maximum number of entries to store in the romanization conversion cache.

When this value is exceeded, the oldest entries are deleted first.

Setting a higher value improves conversion performance, but also increases memory usage and cache file size.

#### `cache.saveIntervalSeconds`

- Type: `integer`
- Default: `300`

Specifies the interval (in seconds) for saving the romanization conversion cache to disk.

#### `cache.filePath`

- Type: `string`
- Default: `conversion_cache.json`

Specifies the file path where the romanization conversion cache is saved.

The path set here is interpreted as a relative path from the `plugins/LunaticChat/` directory.

#### `api.timeout`

- Type: `integer`
- Default: `3000`

Specifies the timeout duration (in milliseconds) for API requests to the romanization conversion service.

#### `api.retryAttempts`

- Type: `integer`
- Default: `2`

Specifies the number of retry attempts for failed API requests to the romanization conversion service.

## Message Format Settings

Available placeholders:

- `{sender}`: Name of the message sender
- `{recipient}`: Name of the message recipient
- `{message}`: Content of the message

### `messageFormat.directMessageFormat`

- Type: `string`
- Default: `§7[§e{sender} §7>> §e{recipient}§7] §f{message}`

Specifies the format for messages sent via direct message ([`/tell`](../../reference/commands/tell.md) or [`/reply`](../../reference/commands/reply.md) commands).