From 0a106e78f63874cc0afffcccb2c67a39df96ec13 Mon Sep 17 00:00:00 2001 From: Simon Gardling Date: Tue, 23 Mar 2021 16:51:30 -0400 Subject: [PATCH] revert paper commit that made the build fail (CI still doesn't work) --- PATCHES.md | 1 + ...ventory-getContents-null-annotations.patch | 23 +++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 patches/api/0009-Revert-fix-Inventory-getContents-null-annotations.patch diff --git a/PATCHES.md b/PATCHES.md index 00ee8427..d2ca26f4 100644 --- a/PATCHES.md +++ b/PATCHES.md @@ -348,6 +348,7 @@ # Patches | server | Remove streams | Paul Sauve | | | server | Remove streams for villager AI | Spottedleaf | | | server | Replace player chunk loader system | Spottedleaf | | +| api | Revert "fix Inventory#getContents null annotations" | Simon Gardling | | | server | Revert MC-4 fix | Spottedleaf | | | server | Revert getChunkAt(Async) retaining chunks for long periods of | Spottedleaf | | | server | Rework PlayerChunk main thread checks | Spottedleaf | | diff --git a/patches/api/0009-Revert-fix-Inventory-getContents-null-annotations.patch b/patches/api/0009-Revert-fix-Inventory-getContents-null-annotations.patch new file mode 100644 index 00000000..355a995c --- /dev/null +++ b/patches/api/0009-Revert-fix-Inventory-getContents-null-annotations.patch @@ -0,0 +1,23 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Simon Gardling +Date: Tue, 23 Mar 2021 16:46:54 -0400 +Subject: [PATCH] Revert "fix Inventory#getContents null annotations" + +This reverts commit a54b0723e96a8461802bfd2a35966334945123c2. + +diff --git a/src/main/java/org/bukkit/inventory/Inventory.java b/src/main/java/org/bukkit/inventory/Inventory.java +index 607eb670b5e6adc2a4dce81b6e56b219c8a4f95f..6386206188e820206bb1a9f516b5e194fdc9d952 100644 +--- a/src/main/java/org/bukkit/inventory/Inventory.java ++++ b/src/main/java/org/bukkit/inventory/Inventory.java +@@ -158,8 +158,9 @@ public interface Inventory extends Iterable { + * + * @return An array of ItemStacks from the inventory. Individual items may be null. + */ +- public @Nullable ItemStack @NotNull [] getContents(); // Paper - make array elements nullable instead array +- ++ @NotNull ++ public ItemStack[] getContents(); ++ + /** + * Completely replaces the inventory's contents. Removes all existing + * contents and replaces it with the ItemStacks given in the array.