9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2026-01-06 15:51:31 +00:00

Some work

This commit is contained in:
Dreeam
2025-04-07 11:35:31 -04:00
parent 9eca4c0c74
commit 5e1be48cf8
111 changed files with 71 additions and 88 deletions

View File

@@ -1,26 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com>
Date: Wed, 19 Feb 2025 00:36:20 -0500
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..59ab5bd3582cdae351d579719244c4ad28878a00 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
@@ -340,6 +340,15 @@ public class CraftInventory implements Inventory {
}
}
}
+
+ // Leaf start - PlayerInventoryOverflowEvent
+ if (org.dreeam.leaf.event.player.PlayerInventoryOverflowEvent.getHandlerList().getRegisteredListeners().length > 0 && !leftover.isEmpty() && this.getHolder() instanceof org.bukkit.craftbukkit.entity.CraftPlayer craftPlayer) {
+ new org.dreeam.leaf.event.player.PlayerInventoryOverflowEvent(craftPlayer, leftover).callEvent();
+
+ leftover = new HashMap<>();
+ }
+ // Leaf end - PlayerInventoryOverflowEvent
+
return leftover;
}