Skip to content

Commit 0f4579a

Browse files
Yushu2606ShrBox
authored andcommitted
docs: fix links and admonitions of docs
docs: fix admonition docs: add spaces for empty lines in admonitions
1 parent 9fcf59c commit 0f4579a

File tree

15 files changed

+102
-113
lines changed

15 files changed

+102
-113
lines changed

docs/apis/EventAPI/Listen.zh.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
### 拦截事件
3030

31-
在脚本引擎的事件监听系统中,一般你可以通过`return false`来拦截某个可以被拦截的事件。拦截事件意味着在脚本拦截之后BDS将不再处理这个事件,就像他从没发生过一样。
31+
在脚本引擎的事件监听系统中,一般你可以通过返回`false`来拦截某个可以被拦截的事件。拦截事件意味着在脚本拦截之后BDS将不再处理这个事件,就像他从没发生过一样。
3232
举例:拦截某条聊天事件,会造成所有人都看不到这条聊天消息
3333

3434
不过,拦截事件仅对BDS有效。

docs/apis/GameAPI/Basic.zh.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,8 @@
151151

152152
- 参数:
153153

154-
- pos1 : `IntPos` 对角坐标1,填写方式与 [fill命令](https://minecraft.fandom.com/zh/wiki/%E5%91%BD%E4%BB%A4/fill?so=search#%E5%8F%82%E6%95%B0 "在维基百科中查看")`from` 参数类似
155-
- pos2 : `IntPos` 对角坐标2,填写方式与 [fill命令](https://minecraft.fandom.com/zh/wiki/%E5%91%BD%E4%BB%A4/fill?so=search#%E5%8F%82%E6%95%B0 "在维基百科中查看")`to` 参数类似
154+
- pos1 : `IntPos` 对角坐标1,填写方式与 [fill命令](https://zh.minecraft.wiki/w/命令/fill#参数 "在维基百科中查看")`from` 参数类似
155+
- pos2 : `IntPos` 对角坐标2,填写方式与 [fill命令](https://zh.minecraft.wiki/w/命令/fill#参数 "在维基百科中查看")`to` 参数类似
156156
- ignoreBlocks : `Boolean` 忽略方块
157157
- ignoreEntities : `Boolean` 忽略实体
158158
- 返回值类型:`NbtCompound`

docs/apis/GameAPI/Block.zh.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,4 +200,4 @@
200200
- 返回值:是否成功生成
201201
- 返回值类型:`Boolean`
202202

203-
粒子效果名称可以查阅[Minecraft Wiki](https://minecraft.fandom.com/zh/wiki/%E7%B2%92%E5%AD%90?variant=zh#.E7.B1.BB.E5.9E.8B)得知,在传入参数的时候不要忘记命名空间前缀。类似于 `minecraft:heart_particle`
203+
粒子效果名称可以查阅[Minecraft Wiki](https://zh.minecraft.wiki/w/粒子#类型)得知,在传入参数的时候不要忘记命名空间前缀。类似于 `minecraft:heart_particle`

docs/apis/GameAPI/Command.md

Lines changed: 30 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ mc.runcmd("say Hello!")
4040
| res.output | The output result after BDS executes the command. | `String` |
4141

4242

43-
> [!NOTE]
44-
> The implementation of runcmdEx is very different from ordinary runcmd. The Enhanced version has a **hidden execution** mechanism, and the execution result will not be output to the console. Therefore, if necessary, you must manually use the log function to output the result.
43+
!!! note
44+
The implementation of runcmdEx is very different from ordinary runcmd. The Enhanced version has a **hidden execution** mechanism, and the execution result will not be output to the console. Therefore, if necessary, you must manually use the log function to output the result.
4545

4646
[JavaScript]
4747
```js
@@ -52,8 +52,8 @@ log(result.output);
5252
## Command Registration API
5353

5454
An interface for registering custom commands is provided here. By docking with the built-in command system of BDS, the commands you register can be used by players, consoles, command blocks, NPCs and other objects that can execute commands in games. In addon, you can also use the commands registered here.
55-
> [!WARNING]
56-
> Except for variable parameters (String, RawText, Message, etc.), the commands cannot contain non-English lowercase letters!
55+
!!! warning
56+
Except for variable parameters (String, RawText, Message, etc.), the commands cannot contain non-English lowercase letters!
5757

5858
### Register a Top-Level Command
5959

@@ -83,11 +83,10 @@ An interface for registering custom commands is provided here. By docking with t
8383
- Return value: Command Object.
8484
- Return value type: `Command`
8585

86-
> [!TIP]
87-
>
88-
> Top-level commands, i.e. something like `list` `gamerule`, the first input after the `/` character.
89-
>
90-
> After registering the top-level command, this function returns a command object. Next, the function expansion of this command needs to be carried out in this command object.
86+
!!! tip
87+
Top-level commands, i.e. something like `list` `gamerule`, the first input after the `/` character.
88+
89+
After registering the top-level command, this function returns a command object. Next, the function expansion of this command needs to be carried out in this command object.
9190

9291
### Command Object - Function
9392

@@ -184,10 +183,9 @@ Through the command object, you can register various forms and functions for thi
184183
- Return value: Whether setting succeeded or not.
185184
- Return value type: `Boolean`
186185

187-
> [!TIP]
188-
>
189-
> Command overloading is the method used by BDS to distinguish different command forms, and each different command form corresponds to a command overloading.
190-
> As you can see, the parameter names provided in the command overload form a new command form.
186+
!!! tip
187+
Command overloading is the method used by BDS to distinguish different command forms, and each different command form corresponds to a command overloading.
188+
As you can see, the parameter names provided in the command overload form a new command form.
191189

192190
#### Set Command Callback
193191

@@ -198,9 +196,8 @@ Through the command object, you can register various forms and functions for thi
198196
- Return value: Whether setting succeeded or not.
199197
- Return value type: `Boolean`
200198

201-
> [!TIP]
202-
>
203-
> The parameters of the command callback function are relatively complex, which will be explained in detail below.
199+
!!! tip
200+
The parameters of the command callback function are relatively complex, which will be explained in detail below.
204201

205202
#### Installation Instructions
206203

@@ -334,11 +331,10 @@ mc.listen("onServerStarted", () => {
334331

335332
The fake command API here is reserved for **downward compatibility**. It is recommended to use the **true command** API written in the above document.
336333

337-
> [!WARNING]
338-
>
339-
> Although it looks relatively simple, fake commands have some important disadvantages, including that they can only be executed by the player or console, other objects (such as command blocks, NPCs, etc.) cannot be executed, all parameter data needs to be parsed by themselves, etc.
340-
>
341-
> Please try to use the real command API.
334+
!!! warning
335+
Although it looks relatively simple, fake commands have some important disadvantages, including that they can only be executed by the player or console, other objects (such as command blocks, NPCs, etc.) cannot be executed, all parameter data needs to be parsed by themselves, etc.
336+
337+
Please try to use the real command API.
342338

343339
### Register a New Player Command (Fake Command)
344340

@@ -404,20 +400,19 @@ mc.regConsoleCmd("backup","Start the backup",function(args){
404400
});
405401
```
406402

407-
> [!TIP|label:Instructions on Fake Order Registration]
408-
>
409-
> After setting the callback function, the callback function will be called when the fake command you registered is executed.
410-
> LLSE will automatically split the command arguments into arrays for you before calling them.
411-
>
412-
> Take the JavaScript language as an example:
413-
>
414-
> Execute command
415-
> `mc.regPlayerCmd("land buy", "land buy", function(pl,args){ .... }, 0 );`
416-
> after that,
417-
> This callback function will be called when you use the command `/land buy abcde 12345`.
418-
> The parameter args of the callback function is passed in an array: [ "abcde" , "12345" ]
419-
> As you can see, the values contained in `args` are **sequentially split** command arguments.
420-
> If you have quotes in your command (for example to handle player names with spaces in them), LLSE will also do this when splitting.
403+
!!! tip "Instructions on Fake Order Registration"
404+
After setting the callback function, the callback function will be called when the fake command you registered is executed.
405+
LLSE will automatically split the command arguments into arrays for you before calling them.
406+
407+
Take the JavaScript language as an example:
408+
409+
Execute command
410+
`mc.regPlayerCmd("land buy", "land buy", function(pl,args){ .... }, 0 );`
411+
after that,
412+
This callback function will be called when you use the command `/land buy abcde 12345`.
413+
The parameter args of the callback function is passed in an array: [ "abcde" , "12345" ]
414+
As you can see, the values contained in `args` are **sequentially split** command arguments.
415+
If you have quotes in your command (for example to handle player names with spaces in them), LLSE will also do this when splitting.
421416

422417
<br>
423418

docs/apis/GameAPI/Command.zh.md

Lines changed: 30 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ mc.runcmd("say Hello!")
4242
| res.output | BDS执行命令后的输出结果 | `String` |
4343

4444

45-
> [!NOTE]
46-
> runcmdEx 与普通 runcmd 实现区别非常大,在于 Ex 版本拥有**隐藏输出**的机制,执行结果不会输出至控制台,因此如果有需要,要手动用 log 函数将结果输出
45+
!!! note
46+
runcmdEx 与普通 runcmd 实现区别非常大,在于 Ex 版本拥有**隐藏输出**的机制,执行结果不会输出至控制台,因此如果有需要,要手动用 log 函数将结果输出
4747

4848
[JavaScript]
4949
```js
@@ -54,8 +54,8 @@ log(result.output);
5454
## 命令注册 API
5555

5656
这里提供了注册自定义命令的接口。通过对接 BDS 内置的命令系统,你注册的命令可以由玩家、控制台、命令方块、NPC等各种游戏中可以执行命令的对象所使用,在 addon 中,也可以使用这里所注册的命令。
57-
> [!WARNING]
58-
> 命令中除了可变参数(String, RawText, Message等)外,均不能包含非英文小写字母!
57+
!!! warning
58+
命令中除了可变参数(String, RawText, Message等)外,均不能包含非英文小写字母!
5959

6060
### 注册一条顶层命令
6161

@@ -90,11 +90,10 @@ log(result.output);
9090

9191
- 返回值类型:`Command`
9292

93-
> [!TIP]
94-
>
95-
> 顶层命令,也就是类似 `list` `gamerule` 这种,在 / 之后第一个输入的部分
96-
>
97-
> 注册完顶层命令后,此函数会返回一个指令对象。接下来,对于这个命令的功能扩展都需要在这个指令对象中进行
93+
!!! tip
94+
顶层命令,也就是类似 `list` `gamerule` 这种,在 / 之后第一个输入的部分
95+
96+
注册完顶层命令后,此函数会返回一个指令对象。接下来,对于这个命令的功能扩展都需要在这个指令对象中进行
9897

9998
### 指令对象 - 函数
10099

@@ -193,10 +192,9 @@ log(result.output);
193192
- 返回值:是否成功设置
194193
- 返回值类型:`Boolean`
195194

196-
> [!TIP]
197-
>
198-
> 指令重载是 BDS 区分不同指令形式的方法,每一种不同的指令形式对应着一种指令重载。
199-
> 如你所见,指令重载中提供的各项参数名组成了一种新的指令形式
195+
!!! tip
196+
指令重载是 BDS 区分不同指令形式的方法,每一种不同的指令形式对应着一种指令重载。
197+
如你所见,指令重载中提供的各项参数名组成了一种新的指令形式
200198

201199
#### 设置指令回调
202200

@@ -207,9 +205,8 @@ log(result.output);
207205
- 返回值:是否成功设置
208206
- 返回值类型:`Boolean`
209207

210-
> [!TIP]
211-
>
212-
> 指令回调函数的参数相对复杂,在下面将进行详细解释
208+
!!! tip
209+
指令回调函数的参数相对复杂,在下面将进行详细解释
213210

214211
#### 安装指令
215212

@@ -343,11 +340,10 @@ mc.listen("onServerStarted", () => {
343340

344341
这里的假命令API为 **向下兼容** 而留存,推荐使用上面文档所写的的 **真命令** API
345342

346-
> [!WARNING]
347-
>
348-
> 尽管看起来比较简单,但是假命令有一些很重要的缺点,包括只能由玩家或控制台执行,其他对象(如命令方块、NPC等)都无法执行、所有参数数据都需要自行解析等等。
349-
>
350-
> 请尽量使用 真命令API
343+
!!! warning
344+
尽管看起来比较简单,但是假命令有一些很重要的缺点,包括只能由玩家或控制台执行,其他对象(如命令方块、NPC等)都无法执行、所有参数数据都需要自行解析等等。
345+
346+
请尽量使用 真命令API
351347

352348
### 注册一个新的玩家命令(假命令)
353349

@@ -413,20 +409,19 @@ mc.regConsoleCmd("backup","Start the backup",function(args){
413409
});
414410
```
415411

416-
> [!TIP|label:假命令注册相关说明]
417-
>
418-
> 设置了回调函数之后,在你注册的这个假命令被执行的时候,回调函数就会被调用。
419-
> 在调用之前,脚本引擎会自动帮你把命令参数分割成数组。
420-
>
421-
> 以JavaScript语言为例:
422-
>
423-
> 执行命令
424-
> `mc.regPlayerCmd("land buy", "购买领地", function(pl,args){ .... }, 0 );`
425-
> 之后,
426-
> 当你使用命令 `/land buy abcde 12345`的时候,这个回调函数就会被调用。
427-
> 回调函数的参数args被传入一个数组:[ "abcde" , "12345" ]
428-
> 正如所见,`args` 中包含的值是被 **按顺序分割好的** 命令参数。
429-
> 如果你的命令中有引号(比如说为了处理含有空格的玩家名字),脚本引擎在分割时也会做处理。
412+
!!! tip "假命令注册相关说明"
413+
设置了回调函数之后,在你注册的这个假命令被执行的时候,回调函数就会被调用。
414+
在调用之前,脚本引擎会自动帮你把命令参数分割成数组。
415+
416+
以JavaScript语言为例:
417+
418+
执行命令
419+
`mc.regPlayerCmd("land buy", "购买领地", function(pl,args){ .... }, 0 );`
420+
之后,
421+
当你使用命令 `/land buy abcde 12345`的时候,这个回调函数就会被调用。
422+
回调函数的参数args被传入一个数组:[ "abcde" , "12345" ]
423+
正如所见,`args` 中包含的值是被 **按顺序分割好的** 命令参数。
424+
如果你的命令中有引号(比如说为了处理含有空格的玩家名字),脚本引擎在分割时也会做处理。
430425

431426
<br>
432427

docs/apis/GameAPI/Entity.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -689,5 +689,5 @@ The following APIs provide APIs for interacting with entities at specified locat
689689
- Return value: The result of the Molang expression.
690690
- Return value type: `Float`
691691

692-
For detailed usage of Molang, refer to [MOLANG Doc bedrock.dev](https://bedrock.dev/zh/docs/stable/Molang)
692+
For detailed usage of Molang, refer to [MOLANG Doc bedrock.dev](https://bedrock.dev/docs/stable/Molang)
693693
<br>

docs/apis/GameAPI/ScoreBoard.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ Reduce score: `ob.reduceScore(target,score)`
108108
- Return value type: `Integer`
109109
- If `Null` is returned, the operation failed.
110110

111-
[!warning]
112-
If the score doesn't exist, will try creating a score, then return `0`(If *target* is `String`) or `null`(If *target* is `Player`)
113-
Reason: [#971](https://github.com/LiteLDev/LeviLamina/issues/971#issuecomment-1385047649)
111+
!!! warning
112+
If the score doesn't exist, will try creating a score, then return `0`(If *target* is `String`) or `null`(If *target* is `Player`)
113+
Reason: [#971](https://github.com/LiteLDev/LeviLamina/issues/971#issuecomment-1385047649)
114114
<br>
115115

116116
#### Stop Tracking a Target

docs/apis/GameAPI/ScoreBoard.zh.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ MC使用 **计分项** 作为计分板系统的核心,每一个计分项拥有
108108
- 返回值类型:`Integer`
109109
- 如果返回`Null`,则代表操作失败
110110

111-
[!warning]
112-
若计分项不存在,则会尝试创建计分项,此时会返回`0`(当*target*`String`时)或`null`(当*target*`Player`时)
113-
原因参见: [#971](https://github.com/LiteLDev/LeviLamina/issues/971#issuecomment-1385047649)
111+
!!! warning
112+
若计分项不存在,则会尝试创建计分项,此时会返回`0`(当*target*`String`时)或`null`(当*target*`Player`时)
113+
原因参见: [#971](https://github.com/LiteLDev/LeviLamina/issues/971#issuecomment-1385047649)
114114
<br>
115115

116116
#### 停止跟踪某个目标

docs/apis/LanguageSupport.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@ Currently, LLSE supports writing plugins in the following languages:
1414
| `Node.js` | Modify Node.js to work with embedding, with support for npm package management |
1515
| `Python` | Using CPython engine, with support for pip package management |
1616

17-
> [!INFO]
18-
>
19-
> If you need to write plugins in compiled languages such as C++, Go, .NET, etc., please go to [Home](../zh-Hans) for other language documentation
17+
!!! tip
18+
If you need to write plugins in native languages such as C++, Go, Rust, etc., please go to [Home](https://levilamina.liteldev.com) for other language documentation
2019

2120
## JavaScript language support description
2221

docs/apis/LanguageSupport.zh.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@
1414
| `Node.js` | 改造 Node.js 使其适合嵌入工作,支持 npm 包管理 |
1515
| `Python` | 使用 CPython 引擎运行插件,支持 pip 包管理 |
1616

17-
> [!INFO]
18-
>
19-
> 如果需要使用 C++、Go、.NET 等编译式语言编写插件,请移步 [主页](zh_CN/) 查看其他语言文档
17+
!!! tip
18+
如果需要使用 C++、Go、Rust 等原生语言编写插件,请移步 [主页](https://levilamina.liteldev.com) 查看其他语言文档
2019

2120
## JavaScript 语言支持说明
2221

0 commit comments

Comments
 (0)