Finish converting all events to jspecify annotations
This commit is contained in:
parent
ea00be3aaa
commit
ba3c29b92e
82 changed files with 977 additions and 1103 deletions
|
@ -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;
|
||||
+ }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue