Files
Purpur/patches/api/0026-Add-LootableInventoryFirstFillEvent.patch
William Blake Galbreath c0c212bf48 Updated Upstream (Paper)
Upstream has released updates that appears to apply and compile correctly

Paper Changes:
b75eeca0 Boost light task priority to ensure it doesnt hold up chunk loads
3d2bc848 Ensure VillagerTrades doesn't load async - fixes #3495
e470f1ef Add more information to Timing Reports
f4a47db6 Improve Thread Pool usage to allow single threads for single cpu servers
a4fe910f Fix sounds when using worldedit regen command
70ad51a8 Updated Upstream (Bukkit/CraftBukkit)
d7cfa4fa Improve legacy format serialization more
2020-06-05 21:42:48 -05:00

62 lines
1.8 KiB
Diff

From d791d6fabb76c20a61628b1385c9fd4082e4182a Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <blake.galbreath@gmail.com>
Date: Sat, 19 Oct 2019 02:43:10 -0500
Subject: [PATCH] Add LootableInventoryFirstFillEvent
---
.../LootableInventoryFirstFillEvent.java | 42 +++++++++++++++++++
1 file changed, 42 insertions(+)
create mode 100644 src/main/java/net/pl3x/purpur/event/block/LootableInventoryFirstFillEvent.java
diff --git a/src/main/java/net/pl3x/purpur/event/block/LootableInventoryFirstFillEvent.java b/src/main/java/net/pl3x/purpur/event/block/LootableInventoryFirstFillEvent.java
new file mode 100644
index 000000000..ef8eafb7c
--- /dev/null
+++ b/src/main/java/net/pl3x/purpur/event/block/LootableInventoryFirstFillEvent.java
@@ -0,0 +1,42 @@
+package net.pl3x.purpur.event.block;
+
+import com.destroystokyo.paper.loottable.LootableInventory;
+import org.bukkit.entity.Player;
+import org.bukkit.event.Event;
+import org.bukkit.event.HandlerList;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+
+public class LootableInventoryFirstFillEvent extends Event {
+ @Nullable
+ private final Player player;
+ @NotNull
+ private final LootableInventory inventory;
+
+ public LootableInventoryFirstFillEvent(@Nullable Player player, @NotNull LootableInventory inventory) {
+ this.player = player;
+ this.inventory = inventory;
+ }
+
+ @Nullable
+ public Player getPlayer() {
+ return player;
+ }
+
+ @NotNull
+ public LootableInventory getInventory() {
+ return inventory;
+ }
+
+ private static final HandlerList handlers = new HandlerList();
+
+ @NotNull
+ public HandlerList getHandlers() {
+ return handlers;
+ }
+
+ @NotNull
+ public static HandlerList getHandlerList() {
+ return handlers;
+ }
+}
--
2.24.0