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

Update changes from ver/1.21.4 branch

This commit is contained in:
Dreeam
2025-05-02 22:45:26 -04:00
84 changed files with 6041 additions and 1028 deletions

View File

@@ -13,16 +13,17 @@
val apiAndDocs: Configuration by configurations.creating {
attributes {
@@ -41,9 +_,11 @@
@@ -41,9 +_,13 @@
dependencies {
// api dependencies are listed transitively to API consumers
- api("com.google.guava:guava:33.3.1-jre")
- api("com.google.code.gson:gson:2.11.0")
- api("org.yaml:snakeyaml:2.2")
+ // Leaf start - Bump Dependencies
+ api("com.google.guava:guava:33.4.0-jre")
+ api("com.google.code.gson:gson:2.12.1")
+ // Waiting Paper, Gson has breaking change since 2.12.0
+ // See https://github.com/google/gson/commit/6c2e3db7d25ceceabe056aeb8b65477fdd509214
api("com.google.code.gson:gson:2.11.0")
- api("org.yaml:snakeyaml:2.2")
+ api("org.yaml:snakeyaml:2.3") // 2.4 removed `org.yaml.snakeyaml.external.biz.base64Coder.Base64Coder`
+ // Leaf end - Bump Dependencies
api("org.joml:joml:1.10.8") {

View File

@@ -4,12 +4,40 @@ Date: Wed, 19 Feb 2025 00:34:16 -0500
Subject: [PATCH] PlayerInventoryOverflowEvent
diff --git a/src/main/java/org/bukkit/event/HandlerList.java b/src/main/java/org/bukkit/event/HandlerList.java
index ef9d9f3ddaf25aa990715139e1916672f76c35e5..97b591ab30d6e0af4518b71fefcf9c8f3c050176 100644
--- a/src/main/java/org/bukkit/event/HandlerList.java
+++ b/src/main/java/org/bukkit/event/HandlerList.java
@@ -64,6 +64,7 @@ public class HandlerList {
h.handlers = null;
}
}
+ org.dreeam.leaf.event.player.PlayerInventoryOverflowEvent.isListeningInvOverflowCached = -1; // Leaf - PlayerInventoryOverflowEvent
}
}
@@ -77,6 +78,7 @@ public class HandlerList {
for (HandlerList h : allLists) {
h.unregister(plugin);
}
+ org.dreeam.leaf.event.player.PlayerInventoryOverflowEvent.isListeningInvOverflowCached = -1; // Leaf - PlayerInventoryOverflowEvent
}
}
@@ -90,6 +92,7 @@ public class HandlerList {
for (HandlerList h : allLists) {
h.unregister(listener);
}
+ org.dreeam.leaf.event.player.PlayerInventoryOverflowEvent.isListeningInvOverflowCached = -1; // Leaf - PlayerInventoryOverflowEvent
}
}
diff --git a/src/main/java/org/dreeam/leaf/event/player/PlayerInventoryOverflowEvent.java b/src/main/java/org/dreeam/leaf/event/player/PlayerInventoryOverflowEvent.java
new file mode 100644
index 0000000000000000000000000000000000000000..44c65eb6c503b94ac73d2b2169359be1b4810c98
index 0000000000000000000000000000000000000000..eae76671190ef84529c0dd503263e43a15a74e8a
--- /dev/null
+++ b/src/main/java/org/dreeam/leaf/event/player/PlayerInventoryOverflowEvent.java
@@ -0,0 +1,63 @@
@@ -0,0 +1,65 @@
+package org.dreeam.leaf.event.player;
+
+import org.bukkit.entity.Player;
@@ -36,6 +64,8 @@ index 0000000000000000000000000000000000000000..44c65eb6c503b94ac73d2b2169359be1
+
+ private static final HandlerList HANDLER_LIST = new HandlerList();
+
+ public static short isListeningInvOverflowCached = -1;
+
+ private final Inventory inventory;
+ private final Map<Integer, ItemStack> overflowItemStacks;
+