diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml
new file mode 100644
index 0000000..3f7a879
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug-report.yml
@@ -0,0 +1,68 @@
+name: Bug反馈 Bug report
+description:
+ 报告Bug,插件不兼容情况,以及其他相关问题。
+ Report issues with plugin incompatbility or other behavior related issues.
+labels:
+ - bug
+body:
+ - type: markdown
+ attributes:
+ value: |
+ 请详细描述您所遇到的Bug。确保您**真的**遇到了**服务端**Bug,而非原版特性或客户端Bug。
+ Please describe the bug you encountered in detail. Make sure you're **actually** hitting a **server-side** bug, not a vanilla feature or client-side bug.
+ 如果您确定的话,就按照下面的模板填充信息,并提交反馈。
+ If you are sure, follow the template below to fill in the information and submit your feedback.
+ 如果此bug被尝试修复,您可以帮助我们测试并回复。若bug的确被修复,您可以关闭issue来让开发者确认。
+ If this bug is tried to fix, you can help us test and reply. If the bug is fixed, you can close the issue to let the developer confirm.
+ - type: input
+ id: leavesMC-version
+ attributes:
+ label: 服务端版本 LuminolMC Version
+ description:
+ LuminolMC服务端发行版本 LuminolMC server release version (contains the git commit's hash)
+ 通过执行`/version`命令将获取到的内容复制到这里。 Run `/version` on your server and paste the full, unmodified output here.
+ placeholder: >
+ e.g. git-Luminol-"0635a89" (MC: 1.20.4)
+ validations:
+ required: true
+ - type: textarea
+ id: expected-behavior
+ attributes:
+ label: 预期的行为 Expected behavior
+ description: 你期望看到的情况是什么样。What you expected to see.
+ placeholder: e.g. 使用 /tpsbar [NAME] 命令可以切换TPSBAR的开关
+ validations:
+ required: true
+ - type: textarea
+ id: actual-behavior
+ attributes:
+ label: 观测到的实际行为 Observed/Actual behavior
+ description: 你实际看到的。 What you actually saw.
+ placeholder: e.g. 使用 /tpsbar [NAME] 命令切换不了TPSBAR
+ validations:
+ required: true
+ - type: textarea
+ id: reproduce
+ attributes:
+ label: 复现步骤 Steps/models to reproduce
+ description:
+ 这里应该有一个图片、视频或其他信息来展现你的问题。
+ This may include a build schematic, a video, or detailed instructions to help reconstruct the issue.
+ placeholder: e.g. 登录其他账号,使用 /tpsbar [NAME] 命令切换不了TPSBAR
+ validations:
+ required: true
+ - type: textarea
+ id: plugin-list
+ attributes:
+ label: 插件与数据包列表。 Plugin and Datapack List.
+ description:
+ 服务器上的所有插件和数据包列表。
+ All plugins and datapacks running on your server.
+ 执行命令`/plugins`查看插件列表。执行命令`/datapack list`查看数据包列表。
+ To list plugins, run `/plugins`. For datapacks, run `/datapack list`.
+ validations:
+ required: true
+ - type: textarea
+ id: other
+ attributes:
+ label: 更多详细信息。 The more information.
\ No newline at end of file
diff --git a/.github/ISSUE_TEMPLATE/feature-request.yml b/.github/ISSUE_TEMPLATE/feature-request.yml
new file mode 100644
index 0000000..d079c56
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/feature-request.yml
@@ -0,0 +1,31 @@
+name: 新的需求 Feature Request
+description:
+ 为Luminol提供新的想法。
+ Suggest an idea for Luminol.
+labels:
+ - enhancement
+body:
+ - type: markdown
+ attributes:
+ value: |
+ 感谢您为 Luminol 提交新的需求!请尽可能详细地描述,以便我们可以更轻松地考虑和审查请求。
+ Thank you for filling out a feature request for Luminol! Please be as detailed as possible so that we may consider and review the request easier.
+ 请搜索所有问题以避免重复的功能请求。如果您期望的功能已存在,请回复如果您有什么要补充的。
+ We ask that you search all the issues to avoid a duplicate feature request. If one exists, please reply if you have anything to add.
+ 在请求新功能之前,请确保您使用的是最新版本并且您请求的功能不在 Luminol 中。
+ Before requesting a new feature, please make sure you are using the latest version and that the feature you are requesting is not already in Paper.
+ 我们的开发人员可能没有过多时间来测试新功能的可用性,如新功能进入Test状态,您可以帮助我们进行测试并回复。
+ Our developers may not have much time to test the usability of new functions. If the new functions enter the Test state, you can help us test and reply.
+
+ - type: textarea
+ id: feature
+ attributes:
+ label: 描述你希望添加的功能。 Describe the feature you'd like.
+ placeholder: e.g. 添加新的PATH
+ validations:
+ required: true
+ - type: textarea
+ id: othre
+ attributes:
+ label: 其他 Other
+ description: 添加其他的信息。 Add any other context or screenshots about the feature request below.
\ No newline at end of file
diff --git a/.github/workflows/build_1_20_4.yml b/.github/workflows/build_1_20_4.yml_dis
similarity index 97%
rename from .github/workflows/build_1_20_4.yml
rename to .github/workflows/build_1_20_4.yml_dis
index e427438..577145a 100644
--- a/.github/workflows/build_1_20_4.yml
+++ b/.github/workflows/build_1_20_4.yml_dis
@@ -37,7 +37,7 @@ jobs:
- name: Build project to paperclip jar
uses: gradle/gradle-build-action@bd5760595778326ba7f1441bcf7e88b49de61a25 # v2.6.0
with:
- arguments: createReobfPaperclipJar
+ arguments: createReobfBundlerJar createReobfPaperclipJar
- name: Capture build artifacts
uses: actions/upload-artifact@v3
with:
diff --git a/.github/workflows/build_1_20_4_v2.yml b/.github/workflows/build_1_20_4_v2.yml
new file mode 100644
index 0000000..0d45a57
--- /dev/null
+++ b/.github/workflows/build_1_20_4_v2.yml
@@ -0,0 +1,64 @@
+name: Luminol CI v2 - Ver/1.20.4
+
+on:
+ push:
+ branches: [ "ver/1.20.4" ]
+ pull_request:
+ branches: [ "ver/1.20.4" ]
+ # workflow_dispatch:
+permissions: write-all
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ environment: default
+
+ steps:
+ - name: Checkout Git Repository
+ uses: actions/checkout@v3
+ - name: Set up JDK
+ uses: actions/setup-java@v3
+ with:
+ distribution: 'temurin'
+ java-version: '17'
+ - name: Setup Git Config
+ run: |
+ git config --global user.email "ci@luminolmc.com"
+ git config --global user.name "Luminol CI"
+ - name: Apply Patches
+ run: ./gradlew applyPatches
+ - name: Build
+ run: ./gradlew createReobfBundlerJar createReobfPaperclipJar
+ - uses: "actions/upload-artifact@v3"
+ with:
+ name: "Luminol CI Artifacts"
+ path: "build/libs/*.jar"
+ - name: Rename jar file
+ run: |
+ mv build/libs/luminol-bundler-1.20.4-R0.1-SNAPSHOT-reobf.jar build/libs/luminol-1.20.4-bundler.jar
+ mv build/libs/luminol-paperclip-1.20.4-R0.1-SNAPSHOT-reobf.jar build/libs/luminol-1.20.4-paperclip.jar
+ - name: setenv
+ run: |
+ sh scripts/SetENV.sh
+ echo "${{ env.tag }}"
+ - name: Create Release
+ if: "!contains(github.event.commits[0].message, '[release-skip]')"
+ uses: ncipollo/release-action@v1.12.0
+ with:
+ tag: ${{ env.tag }}
+ name: Luminol ${{ env.mcversion }} - ${{ env.commitid }}
+ body: |
+ 📦Version: `${{ env.mcversion }}` | Commit ${{ env.commitid }} [](https://github.com/LeavesMC/LuminolMC/Luminol/download/${{ env.tag }}/luminol-1.20.4-paperclip.jar)
+ This release is automatically compiled by GitHub Actions
+ artifacts: |
+ build/libs/luminol-1.20.4-bundler.jar
+ build/libs/luminol-1.20.4-paperclip.jar
+ generateReleaseNotes: true
+ prerelease: ${{ env.pre }}
+ makeLatest: ${{ env.make_latest }}
+ token: "${{ secrets.GITHUB_TOKEN }}"
+ - name: Push to Api
+ if: "!contains(github.event.commits[0].message, '[release-skip]')"
+ env:
+ secret_v2: ${{ secrets.API_KEY }}
+ tag: ${{ env.tag }}
+ run: sh scripts/PushToAPI.sh
diff --git a/README.md b/README.md
index fb47da6..983484f 100644
--- a/README.md
+++ b/README.md
@@ -74,3 +74,4 @@ QQ群: [368632360](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=MfosKhcDd8Fdxn1MREu
+
diff --git a/gradle.properties b/gradle.properties
index 5c0e033..fa22334 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -7,3 +7,7 @@ org.gradle.caching = true
org.gradle.parallel = true
org.gradle.vfs.watch = false
org.gradle.jvmargs = -Xmx3G
+
+mcVersion=1.20.4
+GroupMCV=1.20
+preVersion=false
\ No newline at end of file
diff --git a/scripts/PushToAPI.sh b/scripts/PushToAPI.sh
index e69de29..0656fa7 100644
--- a/scripts/PushToAPI.sh
+++ b/scripts/PushToAPI.sh
@@ -0,0 +1,25 @@
+sha256() {
+ sha256sum $1 | awk '{print $1}'
+}
+
+prop() {
+ grep "${1}" gradle.properties | cut -d'=' -f2 | sed 's/\r//'
+}
+project_id="luminol"
+mcversion_group=$(prop GroupMCV)
+mcversion=$(prop mcVersion)
+pre=$(prop preVersion)
+if [ $pre = "true" ]; then
+ channel="experimental"
+else
+ channel="default"
+fi
+changes=$(git log -1 --pretty='[{"commit": "%H", "message": "%s", "summary": "%b"}]')
+jar_sha256=`sha256 build/libs/luminol-1.20.4-paperclip.jar`
+jar_name="luminol-1.20.4-paperclip.jar"
+ctime=$(date -u +"%s")"000"
+
+# v2
+echo "Authentication: $secret_v2"
+echo "[DEBUG] curl --location --request POST "https://api.luminolmc.com/v2/projects/$project_id/$mcversion/build/commit" -H "Content-Type: application/json" -H "Authorization: $secret_v2" --data-raw "{\"version_group\":\"$mcversion_group\",\"channel\":\"$channel\",\"changes\":\"$changes\",\"jar_name\":\"$jar_name\",\"sha256\":\"$jar_sha256\",\"release_tag\":\"$tag\",\"time\":\"$ctime\"}""
+curl --location --request POST "https://api.luminolmc.com/v2/projects/$project_id/$mcversion/build/commit" -H "Content-Type: application/json" -H "Authorization: $secret_v2" --data-raw "{\"version_group\":\"$mcversion_group\",\"channel\":\"$channel\",\"changes\":\"$changes\",\"jar_name\":\"$jar_name\",\"sha256\":\"$jar_sha256\",\"release_tag\":\"$tag\",\"time\":\"$ctime\"}"
diff --git a/scripts/SetENV.sh b/scripts/SetENV.sh
new file mode 100644
index 0000000..88f4caa
--- /dev/null
+++ b/scripts/SetENV.sh
@@ -0,0 +1,18 @@
+prop() {
+ grep "${1}" gradle.properties | cut -d'=' -f2 | sed 's/\r//'
+}
+
+commitid=$(git log --pretty='%h' -1)
+mcversion=$(prop mcVersion)
+preVersion=$(prop preVersion)
+release_tag="$mcversion-$commitid"
+jarName="build/libs/luminol-1.20.4-paperclip.jar"
+make_latest=$([ $preVersion = "true" ] && echo "false" || echo "true")
+
+echo "commitid=$commitid" >> $GITHUB_ENV
+echo "mcversion=$mcversion" >> $GITHUB_ENV
+echo "$mcversion"
+echo "tag=$release_tag" >> $GITHUB_ENV
+echo "jar=$jarName" >> $GITHUB_ENV
+echo "pre=$preVersion" >> $GITHUB_ENV
+echo "make_latest=$make_latest" >> $GITHUB_ENV