[ci skip] Cleanup events (#10202)

This commit is contained in:
Lulu13022002 2024-02-01 10:15:57 +01:00 committed by GitHub
parent b3c81089ae
commit 294347bee2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
295 changed files with 3245 additions and 3088 deletions

View file

@ -189,21 +189,27 @@ index 0000000000000000000000000000000000000000..2b01a50b6e18856f4c9e28340a7a111c
+}
diff --git a/src/main/java/com/destroystokyo/paper/loottable/LootableInventoryReplenishEvent.java b/src/main/java/com/destroystokyo/paper/loottable/LootableInventoryReplenishEvent.java
new file mode 100644
index 0000000000000000000000000000000000000000..fd184f13f5e8ee5cf829fff4f44696e1f760430b
index 0000000000000000000000000000000000000000..5ee1a04aaaa4ef09559f2cf757811e463e2a1be6
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/loottable/LootableInventoryReplenishEvent.java
@@ -0,0 +1,45 @@
@@ -0,0 +1,47 @@
+package com.destroystokyo.paper.loottable;
+
+import org.bukkit.entity.Player;
+import org.bukkit.event.Cancellable;
+import org.bukkit.event.HandlerList;
+import org.bukkit.event.player.PlayerEvent;
+import org.jetbrains.annotations.ApiStatus;
+import org.jetbrains.annotations.NotNull;
+
+public class LootableInventoryReplenishEvent extends PlayerEvent implements Cancellable {
+ @NotNull private final LootableInventory inventory;
+
+ private static final HandlerList HANDLER_LIST = new HandlerList();
+
+ @NotNull private final LootableInventory inventory;
+ private boolean cancelled;
+
+ @ApiStatus.Internal
+ public LootableInventoryReplenishEvent(@NotNull Player player, @NotNull LootableInventory inventory) {
+ super(player);
+ this.inventory = inventory;
@ -211,31 +217,27 @@ index 0000000000000000000000000000000000000000..fd184f13f5e8ee5cf829fff4f44696e1
+
+ @NotNull
+ public LootableInventory getInventory() {
+ return inventory;
+ return this.inventory;
+ }
+
+ private static final HandlerList handlers = new HandlerList();
+
+ @NotNull
+ public HandlerList getHandlers() {
+ return handlers;
+ }
+
+ @NotNull
+ public static HandlerList getHandlerList() {
+ return handlers;
+ }
+
+ private boolean cancelled = false;
+
+ @Override
+ public boolean isCancelled() {
+ return cancelled;
+ return this.cancelled;
+ }
+
+ @Override
+ public void setCancelled(boolean cancel) {
+ cancelled = cancel;
+ this.cancelled = cancel;
+ }
+
+ @NotNull
+ public HandlerList getHandlers() {
+ return HANDLER_LIST;
+ }
+
+ @NotNull
+ public static HandlerList getHandlerList() {
+ return HANDLER_LIST;
+ }
+}
diff --git a/src/main/java/org/bukkit/block/Barrel.java b/src/main/java/org/bukkit/block/Barrel.java