diff --git a/patches/api/Fix-Spigot-annotation-mistakes.patch b/patches/api/Fix-Spigot-annotation-mistakes.patch index f4173495a..ca5317654 100644 --- a/patches/api/Fix-Spigot-annotation-mistakes.patch +++ b/patches/api/Fix-Spigot-annotation-mistakes.patch @@ -106,6 +106,15 @@ diff --git a/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent. index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent.java +++ b/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent.java +@@ -0,0 +0,0 @@ public class PrepareItemEnchantEvent extends InventoryEvent implements Cancellab + private boolean cancelled; + private final Player enchanter; + +- public PrepareItemEnchantEvent(@NotNull final Player enchanter, @NotNull InventoryView view, @NotNull final Block table, @NotNull final ItemStack item, @NotNull final EnchantmentOffer[] offers, final int bonus) { ++ public PrepareItemEnchantEvent(@NotNull final Player enchanter, @NotNull InventoryView view, @NotNull final Block table, @NotNull final ItemStack item, @org.jetbrains.annotations.Nullable final EnchantmentOffer @NotNull [] offers, final int bonus) { // Paper - offers can contain null values + super(view); + this.enchanter = enchanter; + this.table = table; @@ -0,0 +0,0 @@ public class PrepareItemEnchantEvent extends InventoryEvent implements Cancellab * @return experience level costs offered * @deprecated Use {@link #getOffers()} instead of this method @@ -114,6 +123,16 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @NotNull public int[] getExpLevelCostsOffered() { int[] levelOffers = new int[offers.length]; +@@ -0,0 +0,0 @@ public class PrepareItemEnchantEvent extends InventoryEvent implements Cancellab + * + * @return list of available enchantment offers + */ +- @NotNull +- public EnchantmentOffer[] getOffers() { ++ public @org.jetbrains.annotations.Nullable EnchantmentOffer @NotNull [] getOffers() { // Paper offers can contain null values + return offers; + } + diff --git a/src/main/java/org/bukkit/inventory/CraftingInventory.java b/src/main/java/org/bukkit/inventory/CraftingInventory.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/inventory/CraftingInventory.java