aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/api/0238-Add-BlockPreDispenseEvent.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/api/0238-Add-BlockPreDispenseEvent.patch')
-rw-r--r--patches/api/0238-Add-BlockPreDispenseEvent.patch14
1 files changed, 6 insertions, 8 deletions
diff --git a/patches/api/0238-Add-BlockPreDispenseEvent.patch b/patches/api/0238-Add-BlockPreDispenseEvent.patch
index 6a8e491828..44fccdf619 100644
--- a/patches/api/0238-Add-BlockPreDispenseEvent.patch
+++ b/patches/api/0238-Add-BlockPreDispenseEvent.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Add BlockPreDispenseEvent
diff --git a/src/main/java/io/papermc/paper/event/block/BlockPreDispenseEvent.java b/src/main/java/io/papermc/paper/event/block/BlockPreDispenseEvent.java
new file mode 100644
-index 0000000000000000000000000000000000000000..62547d5853e7355a805fa1e7f1e5f56d06fca4ba
+index 0000000000000000000000000000000000000000..fd10a34ec4e0731574cc7d69620e0b353ce8a21b
--- /dev/null
+++ b/src/main/java/io/papermc/paper/event/block/BlockPreDispenseEvent.java
-@@ -0,0 +1,65 @@
+@@ -0,0 +1,63 @@
+package io.papermc.paper.event.block;
+
+import org.bukkit.block.Block;
@@ -18,8 +18,9 @@ index 0000000000000000000000000000000000000000..62547d5853e7355a805fa1e7f1e5f56d
+import org.bukkit.event.block.BlockEvent;
+import org.bukkit.inventory.ItemStack;
+import org.jetbrains.annotations.ApiStatus;
-+import org.jetbrains.annotations.NotNull;
++import org.jspecify.annotations.NullMarked;
+
++@NullMarked
+public class BlockPreDispenseEvent extends BlockEvent implements Cancellable {
+
+ private static final HandlerList HANDLER_LIST = new HandlerList();
@@ -30,7 +31,7 @@ index 0000000000000000000000000000000000000000..62547d5853e7355a805fa1e7f1e5f56d
+ private boolean cancelled;
+
+ @ApiStatus.Internal
-+ public BlockPreDispenseEvent(@NotNull Block block, @NotNull ItemStack itemStack, int slot) {
++ public BlockPreDispenseEvent(final Block block, final ItemStack itemStack, final int slot) {
+ super(block);
+ this.itemStack = itemStack;
+ this.slot = slot;
@@ -41,7 +42,6 @@ index 0000000000000000000000000000000000000000..62547d5853e7355a805fa1e7f1e5f56d
+ *
+ * @return The item to be dispensed
+ */
-+ @NotNull
+ public ItemStack getItemStack() {
+ return this.itemStack;
+ }
@@ -61,16 +61,14 @@ index 0000000000000000000000000000000000000000..62547d5853e7355a805fa1e7f1e5f56d
+ }
+
+ @Override
-+ public void setCancelled(boolean cancel) {
++ public void setCancelled(final boolean cancel) {
+ this.cancelled = cancel;
+ }
+
-+ @NotNull
+ public HandlerList getHandlers() {
+ return HANDLER_LIST;
+ }
+
-+ @NotNull
+ public static HandlerList getHandlerList() {
+ return HANDLER_LIST;
+ }