Skip to content

Commit f749f86

Browse files
committed
docs: format warnings
1 parent 991dc77 commit f749f86

File tree

16 files changed

+62
-60
lines changed

16 files changed

+62
-60
lines changed

docs/apis/DataAPI/PlayerData.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ When a player enters the server for the first time, his name and XUID are automa
107107
Tip: The player name stored in the XUID database is named corresponding to the player object. `realName` field.
108108

109109
!!! warning
110-
APIs below are added in LSE 0.8.13, using these API will make plugin not compitable with older version.
110+
APIs below are added in 0.8.13, using these API will make plugin not compitable with older version.
111111
#### Query player information by XUID
112112

113113
`data.fromXuid(xuid)`

docs/apis/DataAPI/PlayerData.zh.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ XUID数据库让你可以即使在玩家离线的时候,也可以查询玩家
107107
提示:XUID数据库中储存的玩家名为玩家对象对应的`realName`字段
108108

109109
!!! warning
110-
以下API均为LSE 0.8.13新API,使用以下API将导致插件无法兼容旧版
110+
以下API均为0.8.13新API,使用以下API将导致插件无法兼容旧版
111111
#### 根据XUID查询玩家信息
112112

113113
`data.fromXuid(xuid)`

docs/apis/EventAPI/PlayerEvents.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,8 @@ Note: This event is so powerful that it can even intercept and open backpacks.
581581

582582
#### `"onPlayerInteractEntity"` - Player Interact with Entity
583583

584-
!!! tip "Added in 0.9.5"
584+
!!! warning
585+
This event is only available in 0.9.5 and later.
585586

586587
- Listener function prototype
587588
`function(player, entity, pos)`

docs/apis/EventAPI/PlayerEvents.zh.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,8 @@
597597

598598
#### `"onPlayerInteractEntity"` - 玩家交互实体
599599

600-
!!! tip "此事件在 0.9.5 中加入"
600+
!!! warning
601+
此事件仅在0.9.5及以后版本可用
601602

602603
- 监听函数原型
603604
`function(player, entity, pos)`

docs/apis/GameAPI/Command.md

Lines changed: 23 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ mc.runcmd("say Hello!")
4343
| res.output | The output result after BDS executes the command. | `String` |
4444

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

5050
[JavaScript]
5151

@@ -60,8 +60,8 @@ An interface for registering custom commands is provided here. By docking with t
6060
commands you register can be used by players, consoles, command blocks, NPCs and other objects that can execute commands
6161
in games. In addon, you can also use the commands registered here.
6262
!!! warning
63-
Except for variable parameters (String, RawText, Message, etc.), the commands cannot contain non-English lowercase
64-
letters!
63+
Except for variable parameters (String, RawText, Message, etc.), the commands cannot contain non-English lowercase
64+
letters!
6565

6666
### Register a Top-Level Command
6767

@@ -92,8 +92,7 @@ letters!
9292
- Return value type: `Command`
9393

9494
!!! tip
95-
Top-level commands, i.e. something like `list` `gamerule`, the first input after the `/` character.
96-
95+
Top-level commands, i.e. something like `list` `gamerule`, the first input after the `/` character.
9796
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.
9897

9998
### Command Object - Function
@@ -201,9 +200,9 @@ The command object has the following member functions.
201200
- Return value type: `Boolean`
202201

203202
!!! tip
204-
Command overloading is the method used by BDS to distinguish different command forms, and each different command form
205-
corresponds to a command overloading.
206-
As you can see, the parameter names provided in the command overload form a new command form.
203+
Command overloading is the method used by BDS to distinguish different command forms, and each different command form
204+
corresponds to a command overloading.
205+
As you can see, the parameter names provided in the command overload form a new command form.
207206

208207
#### Set Command Callback
209208

@@ -216,7 +215,7 @@ As you can see, the parameter names provided in the command overload form a new
216215
- Return value type: `Boolean`
217216

218217
!!! tip
219-
The parameters of the command callback function are relatively complex, which will be explained in detail below.
218+
The parameters of the command callback function are relatively complex, which will be explained in detail below.
220219

221220
#### Installation Instructions
222221

@@ -359,10 +358,9 @@ The fake command API here is reserved for **downward compatibility**. It is reco
359358
written in the above document.
360359

