[ci skip] Cleanup events (#10202)

This commit is contained in:
Lulu13022002
2024-02-01 10:15:57 +01:00
parent d676979ea0
commit f7e469eb2e
187 changed files with 2415 additions and 2258 deletions

View File

@@ -17,14 +17,19 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+import org.bukkit.event.HandlerList;
+import org.bukkit.event.block.BlockEvent;
+import org.bukkit.inventory.ItemStack;
+import org.jetbrains.annotations.ApiStatus;
+import org.jetbrains.annotations.NotNull;
+
+public class BlockPreDispenseEvent extends BlockEvent implements Cancellable {
+ private static final HandlerList handlers = new HandlerList();
+ private boolean cancelled = false;
+
+ private static final HandlerList HANDLER_LIST = new HandlerList();
+
+ private final ItemStack itemStack;
+ private final int slot;
+
+ private boolean cancelled;
+
+ @ApiStatus.Internal
+ public BlockPreDispenseEvent(@NotNull Block block, @NotNull ItemStack itemStack, int slot) {
+ super(block);
+ this.itemStack = itemStack;
@@ -38,7 +43,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ */
+ @NotNull
+ public ItemStack getItemStack() {
+ return itemStack;
+ return this.itemStack;
+ }
+
+ /**
@@ -47,17 +52,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ * @return The inventory slot
+ */
+ public int getSlot() {
+ return slot;
+ }
+
+ @NotNull
+ public HandlerList getHandlers() {
+ return handlers;
+ }
+
+ @NotNull
+ public static HandlerList getHandlerList() {
+ return handlers;
+ return this.slot;
+ }
+
+ @Override
@@ -69,4 +64,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ public void setCancelled(boolean cancel) {
+ this.cancelled = cancel;
+ }
+
+ @NotNull
+ public HandlerList getHandlers() {
+ return HANDLER_LIST;
+ }
+
+ @NotNull
+ public static HandlerList getHandlerList() {
+ return HANDLER_LIST;
+ }
+}