aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/api/0226-Add-PlayerFlowerPotManipulateEvent.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/api/0226-Add-PlayerFlowerPotManipulateEvent.patch')
-rw-r--r--patches/api/0226-Add-PlayerFlowerPotManipulateEvent.patch17
1 files changed, 6 insertions, 11 deletions
diff --git a/patches/api/0226-Add-PlayerFlowerPotManipulateEvent.patch b/patches/api/0226-Add-PlayerFlowerPotManipulateEvent.patch
index cb08fd1404..70a0b6ec31 100644
--- a/patches/api/0226-Add-PlayerFlowerPotManipulateEvent.patch
+++ b/patches/api/0226-Add-PlayerFlowerPotManipulateEvent.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Add PlayerFlowerPotManipulateEvent
diff --git a/src/main/java/io/papermc/paper/event/player/PlayerFlowerPotManipulateEvent.java b/src/main/java/io/papermc/paper/event/player/PlayerFlowerPotManipulateEvent.java
new file mode 100644
-index 0000000000000000000000000000000000000000..373a6ec68fb575b82b06bf250768c1a6909efe38
+index 0000000000000000000000000000000000000000..03881ae56b3dd68a0aa600382b4689f213ec05f3
--- /dev/null
+++ b/src/main/java/io/papermc/paper/event/player/PlayerFlowerPotManipulateEvent.java
-@@ -0,0 +1,85 @@
+@@ -0,0 +1,80 @@
+package io.papermc.paper.event.player;
+
+import org.bukkit.block.Block;
@@ -19,25 +19,24 @@ index 0000000000000000000000000000000000000000..373a6ec68fb575b82b06bf250768c1a6
+import org.bukkit.event.player.PlayerEvent;
+import org.bukkit.inventory.ItemStack;
+import org.jetbrains.annotations.ApiStatus;
-+import org.jetbrains.annotations.NotNull;
++import org.jspecify.annotations.NullMarked;
+
+/**
+ * Called when a player places an item in or takes an item out of a flowerpot.
+ */
++@NullMarked
+public class PlayerFlowerPotManipulateEvent extends PlayerEvent implements Cancellable {
+
+ private static final HandlerList HANDLER_LIST = new HandlerList();
+
-+ @NotNull
+ private final Block flowerpot;
-+ @NotNull
+ private final ItemStack item;
+ private final boolean placing;
+
+ private boolean cancelled;
+
+ @ApiStatus.Internal
-+ public PlayerFlowerPotManipulateEvent(@NotNull final Player player, @NotNull final Block flowerpot, @NotNull final ItemStack item, final boolean placing) {
++ public PlayerFlowerPotManipulateEvent(final Player player, final Block flowerpot, final ItemStack item, final boolean placing) {
+ super(player);
+ this.flowerpot = flowerpot;
+ this.item = item;
@@ -49,7 +48,6 @@ index 0000000000000000000000000000000000000000..373a6ec68fb575b82b06bf250768c1a6
+ *
+ * @return the flowerpot that is involved with this event
+ */
-+ @NotNull
+ public Block getFlowerpot() {
+ return this.flowerpot;
+ }
@@ -60,7 +58,6 @@ index 0000000000000000000000000000000000000000..373a6ec68fb575b82b06bf250768c1a6
+ *
+ * @return the item placed, or taken from, the flowerpot
+ */
-+ @NotNull
+ public ItemStack getItem() {
+ return this.item;
+ }
@@ -80,17 +77,15 @@ index 0000000000000000000000000000000000000000..373a6ec68fb575b82b06bf250768c1a6
+ }
+
+ @Override
-+ public void setCancelled(boolean cancel) {
++ public void setCancelled(final boolean cancel) {
+ this.cancelled = cancel;
+ }
+
-+ @NotNull
+ @Override
+ public HandlerList getHandlers() {
+ return HANDLER_LIST;
+ }
+
-+ @NotNull
+ public static HandlerList getHandlerList() {
+ return HANDLER_LIST;
+ }