361360
!!! warning
362-
Although it looks relatively simple, fake commands have some important disadvantages, including that they can only be
363-
executed by the player or console, other objects (such as command blocks, NPCs, etc.) cannot be executed, all parameter
364-
data needs to be parsed by themselves, etc.
365-
361+
Although it looks relatively simple, fake commands have some important disadvantages, including that they can only be
362+
executed by the player or console, other objects (such as command blocks, NPCs, etc.) cannot be executed, all parameter
363+
data needs to be parsed by themselves, etc.
366364
Please try to use the real command API.
367365

368366
### Register a New Player Command (Fake Command)
@@ -433,18 +431,16 @@ mc.regConsoleCmd("backup", "Start the backup", function (args) {
433431
```
434432

435433
!!! tip "Instructions on Fake Order Registration"
436-
After setting the callback function, the callback function will be called when the fake command you registered is
437-
executed.
438-
LLSE will automatically split the command arguments into arrays for you before calling them.
439-
440-
Take the JavaScript language as an example:
441-
442-
Execute command
443-
`mc.regPlayerCmd("land buy", "land buy", function(pl,args){ .... }, 0 );`
444-
after that,
445-
This callback function will be called when you use the command `/land buy abcde 12345`.
446-
The parameter args of the callback function is passed in an array: [ "abcde" , "12345" ]
447-
As you can see, the values contained in `args` are **sequentially split** command arguments.
434+
After setting the callback function, the callback function will be called when the fake command you registered is
435+
executed.
436+
LLSE will automatically split the command arguments into arrays for you before calling them.
437+
Take the JavaScript language as an example:
438+
Execute command
439+
`mc.regPlayerCmd("land buy", "land buy", function(pl,args){ .... }, 0 );`
440+
after that,
441+
This callback function will be called when you use the command `/land buy abcde 12345`.
442+
The parameter args of the callback function is passed in an array: [ "abcde" , "12345" ]
443+
As you can see, the values contained in `args` are **sequentially split** command arguments.
448444
If you have quotes in your command (for example to handle player names with spaces in them), LLSE will also do this when splitting.
449445

450446
## Other APIs Related to the Command System

docs/apis/GameAPI/Command.zh.md

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

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

5151
[JavaScript]
5252

@@ -60,7 +60,7 @@ log(result.output);
6060
这里提供了注册自定义命令的接口。通过对接 BDS 内置的命令系统,你注册的命令可以由玩家、控制台、命令方块、NPC等各种游戏中可以执行命令的对象所使用,在
6161
addon 中,也可以使用这里所注册的命令。
6262
!!! warning
63-
命令中除了可变参数(String, RawText, Message等)外,均不能包含非英文小写字母!
63+
命令中除了可变参数(String, RawText, Message等)外,均不能包含非英文小写字母!
6464

6565
### 注册一条顶层命令
6666

@@ -90,7 +90,7 @@ addon 中,也可以使用这里所注册的命令。
9090
- 返回值类型:`Command`
9191

9292
!!! tip
93-
顶层命令,也就是类似 `list` `gamerule` 这种,在 / 之后第一个输入的部分
93+
顶层命令,也就是类似 `list` `gamerule` 这种,在 / 之后第一个输入的部分
9494

9595
注册完顶层命令后,此函数会返回一个指令对象。接下来,对于这个命令的功能扩展都需要在这个指令对象中进行
9696

@@ -197,8 +197,8 @@ addon 中,也可以使用这里所注册的命令。
197197
- 返回值类型:`Boolean`
198198

199199
!!! tip
200-
指令重载是 BDS 区分不同指令形式的方法,每一种不同的指令形式对应着一种指令重载。
201-
如你所见,指令重载中提供的各项参数名组成了一种新的指令形式
200+
指令重载是 BDS 区分不同指令形式的方法,每一种不同的指令形式对应着一种指令重载。
201+
如你所见,指令重载中提供的各项参数名组成了一种新的指令形式
202202

203203
#### 设置指令回调
204204

@@ -211,7 +211,7 @@ addon 中,也可以使用这里所注册的命令。
211211
- 返回值类型:`Boolean`
212212

213213
!!! tip
214-
指令回调函数的参数相对复杂,在下面将进行详细解释
214+
指令回调函数的参数相对复杂,在下面将进行详细解释
215215

216216
#### 安装指令
217217

@@ -348,7 +348,7 @@ mc.listen("onServerStarted", () => {
348348
这里的假命令API为 **向下兼容** 而留存,推荐使用上面文档所写的的 **真命令** API
349349

350350
!!! warning
351-
尽管看起来比较简单,但是假命令有一些很重要的缺点,包括只能由玩家或控制台执行,其他对象(如命令方块、NPC等)都无法执行、所有参数数据都需要自行解析等等。
351+
尽管看起来比较简单,但是假命令有一些很重要的缺点,包括只能由玩家或控制台执行,其他对象(如命令方块、NPC等)都无法执行、所有参数数据都需要自行解析等等。
352352

353353
请尽量使用 真命令API
354354

@@ -418,11 +418,9 @@ mc.regConsoleCmd("backup", "Start the backup", function (args) {
418418
```
419419

420420
!!! tip "假命令注册相关说明"
421-
设置了回调函数之后,在你注册的这个假命令被执行的时候,回调函数就会被调用。
422-
在调用之前,脚本引擎会自动帮你把命令参数分割成数组。
423-
421+
设置了回调函数之后,在你注册的这个假命令被执行的时候,回调函数就会被调用。
422+
在调用之前,脚本引擎会自动帮你把命令参数分割成数组。
424423
以JavaScript语言为例:
425-
426424
执行命令
427425
`mc.regPlayerCmd("land buy", "购买领地", function(pl,args){ .... }, 0 );`
428426
之后,

docs/apis/GameAPI/Entity.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ Manually generate entity objects by **entity information**
3939
Use this function to manually generate objects. Note that the entity you want to get must be online, otherwise the
4040
generation will fail.
4141

42-
!!! tip "Added in 0.9.5"
42+
!!! warning
43+
This function is only available in 0.9.5 and later.
4344

4445
`mc.getEntity(info)`
4546

docs/apis/GameAPI/Entity.zh.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@
3737
通过**实体信息**手动生成实体对象
3838
通过此函数来手动生成对象,注意,你要获取的实体必须是在线状态,否则会生成失败
3939

40-
!!! tip "此接口在 0.9.5 版本加入"
40+
!!! warning
41+
此函数仅在0.9.5及以后版本可用
4142

4243
`mc.getEntity(info)`
4344

docs/apis/GameAPI/Player.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ generation will fail.
1717

1818
`mc.getPlayer(info)`
1919

20-
!!! tip "Versions before 0.8.13 could not get player by UUID<br>Versions before 0.9.5 could not get player by RuntimeId"
20+
!!! warning
21+
Versions before 0.8.13 could not get player by UUID
22+
Versions before 0.9.5 could not get player by RuntimeId
2123

2224
- Parameters:
2325
- info : `String`
@@ -1460,8 +1462,8 @@ Reference: [mojang-gametest docs](https://docs.microsoft.com/en-us/minecraft/cre
14601462
`sp.simulateLookAt(entity, [lookDuration])`
14611463
`sp.simulateLookAt(block, [lookDuration])`
14621464

1463-
!!! tip
1464-
`lookDuration` parameter not available in versions prior to 0.8.13
1465+
!!! warning
1466+
`lookDuration` parameter is only available in 0.8.13 and later.
14651467

14661468
- Parameters:
14671469

docs/apis/GameAPI/Player.zh.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616

1717
`mc.getPlayer(info)`
1818

19-
!!! tip "0.8.13之前的版本无法使用UUID获取玩家<br>0.9.5之前的版本无法使用RuntimeId获取玩家"
19+
!!! warning
20+
0.8.13之前的版本无法使用UUID获取玩家
21+
0.9.5之前的版本无法使用RuntimeId获取玩家
2022

2123
- 参数:
2224
- info : `String`
@@ -1847,8 +1849,8 @@
18471849
`sp.simulateLookAt(entity, [lookDuration])`
18481850
`sp.simulateLookAt(block, [lookDurration])`
18491851

1850-
!!! tip
1851-
`lookDurration`0.8.13之前的版本不可用
1852+
!!! warning
1853+
`lookDurration`仅在0.8.13以及之后的版本中可用
18521854

18531855
- 参数:
18541856

0 commit comments

Comments
 (0)