mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-02 14:58:43 +01:00
Fix annotations so Inventory#getContents returns non-null array with nullable type (#5350)
This commit is contained in:
parent
68f0738631
commit
4a1f5cb85e
1 changed files with 22 additions and 0 deletions
|
@ -0,0 +1,22 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: CDFN <codefun@protonmail.com>
|
||||
Date: Fri, 12 Mar 2021 18:31:31 +0100
|
||||
Subject: [PATCH] fix Inventory#getContents null annotations
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/inventory/Inventory.java b/src/main/java/org/bukkit/inventory/Inventory.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/Inventory.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/Inventory.java
|
||||
@@ -0,0 +0,0 @@ public interface Inventory extends Iterable<ItemStack> {
|
||||
*
|
||||
* @return An array of ItemStacks from the inventory. Individual items may be null.
|
||||
*/
|
||||
- @NotNull
|
||||
- public ItemStack[] getContents();
|
||||
-
|
||||
+ public @Nullable ItemStack @NotNull [] getContents(); // Paper - make array elements nullable instead array
|
||||
+
|
||||
/**
|
||||
* Completely replaces the inventory's contents. Removes all existing
|
||||
* contents and replaces it with the ItemStacks given in the array.
|
Loading…
Add table
Reference in a new issue