Skip to content
This repository was archived by the owner on Oct 6, 2025. It is now read-only.

Commit 349ea9e

Browse files
committed
why
1 parent 5ed7a6b commit 349ea9e

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

en-us/file/addon_config.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,12 @@ For details, see [Content Registration/Loading Options](context-options.md#about
2121
## Verifying the Configuration File
2222
If you want to restrict the value of a configuration option to a certain range, you can do the following:
2323
1. Create a file named `configHandler.js` in the addon's script folder.
24-
2. Write a function named `onConfigReload`, like this:
24+
2. Write a function named `onConfigReload`, like this
2525

2626
```js
2727
function onConfigReload(config) {
2828

2929
}
3030
```
31+
3132
The `config` parameter refers to the addon's configuration file and is of type [YamlConfiguration](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/configuration/file/YamlConfiguration.html).

pages/file/addon_config.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,12 @@
2121
## 验证配置文件
2222
如果你想要限制某个配置选项的值在某个范围,那么你可以这样做:
2323
1. 在附属脚本文件夹里创建一个名为`configHandler.js`的文件
24-
2. 写一个名为`onConfigReload`的函数,就像这样:
24+
2. 写一个名为`onConfigReload`的函数,就像这样
25+
2526
```js
2627
function onConfigReload(config) {
2728

2829
}
30+
2931
```
3032
config这个入参是指附属的配置文件,类型为[YamlConfiguration](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/configuration/file/YamlConfiguration.html)

0 commit comments

Comments
 (0)