diff options
author | masmc05 <[email protected]> | 2024-12-23 17:20:12 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2024-12-23 16:20:12 +0100 |
commit | 62d4130bbaeb6e6bcd41e72f9a512ab90d0486b3 (patch) | |
tree | a86b28da4eb7d5beddc6e2f834f98016cecca32f /paper-api | |
parent | 63c94c90d9386bf4343c51753f2a386eb64cca60 (diff) | |
download | Paper-62d4130bbaeb6e6bcd41e72f9a512ab90d0486b3.tar.gz Paper-62d4130bbaeb6e6bcd41e72f9a512ab90d0486b3.zip |
[ci skip] Fix Inventory#addItem javadoc mismatch with behaviour (#11782)
Diffstat (limited to 'paper-api')
-rw-r--r-- | paper-api/src/main/java/org/bukkit/inventory/Inventory.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/paper-api/src/main/java/org/bukkit/inventory/Inventory.java b/paper-api/src/main/java/org/bukkit/inventory/Inventory.java index 0d519813c1..1cea8361c4 100644 --- a/paper-api/src/main/java/org/bukkit/inventory/Inventory.java +++ b/paper-api/src/main/java/org/bukkit/inventory/Inventory.java @@ -85,12 +85,12 @@ public interface Inventory extends Iterable<ItemStack> { * index of the varargs parameter. If all items are stored, it will return * an empty HashMap. * <p> - * If you pass in ItemStacks which exceed the maximum stack size for the - * Material, first they will be added to partial stacks where - * Material.getMaxStackSize() is not exceeded, up to - * Material.getMaxStackSize(). When there are no partial stacks left - * stacks will be split on Inventory.getMaxStackSize() allowing you to - * exceed the maximum stack size for that material. + * Items resulted from this method will not exceed the minimum + * of {@link ItemStack#getMaxStackSize()} and {@link #getMaxStackSize()}. + * <p> + * First, this method will try to fill all the partial stacks in the inventory. + * Then it will try to fill empty slots, over-stacked items being able to + * fill several empty slots. The rest are placed in the returned map. * <p> * It is known that in some implementations this method will also set * the inputted argument amount to the number of that item not placed in |