Repository: PaperMC/Paper
File: paper-api/src/main/java/org/bukkit/entity/HumanEntity.java (Java)

Code before:
     */
    @Nullable
    public Item dropItem(int slot, int amount, boolean throwRandomly, @Nullable Consumer<Item> entityOperation);

    /**
     * Makes the player drop an item from their inventory based on the inventory slot.
     *
     * @param slot   The slot to drop
     * @param amount The number of items to drop from this slot. Values below one always return null
     * @return The dropped item entity, or null if the action was unsuccessful
     * @throws IllegalArgumentException If the slot is negative or bigger than the player's inventory
     */
    @Nullable
    public default Item dropItem(int slot, int amount) {
        return this.dropItem(slot, amount, false, null);
    }

    /**
     * Makes the player drop all items from their inventory based on the inventory slot.
     *
     * @param slot The equipment slot to drop
     * @return The dropped item entity, or null if the action was unsuccessful
     */
    @Nullable
    public default Item dropItem(int slot) {
        return this.dropItem(slot, Integer.MAX_VALUE, false, null);
    }

    /**
     * Makes the player drop an item from their inventory based on the inventory slot.
     *
     * @param slot            The inventory slot to drop
     * @param throwRandomly   Instead of the item entity being dropped where the player is currently looking, this method makes it drop in
     *                        a random direction, similar to how items are dropped after a player's death.
     * @param entityOperation The function to be run before adding the entity into the world
     * @return The dropped item entity, or null if the action was unsuccessful
     */
    public default Item dropItem(int slot, boolean throwRandomly, @Nullable Consumer<Item> entityOperation) {
        return this.dropItem(slot, Integer.MAX_VALUE, throwRandomly, entityOperation);
    }

    /**
     * Makes the player drop an item from their inventory based on the equipment slot.
     *
     * @param slot            The equipment slot to drop
     * @param amount          The amount of items to drop from this equipment slot. Values below one always return null
     * @param throwRandomly   Instead of the item entity being dropped where the player is currently looking, this method makes it drop in
     *                        a random direction, similar to how items are dropped after a player's death.
     * @param entityOperation The function to be run before adding the entity into the world
     * @return The dropped item entity, or null if the action was unsuccessful
     */

Review comment (suggestion):
int max value feels a bit weird
this can probably just be moved to the impl and use the size of the stack

Code after:
    }

    /**
     * Makes the player drop an item from their inventory based on the inventory slot.
     *
     * @param slot   the slot to drop
     * @param amount the number of items to drop from this slot. Values below one always return null
     * @return the dropped item entity, or null if the action was unsuccessful
     * @throws IllegalArgumentException if the slot is negative or bigger than the player's inventory
     */
    @Nullable
    default Item dropItem(final int slot, final int amount) {
        return this.dropItem(slot, amount, false, null);
    }

    /**
     * Makes the player drop an item from their inventory based on the inventory slot.
     *
     * @param slot            the slot to drop
     * @param amount          the number of items to drop from this slot. Values below one always return null
     * @param throwRandomly   controls the randomness of the dropped items velocity, where {@code true} mimics dropped
     *                        items during a player's death, while {@code false} acts like a normal item drop.
     * @param entityOperation the function to be run before adding the entity into the world
     * @return the dropped item entity, or null if the action was unsuccessful
     * @throws IllegalArgumentException if the slot is negative or bigger than the player's inventory
     */
    @Nullable
    Item dropItem(int slot, int amount, boolean throwRandomly, @Nullable Consumer<Item> entityOperation);

    /**
     * Makes the player drop all items from their inventory based on the equipment slot.
     *
     * @param slot the equipment slot to drop
     * @return the dropped item entity, or null if the action was unsuccessful
     */
    @Nullable
    default Item dropItem(final @NotNull EquipmentSlot slot) {
        return this.dropItem(slot, Integer.MAX_VALUE);
    }

    /**
     * Makes the player drop an item from their inventory based on the equipment slot.
     *
     * @param slot   the equipment slot to drop
     * @param amount the amount of items to drop from this equipment slot. Values below one always return null
     * @return the dropped item entity, or null if the action was unsuccessful
     */
    @Nullable
    default Item dropItem(final @NotNull EquipmentSlot slot, final int amount) {
        return this.dropItem(slot, amount, false, null);
    }