Finish converting all events to jspecify annotations

This commit is contained in:
Jake Potrebic 2024-09-29 16:48:34 -07:00
parent ea00be3aaa
commit ba3c29b92e
No known key found for this signature in database
GPG key ID: ECE0B3C133C016C5
82 changed files with 977 additions and 1103 deletions

View file

@ -7,36 +7,37 @@ Similar to SmithItemEvent, but for cartography tables.
diff --git a/src/main/java/io/papermc/paper/event/player/CartographyItemEvent.java b/src/main/java/io/papermc/paper/event/player/CartographyItemEvent.java
new file mode 100644
index 0000000000000000000000000000000000000000..659b620696e5cc0784ed707c70876e4348897c7f
index 0000000000000000000000000000000000000000..d5c67f5462b9011683ce742a197959f9c4380d40
--- /dev/null
+++ b/src/main/java/io/papermc/paper/event/player/CartographyItemEvent.java
@@ -0,0 +1,31 @@
@@ -0,0 +1,32 @@
+package io.papermc.paper.event.player;
+
+import org.bukkit.inventory.InventoryView;
+import org.bukkit.inventory.CartographyInventory;
+import org.bukkit.event.inventory.ClickType;
+import org.bukkit.event.inventory.InventoryType;
+import org.bukkit.event.inventory.InventoryAction;
+import org.bukkit.event.inventory.InventoryClickEvent;
+import org.jetbrains.annotations.NotNull;
+import org.bukkit.event.inventory.InventoryType;
+import org.bukkit.inventory.CartographyInventory;
+import org.bukkit.inventory.InventoryView;
+import org.jetbrains.annotations.ApiStatus;
+import org.jspecify.annotations.NullMarked;
+
+/**
+ * Called when the recipe of an Item is completed inside a cartography table.
+ */
+@NullMarked
+public class CartographyItemEvent extends InventoryClickEvent {
+
+ @ApiStatus.Internal
+ public CartographyItemEvent(@NotNull InventoryView view, @NotNull InventoryType.SlotType type, int slot, @NotNull ClickType click, @NotNull InventoryAction action) {
+ public CartographyItemEvent(final InventoryView view, final InventoryType.SlotType type, final int slot, final ClickType click, final InventoryAction action) {
+ super(view, type, slot, click, action);
+ }
+
+ @ApiStatus.Internal
+ public CartographyItemEvent(@NotNull InventoryView view, @NotNull InventoryType.SlotType type, int slot, @NotNull ClickType click, @NotNull InventoryAction action, int key) {
+ public CartographyItemEvent(final InventoryView view, final InventoryType.SlotType type, final int slot, final ClickType click, final InventoryAction action, final int key) {
+ super(view, type, slot, click, action, key);
+ }
+
+ @NotNull
+ @Override
+ public CartographyInventory getInventory() {
+ return (CartographyInventory) super.getInventory();