9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2025-12-19 15:09:25 +00:00

[ci skip] Fix diff

This commit is contained in:
Dreeam
2025-06-14 06:19:36 +08:00
parent e485dabd49
commit 13abe281c9
7 changed files with 17 additions and 18 deletions

View File

@@ -2,7 +2,7 @@ name: Build Leaf 1.21.5
on: on:
push: push:
branches: [ "dev/1.21.5" ] branches: [ "ver/1.21.5" ]
workflow_dispatch: workflow_dispatch:
jobs: jobs:
@@ -106,7 +106,7 @@ jobs:
token: "${{ secrets.GITHUB_TOKEN }}" token: "${{ secrets.GITHUB_TOKEN }}"
target_commitish: "${{ github.sha }}" target_commitish: "${{ github.sha }}"
draft: false draft: false
prerelease: true prerelease: false
- name: Calculate SHA-256 - name: Calculate SHA-256
id: hash id: hash
@@ -114,6 +114,7 @@ jobs:
FILE_NAME="leaf-1.21.5-${{ env.BUILD_NUMBER }}.jar" FILE_NAME="leaf-1.21.5-${{ env.BUILD_NUMBER }}.jar"
HASH=$(sha256sum "$FILE_NAME" | awk '{ print $1 }') HASH=$(sha256sum "$FILE_NAME" | awk '{ print $1 }')
echo "sha256=$HASH" >> $GITHUB_OUTPUT echo "sha256=$HASH" >> $GITHUB_OUTPUT
- name: Upload JAR to download API - name: Upload JAR to download API
uses: appleboy/scp-action@master uses: appleboy/scp-action@master
with: with:
@@ -132,7 +133,9 @@ jobs:
script: | script: |
BRANCH="${{ github.ref_name }}" BRANCH="${{ github.ref_name }}"
REPO_DIR="/root/Leaf-${BRANCH//\//-}" # Replace slashes with dashes to avoid directory issues 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" [ -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 # Proceed to insert the build into the API
cd ~/api/cli cd ~/api/cli
node insertBuild.js \ node insertBuild.js \

View File

@@ -1,7 +1,7 @@
name: Publish API name: Publish API
on: on:
push: push:
branches: [ "dev/1.21.5" ] branches: [ "ver/1.21.5" ]
jobs: jobs:
build: build:

View File

@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists 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 networkTimeout=10000
validateDistributionUrl=true validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME

View File

@@ -6,7 +6,7 @@ Subject: [PATCH] Do not place player if the server is full
Fix https://github.com/PaperMC/Paper/issues/10668 Fix https://github.com/PaperMC/Paper/issues/10668
diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java 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 --- a/net/minecraft/server/players/PlayerList.java
+++ b/net/minecraft/server/players/PlayerList.java +++ b/net/minecraft/server/players/PlayerList.java
@@ -342,6 +342,13 @@ public abstract class PlayerList { @@ -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 // 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 + // 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))); + 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); + //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; + return;

View File

@@ -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 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 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
+++ b/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; + org.dreeam.leaf.event.player.PlayerInventoryOverflowEvent.isListeningInvOverflowCached = 1;
+ return true; + return true;
+ } + }
+ ;
+ } + }
+ } + }
+ } + }

View File

@@ -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 根据其上游项目及其他材料,采用多种开源许可证授权, Leaf 根据其上游项目及其他材料,采用多种开源许可证授权,
请参阅 [LICENSE.md](../../LICENSE.md) 获取完整的许可信息。 请参阅 [LICENSE.md](../../LICENSE.md) 获取完整的许可信息。
## 📜 致谢
感谢以下项目。Leaf 包含了一些取自这些项目的补丁。<br>
如果没有这些优秀的项目Leaf 就不会变得如此出色。
- [Gale](https://github.com/Dreeam-qwq/Gale) ([原始仓库](https://github.com/GaleMC/Gale)) - [Gale](https://github.com/Dreeam-qwq/Gale) ([原始仓库](https://github.com/GaleMC/Gale))
- [Pufferfish](https://github.com/pufferfish-gg/Pufferfish) - [Pufferfish](https://github.com/pufferfish-gg/Pufferfish)
- [Purpur](https://github.com/PurpurMC/Purpur) - [Purpur](https://github.com/PurpurMC/Purpur)

View File

@@ -3,7 +3,7 @@ set -e
IS_EOL=false IS_EOL=false
IS_UNSUPPORTED=false IS_UNSUPPORTED=false
IS_DEV=true IS_DEV=false
JAR_NAME="leaf-1.21.5" JAR_NAME="leaf-1.21.5"
CURRENT_TAG="ver-1.21.5" CURRENT_TAG="ver-1.21.5"