Skip to content

Commit 55151e9

Browse files
committed
Merge branch 'main' into develop
2 parents f21aaeb + efad895 commit 55151e9

31 files changed

+165
-190
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
on:
22
pull_request:
3+
paths:
4+
- .github/workflows/build.yml
5+
- src/**
6+
- xmake.lua
37
push:
8+
paths:
9+
- .github/workflows/build.yml
10+
- src/**
11+
- xmake.lua
412
workflow_dispatch:
513

614
jobs:

.github/workflows/release.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,26 @@ on:
55

66
jobs:
77
build:
8+
runs-on: windows-latest
89
strategy:
910
matrix:
1011
backend:
1112
# - libnode
1213
- lua
1314
# - python310
1415
- quickjs
15-
runs-on: windows-latest
1616
steps:
1717
- uses: actions/checkout@v4
1818

1919
- uses: xmake-io/github-action-setup-xmake@v1
20+
21+
- uses: actions/cache@v4
22+
with:
23+
path: |
24+
~/AppData/Local/.xmake
25+
key: xmake-${{ hashFiles('xmake.lua') }}
26+
restore-keys: |
27+
xmake-
2028
2129
- run: |
2230
xmake repo -u
@@ -27,7 +35,7 @@ jobs:
2735
- run: |
2836
xmake -w -y
2937
30-
- uses: actions/upload-artifact@v3
38+
- uses: actions/upload-artifact@v4
3139
with:
3240
name: legacy-script-engine-${{ matrix.backend }}-windows-x64-${{ github.sha }}
3341
path: |
@@ -68,7 +76,7 @@ jobs:
6876
steps:
6977
- uses: actions/checkout@v4
7078

71-
- uses: actions/download-artifact@v3
79+
- uses: actions/download-artifact@v4
7280
with:
7381
name: legacy-script-engine-${{ matrix.backend }}-windows-x64-${{ github.sha }}
7482
path: release/
@@ -87,6 +95,7 @@ jobs:
8795
chmod 400 ~/.ssh/id_rsa
8896
git config --global user.name "Actions"
8997
git config --global user.email "shrbox@liteldev.com"
98+
rm release/legacy-script-engine-${{ matrix.backend }}/*.pdb
9099
git clone git@gitea.litebds.com:LiteLDev/legacy-script-engine-${{ matrix.backend }}.git
91100
cd legacy-script-engine-${{ matrix.backend }}
92101
rm -rf legacy-script-engine-${{ matrix.backend }}
@@ -116,7 +125,7 @@ jobs:
116125
steps:
117126
- uses: actions/checkout@v4
118127

119-
- uses: actions/download-artifact@v3
128+
- uses: actions/download-artifact@v4
120129
with:
121130
name: legacy-script-engine-${{ matrix.backend }}-windows-x64-${{ github.sha }}
122131
path: release/

CHANGELOG.md

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,28 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.2.2] - 2024-02-06
9+
10+
### Fixed
11+
12+
- Fix runcmdEx error when command has no output
13+
14+
## [0.2.1] - 2024-02-06
15+
16+
### Fixed
17+
18+
- Fix endless loop
19+
20+
## [0.2.0] - 2024-02-06
21+
22+
### Added
23+
24+
- Support LeviLamina 0.7.x
25+
26+
### Fixed
27+
28+
- Fix Device::getIP
29+
830
## [0.1.6] - 2024-02-05
931

1032
### Fixed
@@ -23,8 +45,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2345

2446
- First release.
2547

26-
[0.1.5]: https://github.com/LiteLDev/LegacyScriptEngine/compare/v0.1.4...v0.1.5
27-
48+
[0.2.2]: https://github.com/LiteLDev/LegacyScriptEngine/compare/v0.2.1...v0.2.2
49+
[0.2.1]: https://github.com/LiteLDev/LegacyScriptEngine/compare/v0.2.0...v0.2.1
50+
[0.2.0]: https://github.com/LiteLDev/LegacyScriptEngine/compare/v0.1.6...v0.2.0
2851
[0.1.6]: https://github.com/LiteLDev/LegacyScriptEngine/compare/v0.1.5...v0.1.6
2952
[0.1.5]: https://github.com/LiteLDev/LegacyScriptEngine/compare/v0.1.4...v0.1.5
3053
[0.1.4]: https://github.com/LiteLDev/LegacyScriptEngine/releases/tag/v0.1.4

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,17 @@ A plugin engine for running LLSE plugins on LeviLamina
44

55
## Install
66

7-
### Lua Engine
7+
To install all engines as a whole, you can use the following command:
88

99
```sh
10-
lip install gitea.litebds.com/LiteLDev/legacy-script-engine-lua
10+
lip install github.com/LiteLDev/LegacyScriptEngine
1111
```
1212

13-
### QuickJs Engine
13+
To install a specific engine, you can use the following command:
1414

1515
```sh
16+
lip install gitea.litebds.com/LiteLDev/legacy-script-engine-lua
17+
1618
lip install gitea.litebds.com/LiteLDev/legacy-script-engine-quickjs
1719
```
1820

docs/apis/ScriptAPI/ScriptHelp.md

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -4,40 +4,6 @@
44
55
They make it easier and more natural for you to develop scripts and avoid a lot of unnecessary details.
66

7-
## 🎯 Plugin Registration API
8-
9-
Before you start writing code for your plugin, you first need to provide the loader with some plugin-related information.
10-
11-
`ll.registerPlugin(name, introduction, version, otherInformation)`
12-
13-
- Parameters:
14-
15-
- name : `String`
16-
Plugin Name
17-
18-
- introduction : `String`
19-
A short description of the plugin.
20-
21-
- version : `Array<Integer,Integer,Integer[,VersionStatus]>`
22-
Plugin version information.
23-
24-
For `VersionStatus`, the following enumeration can be used
25-
| Enum | Description |
26-
| --------- | ---------------------------------- |
27-
| `Release` | Official release version (default) |
28-
| `Beta` | Test version |
29-
| `Dev` | Development Version |
30-
31-
- other : `Object<string,string>`
32-
Other additional information you are willing to provide (such as license, open source address, etc.)
33-
34-
Among them, version version information is an array of version number numbers, such as `[2,0,1]` indicates that the version number is 2.0.1
35-
If you do not pass in valid version information, the version number of the plugin will be set to the default value `1.0.0`
36-
37-
For plugin additional information, you can pass in any information you need to inform the user in the same format as `Object` key-value pair. The specific data of the key-value pair needs to be `String` format.
38-
39-
<br>
40-
417
## 💼 Script Assist API
428

439
The following APIs add necessary auxiliary interfaces to scripts.
@@ -164,4 +130,4 @@ The bottom layer has lock protection, different `fastLog` There will be no strin
164130
- Return value type: `Boolean`
165131
- If it returns `Null`, the cancellation of the task failed.
166132

167-
<br>
133+
<br>

docs/apis/ScriptAPI/ScriptHelp.zh.md

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -4,41 +4,6 @@
44
55
他们让你开发脚本变得更加容易而自然,避免了很多无谓的细节问题的纠缠。
66

7-
## 🎯 插件注册 API
8-
9-
在开始为你的插件编写代码之前,你首先需要向加载器提供一些插件相关的信息
10-
11-
`ll.registerPlugin(name, introduction, version, otherInformation)`
12-
13-
- 参数:
14-
15-
- name : `String`
16-
插件名字
17-
18-
- introduction : `String`
19-
对插件的简短介绍
20-
21-
- version : `Array<Integer,Integer,Integer[, VersionStatus]>`
22-
插件的版本信息
23-
24-
对于 `VersionStatus`,可以使用以下枚举
25-
26-
| Enum | Description |
27-
| ----------------- | ---------------------- |
28-
| `Version.Release` | 正式发布版本(默认值) |
29-
| `Version.Beta` | 测试版本 |
30-
| `Version.Dev` | 开发版本 |
31-
32-
- other : `Object<string,string>`
33-
其他你愿意提供的的附加信息(如许可证、开源地址等)
34-
35-
其中,version 版本信息为版本号数字构成的数组,如`[2,0,1]`表示版本号为2.0.1
36-
如果你没有传入有效的版本信息,插件的版本号将被设置为默认值`1.0.0`
37-
38-
对于插件附加信息,你可以传入任意你需要告知用户的信息,格式同样为`Object`键值对。键值对的具体数据需要为`String`格式
39-
40-
<br>
41-
427
## 💼 脚本辅助 API
438

449
下面这些API为脚本增加了必要的辅助接口

docs/index.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@ A plugin engine for running LLSE plugins on LeviLamina
44

55
## Install
66

7-
Before installing, you need to install a suitable version of LeviLamina server.
8-
9-
### Lua Engine
7+
To install all engines as a whole, you can use the following command:
108

119
```sh
12-
lip install gitea.litebds.com/LiteLDev/legacy-script-engine-lua
10+
lip install github.com/LiteLDev/LegacyScriptEngine
1311
```
1412

15-
### QuickJs Engine
13+
To install a specific engine, you can use the following command:
1614

1715
```sh
16+
lip install gitea.litebds.com/LiteLDev/legacy-script-engine-lua
17+
1818
lip install gitea.litebds.com/LiteLDev/legacy-script-engine-quickjs
1919
```
2020

docs/index.zh.md

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,43 @@
1-
# 旧版脚本引擎
1+
# LegacyScriptEngine
22

3-
用于在 LeviLamina 上运行 LLSE 插件的插件引擎
3+
一个用于在 LeviLamina 上运行 LLSE 插件的插件引擎
44

55
## 安装
66

7-
在安装之前,您需要安装合适版本的LeviLamina服务器。
8-
9-
### Lua引擎
7+
要一次性安装所有引擎,您可以使用以下命令:
108

119
```sh
12-
lip install gitea.litebds.com/LiteLDev/legacy-script-engine-lua
10+
lip install github.com/LiteLDev/LegacyScriptEngine
1311
```
1412

15-
### QuickJs引擎
13+
要安装特定的引擎,您可以使用以下命令:
1614

1715
```sh
16+
lip install gitea.litebds.com/LiteLDev/legacy-script-engine-lua
17+
1818
lip install gitea.litebds.com/LiteLDev/legacy-script-engine-quickjs
1919
```
2020

21-
## 用法
21+
## 使用
2222

23-
1. 将LLSE插件直接放在`/path/to/bedrock_dedicated_server/plugins/`中。
23+
1. 直接将 LLSE 插件放在 `/path/to/bedrock_dedicated_server/plugins/` 中。
2424

25-
2. 运行服务器,然后插件将自动迁移到 LeviLamina 插件清单
25+
2. 运行服务器,然后插件将自动迁移到 LeviLamina 插件清单中
2626

2727
3. 要加载它们,您需要重新启动服务器。
2828

2929
## 贡献
3030

31-
如果您有任何疑问,请创建issue进行讨论
31+
如果您有任何问题,请开启一个 issue 来讨论
3232

3333
欢迎 PR。
3434

35-
## 执照
35+
## 许可
36+
37+
GPL-3.0-only © LiteLDev
3638

37-
仅 GPL-3.0 © LiteLDev
39+
源: 与必应的对话, 2024/2/5
40+
(1) Translate and convert Markdown files - GroupDocs. <https://products.groupdocs.app/translation/markdown>.
41+
(2) Is there a method for translating markdown formatted text?. <https://stackoverflow.com/questions/30585841/is-there-a-method-for-translating-markdown-formatted-text>.
42+
(3) Translate Markdown file from English to Chinese - GroupDocs. <https://products.groupdocs.app/translation/markdown/English-Chinese>.
43+
(4) undefined. <https://gt4t.net/>.

docs/tutorials/create_your_first_plugin.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@ With your IDE in hand, and the server installation complete, you are ready to be
1414

1515
Developing a LLSE Plugin begins with creating your plugin's file. This file should be named "LLMyPlugin.js", replacing "MyPlugin" with what you would like to call your plugin. It should be placed in the plugins folder of your server installation. Some IDEs will allow you to create a new file and choose a location, while others will allow you to choose only after hitting "Save As".
1616

17-
The first line you will need in that file is the one below. For information on parameters for this method, and information on the Script Assist API, you can go [here](https://lse.liteldev.com/apis/ScriptAPI/ScriptHelp/).
18-
19-
`ll.registerPlugin(name, introduction, version, otherInformation)`
20-
2117
This might confuse some developers, as `ll` should be undefined. However, this file is going to be utilized by the LeviLamina ScriptX Engine. `ll` will be automatically included during the script's runtime. This is the same with any other variables/classes you see referenced without a definition.
2218

2319
Now that we have created our .js file, and registered the plugin, all we have to do from here is create an event listener. We do that by utilizing `mc`.

docs/tutorials/create_your_first_plugin.zh.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@
1919

2020
开发一个脚本插件,首先要创建你的插件文件。这个文件应该命名为 "LLMyPlugin.js",将 "MyPlugin" 替换为你想要的插件名称。它应该被放在你的服务器安装的插件文件夹中。有些开发环境会允许你创建一个新文件并选择一个位置,而其他开发环境则允许你在点击 "另存为" 后才选择。
2121

22-
你在该文件中需要的第一行是下面这行。关于这个方法的参数信息,以及关于Script Assist API的信息,你可以去[这里](https://lse.liteldev.com/zh/apis/ScriptAPI/ScriptHelp/)
23-
24-
`ll.registerPlugin(name, introduction, version, otherInformation)`
25-
2622
这可能会使一些开发者感到困惑,因为`ll`应该是未定义的。然而,这个文件将被LeviLamina ScriptX引擎所利用。`ll`将在脚本运行时自动包含。这与你看到的任何其他没有定义的变量/类的引用是一样的。
2723

2824
现在我们已经创建了我们的.js文件,并注册了插件,我们要做的就是创建一个事件监听器。我们通过使用`mc`来实现。

0 commit comments

Comments
 (0)