From 13abe281c950df39a8fa1adc7985f9bd174a48a8 Mon Sep 17 00:00:00 2001 From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com> Date: Sat, 14 Jun 2025 06:19:36 +0800 Subject: [PATCH] [ci skip] Fix diff --- .github/workflows/build-1215.yml | 9 ++++++--- .github/workflows/publish-api.yml | 2 +- gradle/wrapper/gradle-wrapper.properties | 2 +- ...64-Do-not-place-player-if-the-server-is-full.patch | 4 ++-- .../features/0050-PlayerInventoryOverflowEvent.patch | 5 ++--- public/readme/README_CN.md | 11 ++++------- scripts/prepareRelease.sh | 2 +- 7 files changed, 17 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build-1215.yml b/.github/workflows/build-1215.yml index 65bdfc35..1a21f932 100644 --- a/.github/workflows/build-1215.yml +++ b/.github/workflows/build-1215.yml @@ -2,7 +2,7 @@ name: Build Leaf 1.21.5 on: push: - branches: [ "dev/1.21.5" ] + branches: [ "ver/1.21.5" ] workflow_dispatch: jobs: @@ -62,7 +62,7 @@ jobs: echo "org.gradle.jvmargs=${{ env.GRADLE_MEMORY }} -Dfile.encoding=UTF-8" >> ~/.gradle/gradle.properties echo "org.gradle.parallel=true" >> ~/.gradle/gradle.properties echo "org.gradle.daemon=true" >> ~/.gradle/gradle.properties - # This is only need if we create custom gradle.properies in home directory + # This is only need if we create custom gradle.properies in home directory echo "leafUsername=${{ secrets.REPO_USER }}" >> ~/.gradle/gradle.properties echo "leafPassword=${{ secrets.REPO_PASSWORD }}" >> ~/.gradle/gradle.properties @@ -106,7 +106,7 @@ jobs: token: "${{ secrets.GITHUB_TOKEN }}" target_commitish: "${{ github.sha }}" draft: false - prerelease: true + prerelease: false - name: Calculate SHA-256 id: hash @@ -114,6 +114,7 @@ jobs: FILE_NAME="leaf-1.21.5-${{ env.BUILD_NUMBER }}.jar" HASH=$(sha256sum "$FILE_NAME" | awk '{ print $1 }') echo "sha256=$HASH" >> $GITHUB_OUTPUT + - name: Upload JAR to download API uses: appleboy/scp-action@master with: @@ -132,7 +133,9 @@ jobs: script: | BRANCH="${{ github.ref_name }}" REPO_DIR="/root/Leaf-${BRANCH//\//-}" # Replace slashes with dashes to avoid directory issues + [ -d "$REPO_DIR/.git" ] && cd "$REPO_DIR" && git fetch origin && git checkout "$BRANCH" && git reset --hard "origin/$BRANCH" || git clone --branch "$BRANCH" --depth 1 https://github.com/Winds-Studio/Leaf "$REPO_DIR" + # Proceed to insert the build into the API cd ~/api/cli node insertBuild.js \ diff --git a/.github/workflows/publish-api.yml b/.github/workflows/publish-api.yml index 16783987..de37f45f 100644 --- a/.github/workflows/publish-api.yml +++ b/.github/workflows/publish-api.yml @@ -1,7 +1,7 @@ name: Publish API on: push: - branches: [ "dev/1.21.5" ] + branches: [ "ver/1.21.5" ] jobs: build: diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 002b867c..ff23a68d 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.2-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/leaf-server/minecraft-patches/features/0164-Do-not-place-player-if-the-server-is-full.patch b/leaf-server/minecraft-patches/features/0164-Do-not-place-player-if-the-server-is-full.patch index 80d40261..ff503088 100644 --- a/leaf-server/minecraft-patches/features/0164-Do-not-place-player-if-the-server-is-full.patch +++ b/leaf-server/minecraft-patches/features/0164-Do-not-place-player-if-the-server-is-full.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Do not place player if the server is full Fix https://github.com/PaperMC/Paper/issues/10668 diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java -index fae3c65d7411cd2c279dde27f8b8eafd45b657cf..34c5c2e3d6b0706cb91ec0171969cf81e94741a4 100644 +index fae3c65d7411cd2c279dde27f8b8eafd45b657cf..e11bc2fb26d259f0b35cbd94b4a3aed1a33ca0bc 100644 --- a/net/minecraft/server/players/PlayerList.java +++ b/net/minecraft/server/players/PlayerList.java @@ -342,6 +342,13 @@ public abstract class PlayerList { @@ -14,7 +14,7 @@ index fae3c65d7411cd2c279dde27f8b8eafd45b657cf..34c5c2e3d6b0706cb91ec0171969cf81 } // Gale end - MultiPaper - do not place player in world if kicked before being spawned in + // Leaf start - Do not place player if the server is full - copied from canPlayerLogin -+ if (org.dreeam.leaf.config.modules.fixes.DontPlacePlayerIfFull.enabled && this.realPlayers.size() >= this.maxPlayers && !(player.getBukkitEntity().hasPermission("purpur.joinfullserver") || this.canBypassPlayerLimit(gameProfile))) { // Purpur - Allow player join full server by permission ++ if (org.dreeam.leaf.config.modules.fixes.DontPlacePlayerIfFull.enabled && this.realPlayers.size() >= this.maxPlayers && !(player.getBukkitEntity().hasPermission("purpur.joinfullserver") || this.canBypassPlayerLimit(gameProfile))) { // Purpur - Allow player join full server by permission // Leaves - only real player + connection.disconnect(io.papermc.paper.adventure.PaperAdventure.asVanilla(net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(org.spigotmc.SpigotConfig.serverFullMessage))); + //playerconnection.disconnect(io.papermc.paper.adventure.PaperAdventure.asVanilla(net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(org.spigotmc.SpigotConfig.serverFullMessage)), org.bukkit.event.player.PlayerKickEvent.Cause.TIMEOUT); + return; diff --git a/leaf-server/paper-patches/features/0050-PlayerInventoryOverflowEvent.patch b/leaf-server/paper-patches/features/0050-PlayerInventoryOverflowEvent.patch index 75335a21..e3f97236 100644 --- a/leaf-server/paper-patches/features/0050-PlayerInventoryOverflowEvent.patch +++ b/leaf-server/paper-patches/features/0050-PlayerInventoryOverflowEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] PlayerInventoryOverflowEvent diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java -index 19180c08f41db939c1a9f0caeb62e5beb1117f69..9b5c8c4c39657c18e67ad654bd0e5a30c09232c6 100644 +index 19180c08f41db939c1a9f0caeb62e5beb1117f69..aff8d16b17992f3228eb9fe8f2bd01d2d7aeea54 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java -@@ -340,9 +340,49 @@ public class CraftInventory implements Inventory { +@@ -340,9 +340,48 @@ public class CraftInventory implements Inventory { } } } @@ -46,7 +46,6 @@ index 19180c08f41db939c1a9f0caeb62e5beb1117f69..9b5c8c4c39657c18e67ad654bd0e5a30 + org.dreeam.leaf.event.player.PlayerInventoryOverflowEvent.isListeningInvOverflowCached = 1; + return true; + } -+ ; + } + } + } diff --git a/public/readme/README_CN.md b/public/readme/README_CN.md index 74545273..74cba815 100644 --- a/public/readme/README_CN.md +++ b/public/readme/README_CN.md @@ -87,17 +87,14 @@ java { ``` ## ⚖️ 许可证 -Paperweight 文件基于 [MIT](licenses/MIT.txt) 许可证。 -补丁基于 [MIT](licenses/MIT.txt) 许可证,除非在补丁顶部注释中另有说明。 -二进制文件基于 [GPL-3.0](licenses/GPL-3.0.txt) 许可证。 - -另请参阅 [PaperMC/Paper](https://github.com/PaperMC/Paper) 和 [PaperMC/paperweight](https://github.com/PaperMC/paperweight) 了解本项目使用的一些材料的许可证。 - -## 📜 致谢 Leaf 根据其上游项目及其他材料,采用多种开源许可证授权, 请参阅 [LICENSE.md](../../LICENSE.md) 获取完整的许可信息。 +## 📜 致谢 +感谢以下项目。Leaf 包含了一些取自这些项目的补丁。
+如果没有这些优秀的项目,Leaf 就不会变得如此出色。 + - [Gale](https://github.com/Dreeam-qwq/Gale) ([原始仓库](https://github.com/GaleMC/Gale)) - [Pufferfish](https://github.com/pufferfish-gg/Pufferfish) - [Purpur](https://github.com/PurpurMC/Purpur) diff --git a/scripts/prepareRelease.sh b/scripts/prepareRelease.sh index 816c5a05..28233ee0 100755 --- a/scripts/prepareRelease.sh +++ b/scripts/prepareRelease.sh @@ -3,7 +3,7 @@ set -e IS_EOL=false IS_UNSUPPORTED=false -IS_DEV=true +IS_DEV=false JAR_NAME="leaf-1.21.5" CURRENT_TAG="ver-1.21.5"