diff --git a/patches/unapplied/api/Add-Block-isValidTool.patch b/patches/api/Add-Block-isValidTool.patch similarity index 100% rename from patches/unapplied/api/Add-Block-isValidTool.patch rename to patches/api/Add-Block-isValidTool.patch diff --git a/patches/unapplied/api/Add-recipe-to-cook-events.patch b/patches/api/Add-recipe-to-cook-events.patch similarity index 100% rename from patches/unapplied/api/Add-recipe-to-cook-events.patch rename to patches/api/Add-recipe-to-cook-events.patch diff --git a/patches/unapplied/api/Add-worldborder-events.patch b/patches/api/Add-worldborder-events.patch similarity index 100% rename from patches/unapplied/api/Add-worldborder-events.patch rename to patches/api/Add-worldborder-events.patch diff --git a/patches/unapplied/api/Cache-the-result-of-Material-isBlock.patch b/patches/api/Cache-the-result-of-Material-isBlock.patch similarity index 100% rename from patches/unapplied/api/Cache-the-result-of-Material-isBlock.patch rename to patches/api/Cache-the-result-of-Material-isBlock.patch diff --git a/patches/api/Fix-Spigot-annotation-mistakes.patch b/patches/api/Fix-Spigot-annotation-mistakes.patch index 10ee93361a..5ecab9d79f 100644 --- a/patches/api/Fix-Spigot-annotation-mistakes.patch +++ b/patches/api/Fix-Spigot-annotation-mistakes.patch @@ -105,6 +105,20 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @NotNull public int[] getExpLevelCostsOffered() { int[] levelOffers = new int[offers.length]; +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 { + * + * @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 diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/inventory/ItemFactory.java diff --git a/patches/unapplied/api/Implement-Keyed-on-World.patch b/patches/api/Implement-Keyed-on-World.patch similarity index 100% rename from patches/unapplied/api/Implement-Keyed-on-World.patch rename to patches/api/Implement-Keyed-on-World.patch diff --git a/patches/unapplied/api/Item-Rarity-API.patch b/patches/api/Item-Rarity-API.patch similarity index 100% rename from patches/unapplied/api/Item-Rarity-API.patch rename to patches/api/Item-Rarity-API.patch diff --git a/patches/unapplied/api/added-PlayerNameEntityEvent.patch b/patches/api/added-PlayerNameEntityEvent.patch similarity index 100% rename from patches/unapplied/api/added-PlayerNameEntityEvent.patch rename to patches/api/added-PlayerNameEntityEvent.patch diff --git a/patches/unapplied/server/Add-Block-isValidTool.patch b/patches/server/Add-Block-isValidTool.patch similarity index 100% rename from patches/unapplied/server/Add-Block-isValidTool.patch rename to patches/server/Add-Block-isValidTool.patch diff --git a/patches/unapplied/server/Add-fast-alternative-constructor-for-Rotations.patch b/patches/server/Add-fast-alternative-constructor-for-Rotations.patch similarity index 100% rename from patches/unapplied/server/Add-fast-alternative-constructor-for-Rotations.patch rename to patches/server/Add-fast-alternative-constructor-for-Rotations.patch diff --git a/patches/unapplied/server/Add-recipe-to-cook-events.patch b/patches/server/Add-recipe-to-cook-events.patch similarity index 100% rename from patches/unapplied/server/Add-recipe-to-cook-events.patch rename to patches/server/Add-recipe-to-cook-events.patch diff --git a/patches/unapplied/server/Add-worldborder-events.patch b/patches/server/Add-worldborder-events.patch similarity index 100% rename from patches/unapplied/server/Add-worldborder-events.patch rename to patches/server/Add-worldborder-events.patch diff --git a/patches/unapplied/server/Allow-using-signs-inside-spawn-protection.patch b/patches/server/Allow-using-signs-inside-spawn-protection.patch similarity index 78% rename from patches/unapplied/server/Allow-using-signs-inside-spawn-protection.patch rename to patches/server/Allow-using-signs-inside-spawn-protection.patch index b47c9531e7..0efd1588a1 100644 --- a/patches/unapplied/server/Allow-using-signs-inside-spawn-protection.patch +++ b/patches/server/Allow-using-signs-inside-spawn-protection.patch @@ -9,8 +9,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { - fixWitherTargetingBug = getBoolean("fix-wither-targeting-bug", false); - log("Withers properly target players: " + fixWitherTargetingBug); + expMergeMaxValue = getInt("experience-merge-max-value", -1); + log("Experience Merge Max Value: " + expMergeMaxValue); } + + public boolean allowUsingSignsInsideSpawnProtection = false; @@ -18,7 +18,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + allowUsingSignsInsideSpawnProtection = getBoolean("allow-using-signs-inside-spawn-protection", allowUsingSignsInsideSpawnProtection); + } } - diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -27,8 +26,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 int i = this.player.level.getMaxBuildHeight(); if (blockposition.getY() < i) { -- if (this.awaitingPositionFromClient == null && this.player.distanceToSqr((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D) < 64.0D && worldserver.mayInteract((net.minecraft.world.entity.player.Player) this.player, blockposition)) { -+ if (this.awaitingPositionFromClient == null && this.player.distanceToSqr((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D) < 64.0D && (worldserver.mayInteract((net.minecraft.world.entity.player.Player) this.player, blockposition) || (worldserver.paperConfig.allowUsingSignsInsideSpawnProtection && worldserver.getBlockState(blockposition).getBlock() instanceof net.minecraft.world.level.block.SignBlock))) { // Paper +- if (this.awaitingPositionFromClient == null && this.player.distanceToSqr((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D) < 64.0D && worldserver.mayInteract(this.player, blockposition)) { ++ if (this.awaitingPositionFromClient == null && this.player.distanceToSqr((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D) < 64.0D && (worldserver.mayInteract(this.player, blockposition) || (worldserver.paperConfig.allowUsingSignsInsideSpawnProtection && worldserver.getBlockState(blockposition).getBlock() instanceof net.minecraft.world.level.block.SignBlock))) { // Paper // CraftBukkit start - Check if we can actually do something over this large a distance // Paper - move check up this.player.stopUsingItem(); // SPIGOT-4706 diff --git a/patches/unapplied/server/Don-t-ignore-result-of-PlayerEditBookEvent.patch b/patches/server/Don-t-ignore-result-of-PlayerEditBookEvent.patch similarity index 94% rename from patches/unapplied/server/Don-t-ignore-result-of-PlayerEditBookEvent.patch rename to patches/server/Don-t-ignore-result-of-PlayerEditBookEvent.patch index 4f9416d70e..b10b585d92 100644 --- a/patches/unapplied/server/Don-t-ignore-result-of-PlayerEditBookEvent.patch +++ b/patches/server/Don-t-ignore-result-of-PlayerEditBookEvent.patch @@ -11,7 +11,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser } - itemstack.addTagElement("pages", (Tag) nbttaglist); + itemstack.addTagElement("pages", nbttaglist); - CraftEventFactory.handleEditBookEvent(player, slot, handItem, itemstack); // CraftBukkit + this.player.getInventory().setItem(slot, CraftEventFactory.handleEditBookEvent(player, slot, handItem, itemstack)); // CraftBukkit // Paper - Don't ignore result (see other callsite for handleEditBookEvent) } diff --git a/patches/unapplied/server/Drop-carried-item-when-player-has-disconnected.patch b/patches/server/Drop-carried-item-when-player-has-disconnected.patch similarity index 100% rename from patches/unapplied/server/Drop-carried-item-when-player-has-disconnected.patch rename to patches/server/Drop-carried-item-when-player-has-disconnected.patch diff --git a/patches/unapplied/server/Entity-load-save-limit-per-chunk.patch b/patches/server/Entity-load-save-limit-per-chunk.patch similarity index 93% rename from patches/unapplied/server/Entity-load-save-limit-per-chunk.patch rename to patches/server/Entity-load-save-limit-per-chunk.patch index 655431bd35..7d0398bd3b 100644 --- a/patches/unapplied/server/Entity-load-save-limit-per-chunk.patch +++ b/patches/server/Entity-load-save-limit-per-chunk.patch @@ -12,18 +12,17 @@ diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/m index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -0,0 +0,0 @@ import java.util.List; +@@ -0,0 +0,0 @@ import java.util.stream.Collectors; import it.unimi.dsi.fastutil.objects.Reference2IntMap; import it.unimi.dsi.fastutil.objects.Reference2IntOpenHashMap; import net.minecraft.world.entity.MobCategory; +import java.util.HashMap; +import java.util.Map; - import java.util.stream.Collectors; import net.minecraft.world.Difficulty; +import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.monster.Vindicator; import net.minecraft.world.entity.monster.Zombie; - import com.destroystokyo.paper.antixray.ChunkPacketBlockControllerAntiXray.EngineMode; + import org.bukkit.Bukkit; @@ -0,0 +0,0 @@ public class PaperWorldConfig { ); } @@ -41,7 +40,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + addEntityPerChunkSaveLimitsFromSection(config.getConfigurationSection("world-settings." + worldName + ".entity-per-chunk-save-limit"), entityPerChunkSaveLimits); + } + -+ private static void addEntityPerChunkSaveLimitsFromSection(final ConfigurationSection section, final Map, Integer> limitMap) { ++ private static void addEntityPerChunkSaveLimitsFromSection(final org.bukkit.configuration.ConfigurationSection section, final Map, Integer> limitMap) { + if (section == null) { + return; + } @@ -93,9 +92,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/world/level/chunk/storage/EntityStorage.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/EntityStorage.java @@ -0,0 +0,0 @@ public class EntityStorage implements EntityPersistentStorage { - } else { - ListTag nbttaglist = new ListTag(); + } else { + ListTag listTag = new ListTag(); + final java.util.Map, Integer> savedEntityCounts = new java.util.HashMap<>(); // Paper dataList.getEntities().forEach((entity) -> { + // Paper start @@ -108,6 +107,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + savedEntityCounts.merge(entityType, 1, Integer::sum); + } + // Paper end - CompoundTag nbttagcompound = new CompoundTag(); - - if (entity.save(nbttagcompound)) { + CompoundTag compoundTag = new CompoundTag(); + if (entity.save(compoundTag)) { + listTag.add(compoundTag); diff --git a/patches/unapplied/server/Implement-Keyed-on-World.patch b/patches/server/Implement-Keyed-on-World.patch similarity index 100% rename from patches/unapplied/server/Implement-Keyed-on-World.patch rename to patches/server/Implement-Keyed-on-World.patch diff --git a/patches/unapplied/server/Improve-ServerGUI.patch b/patches/server/Improve-ServerGUI.patch similarity index 100% rename from patches/unapplied/server/Improve-ServerGUI.patch rename to patches/server/Improve-ServerGUI.patch diff --git a/patches/unapplied/server/Item-Rarity-API.patch b/patches/server/Item-Rarity-API.patch similarity index 100% rename from patches/unapplied/server/Item-Rarity-API.patch rename to patches/server/Item-Rarity-API.patch diff --git a/patches/unapplied/server/Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch b/patches/server/Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch similarity index 66% rename from patches/unapplied/server/Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch rename to patches/server/Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch index afa74a6379..33b6a07b3e 100644 --- a/patches/unapplied/server/Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch +++ b/patches/server/Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch @@ -12,12 +12,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @@ -0,0 +0,0 @@ public class EntityType implements EntityTypeTest { @Nullable - public T spawnCreature(ServerLevel worldserver, @Nullable CompoundTag nbttagcompound, @Nullable Component ichatbasecomponent, @Nullable Player entityhuman, BlockPos blockposition, MobSpawnType enummobspawn, boolean flag, boolean flag1, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason spawnReason) { + public T spawn(ServerLevel worldserver, @Nullable CompoundTag nbttagcompound, @Nullable Component ichatbasecomponent, @Nullable Player entityhuman, BlockPos blockposition, MobSpawnType enummobspawn, boolean flag, boolean flag1, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason spawnReason) { + // Paper start - add consumer to modify entity before spawn -+ return this.spawnCreature(worldserver, nbttagcompound, ichatbasecomponent, entityhuman, blockposition, enummobspawn, flag, flag1, spawnReason, null); ++ return this.spawn(worldserver, nbttagcompound, ichatbasecomponent, entityhuman, blockposition, enummobspawn, flag, flag1, spawnReason, null); + } + @Nullable -+ public T spawnCreature(ServerLevel worldserver, @Nullable CompoundTag nbttagcompound, @Nullable Component ichatbasecomponent, @Nullable Player entityhuman, BlockPos blockposition, MobSpawnType enummobspawn, boolean flag, boolean flag1, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason spawnReason, @Nullable java.util.function.Consumer op) { ++ public T spawn(ServerLevel worldserver, @Nullable CompoundTag nbttagcompound, @Nullable Component ichatbasecomponent, @Nullable Player entityhuman, BlockPos blockposition, MobSpawnType enummobspawn, boolean flag, boolean flag1, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason spawnReason, @Nullable java.util.function.Consumer op) { + // Paper end // Paper start - Call PreCreatureSpawnEvent org.bukkit.entity.EntityType type = org.bukkit.entity.EntityType.fromName(EntityType.getKey(this).getPath()); @@ -29,7 +29,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + if (t0 != null && op != null) op.accept(t0); // Paper if (t0 != null) { - worldserver.addAllEntities(t0, spawnReason); + worldserver.addFreshEntityWithPassengers(t0, spawnReason); diff --git a/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java b/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java @@ -51,8 +51,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 return false; } -- WanderingTrader entityvillagertrader = (WanderingTrader) EntityType.WANDERING_TRADER.spawnCreature(world, (CompoundTag) null, (Component) null, (Player) null, blockposition2, MobSpawnType.EVENT, false, false, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.NATURAL); // CraftBukkit -+ WanderingTrader entityvillagertrader = EntityType.WANDERING_TRADER.spawnCreature(world, null, null, null, blockposition2, MobSpawnType.EVENT, false, false, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.NATURAL, trader -> trader.setDespawnDelay(48000)); // CraftBukkit // Paper - set despawnTimer before spawn events called +- WanderingTrader entityvillagertrader = (WanderingTrader) EntityType.WANDERING_TRADER.spawn(world, (CompoundTag) null, (Component) null, (Player) null, blockposition2, MobSpawnType.EVENT, false, false, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.NATURAL); // CraftBukkit ++ WanderingTrader entityvillagertrader = (WanderingTrader) EntityType.WANDERING_TRADER.spawn(world, (CompoundTag) null, (Component) null, (Player) null, blockposition2, MobSpawnType.EVENT, false, false, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.NATURAL, trader -> trader.setDespawnDelay(48000)); // CraftBukkit // Paper - set despawnTimer before spawn events called if (entityvillagertrader != null) { for (int i = 0; i < 2; ++i) { diff --git a/patches/unapplied/server/Prevent-grindstones-from-overstacking-items.patch b/patches/server/Prevent-grindstones-from-overstacking-items.patch similarity index 100% rename from patches/unapplied/server/Prevent-grindstones-from-overstacking-items.patch rename to patches/server/Prevent-grindstones-from-overstacking-items.patch diff --git a/patches/server/Remove-streams-from-SensorNearest.patch b/patches/server/Remove-streams-from-SensorNearest.patch index 63f161e6a9..7fdcb4d26b 100644 --- a/patches/server/Remove-streams-from-SensorNearest.patch +++ b/patches/server/Remove-streams-from-SensorNearest.patch @@ -55,7 +55,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - List list = world.players().stream().filter(EntitySelector.NO_SPECTATORS).filter((player) -> { - return entity.closerThan(player, 16.0D); - }).sorted(Comparator.comparingDouble(entity::distanceToSqr)).collect(Collectors.toList()); -+ List players= new java.util.ArrayList<>(world.players()); ++ List players = new java.util.ArrayList<>(world.players()); + players.removeIf(player -> !EntitySelector.NO_SPECTATORS.test(player) || !entity.closerThan(player, 16.0D)); + players.sort(Comparator.comparingDouble(entity::distanceTo)); Brain brain = entity.getBrain(); diff --git a/patches/unapplied/server/Throw-proper-exception-on-empty-JsonList-file.patch b/patches/server/Throw-proper-exception-on-empty-JsonList-file.patch similarity index 100% rename from patches/unapplied/server/Throw-proper-exception-on-empty-JsonList-file.patch rename to patches/server/Throw-proper-exception-on-empty-JsonList-file.patch diff --git a/patches/unapplied/server/added-PlayerNameEntityEvent.patch b/patches/server/added-PlayerNameEntityEvent.patch similarity index 100% rename from patches/unapplied/server/added-PlayerNameEntityEvent.patch rename to patches/server/added-PlayerNameEntityEvent.patch diff --git a/patches/unapplied/server/copy-TESign-isEditable-from-snapshots.patch b/patches/server/copy-TESign-isEditable-from-snapshots.patch similarity index 100% rename from patches/unapplied/server/copy-TESign-isEditable-from-snapshots.patch rename to patches/server/copy-TESign-isEditable-from-snapshots.patch diff --git a/patches/unapplied/server/fix-cancelling-block-falling-causing-client-desync.patch b/patches/server/fix-cancelling-block-falling-causing-client-desync.patch similarity index 100% rename from patches/unapplied/server/fix-cancelling-block-falling-causing-client-desync.patch rename to patches/server/fix-cancelling-block-falling-causing-client-desync.patch diff --git a/patches/unapplied/server/fix-converting-txt-to-json-file.patch b/patches/server/fix-converting-txt-to-json-file.patch similarity index 95% rename from patches/unapplied/server/fix-converting-txt-to-json-file.patch rename to patches/server/fix-converting-txt-to-json-file.patch index d3905acea5..16a0562672 100644 --- a/patches/unapplied/server/fix-converting-txt-to-json-file.patch +++ b/patches/server/fix-converting-txt-to-json-file.patch @@ -9,8 +9,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/server/dedicated/DedicatedPlayerList.java +++ b/src/main/java/net/minecraft/server/dedicated/DedicatedPlayerList.java @@ -0,0 +0,0 @@ public class DedicatedPlayerList extends PlayerList { - DedicatedServerProperties dedicatedServerProperties = server.getProperties(); this.setViewDistance(dedicatedServerProperties.viewDistance); + this.setSimulationDistance(dedicatedServerProperties.simulationDistance); super.setUsingWhiteList(dedicatedServerProperties.whiteList.get()); + // Paper start - moved from constructor + } @@ -58,4 +58,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + abstract public void loadAndSaveFiles(); // Paper - moved from DedicatedPlayerList constructor public void placeNewPlayer(Connection connection, ServerPlayer player) { - player.isRealPlayer = true; // Paper - Chunk priority + ServerPlayer prev = pendingPlayers.put(player.getUUID(), player);// Paper diff --git a/patches/unapplied/server/forced-whitelist-use-configurable-kick-message.patch b/patches/server/forced-whitelist-use-configurable-kick-message.patch similarity index 96% rename from patches/unapplied/server/forced-whitelist-use-configurable-kick-message.patch rename to patches/server/forced-whitelist-use-configurable-kick-message.patch index de43dfabcc..91d4ec7e0f 100644 --- a/patches/unapplied/server/forced-whitelist-use-configurable-kick-message.patch +++ b/patches/server/forced-whitelist-use-configurable-kick-message.patch @@ -13,9 +13,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 import net.minecraft.network.chat.Component; import net.minecraft.network.chat.TextComponent; -import net.minecraft.network.chat.TranslatableComponent; - import net.minecraft.network.protocol.Packet; import net.minecraft.network.protocol.game.ClientboundChangeDifficultyPacket; import net.minecraft.network.protocol.game.ClientboundSetTimePacket; + import net.minecraft.network.protocol.status.ServerStatus; @@ -0,0 +0,0 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop -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 { - * - * @return An array of ItemStacks from the inventory. Individual items may be null. - */ -- @NotNull -- public ItemStack[] getContents(); -- -+ public @org.checkerframework.checker.nullness.qual.Nullable ItemStack @org.checkerframework.checker.nullness.qual.NonNull [] 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.