Begin switching to JSpecify annotations (#11448)
* Begin switching to JSpecify annotations * more * fixes
This commit is contained in:
parent
6d7a438fad
commit
f9c7f2a5c1
66 changed files with 750 additions and 920 deletions
|
@ -48,7 +48,7 @@ index 0000000000000000000000000000000000000000..f75933948cdf0aa0c9bb2f06da5418f1
|
|||
+}
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/event/inventory/PrepareResultEvent.java b/src/main/java/com/destroystokyo/paper/event/inventory/PrepareResultEvent.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..c305c606bef93866993095cec5f50e191c5a382a
|
||||
index 0000000000000000000000000000000000000000..5ae8b843f78b22e300de0202fb800fcae6ff49b0
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/event/inventory/PrepareResultEvent.java
|
||||
@@ -0,0 +1,40 @@
|
||||
|
@ -58,18 +58,19 @@ index 0000000000000000000000000000000000000000..c305c606bef93866993095cec5f50e19
|
|||
+import org.bukkit.inventory.InventoryView;
|
||||
+import org.bukkit.inventory.ItemStack;
|
||||
+import org.jetbrains.annotations.ApiStatus;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+import org.jetbrains.annotations.Nullable;
|
||||
+import org.jspecify.annotations.NullMarked;
|
||||
+import org.jspecify.annotations.Nullable;
|
||||
+
|
||||
+/**
|
||||
+ * Called when an item is put in an inventory containing a result slot
|
||||
+ */
|
||||
+@NullMarked
|
||||
+public class PrepareResultEvent extends PrepareInventoryResultEvent {
|
||||
+
|
||||
+ // HandlerList on PrepareInventoryResultEvent to ensure api compat
|
||||
+
|
||||
+ @ApiStatus.Internal
|
||||
+ public PrepareResultEvent(@NotNull InventoryView inventory, @Nullable ItemStack result) {
|
||||
+ public PrepareResultEvent(final InventoryView inventory, final @Nullable ItemStack result) {
|
||||
+ super(inventory, result);
|
||||
+ }
|
||||
+
|
||||
|
@ -78,8 +79,7 @@ index 0000000000000000000000000000000000000000..c305c606bef93866993095cec5f50e19
|
|||
+ *
|
||||
+ * @return result item
|
||||
+ */
|
||||
+ @Nullable
|
||||
+ public ItemStack getResult() {
|
||||
+ public @Nullable ItemStack getResult() {
|
||||
+ return super.getResult();
|
||||
+ }
|
||||
+
|
||||
|
@ -88,7 +88,7 @@ index 0000000000000000000000000000000000000000..c305c606bef93866993095cec5f50e19
|
|||
+ *
|
||||
+ * @param result result item
|
||||
+ */
|
||||
+ public void setResult(@Nullable ItemStack result) {
|
||||
+ public void setResult(final @Nullable ItemStack result) {
|
||||
+ super.setResult(result);
|
||||
+ }
|
||||
+}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue