You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/apis/GameAPI/Command.md
+30-35Lines changed: 30 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,8 +40,8 @@ mc.runcmd("say Hello!")
40
40
| res.output | The output result after BDS executes the command. |`String`|
41
41
42
42
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.
45
45
46
46
[JavaScript]
47
47
```js
@@ -52,8 +52,8 @@ log(result.output);
52
52
## Command Registration API
53
53
54
54
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!
57
57
58
58
### Register a Top-Level Command
59
59
@@ -83,11 +83,10 @@ An interface for registering custom commands is provided here. By docking with t
83
83
- Return value: Command Object.
84
84
- Return value type: `Command`
85
85
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.
91
90
92
91
### Command Object - Function
93
92
@@ -184,10 +183,9 @@ Through the command object, you can register various forms and functions for thi
184
183
- Return value: Whether setting succeeded or not.
185
184
- Return value type: `Boolean`
186
185
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.
191
189
192
190
#### Set Command Callback
193
191
@@ -198,9 +196,8 @@ Through the command object, you can register various forms and functions for thi
198
196
- Return value: Whether setting succeeded or not.
199
197
- Return value type: `Boolean`
200
198
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.
The fake command API here is reserved for **downward compatibility**. It is recommended to use the **true command** API written in the above document.
336
333
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.
342
338
343
339
### Register a New Player Command (Fake Command)
344
340
@@ -404,20 +400,19 @@ mc.regConsoleCmd("backup","Start the backup",function(args){
404
400
});
405
401
```
406
402
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.
Copy file name to clipboardExpand all lines: docs/apis/LanguageSupport.md
+2-3Lines changed: 2 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,9 +14,8 @@ Currently, LLSE supports writing plugins in the following languages:
14
14
|`Node.js`| Modify Node.js to work with embedding, with support for npm package management |
15
15
|`Python`| Using CPython engine, with support for pip package management |
16
16
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
0 commit comments