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

Code before:
    @Override
    Spigot spigot();
    // Spigot end

    // Paper start - entity effect API
    /**
     * Plays an entity effect to this player for the target entity
     * <p>
     * If the effect is not applicable to this class of entity, it will not play.
     *
     * @param effect the entity effect
     * @param target the target entity
     */
    void sendEntityEffect(org.bukkit.@NotNull EntityEffect effect, @NotNull Entity target);
    // Paper end - entity effect API

    /**
     * Gives the player the items following full vanilla logic,
     * making the player drop the items that did not fit into
     * the inventory. This method will update the count of items
     * to the amount that did not fit in the inventory.
     *
     * @param items the items to give, their count will be mutated
     * @return spawned item entities
     */
    @NotNull List<@NotNull Item> give(@NotNull ItemStack @NotNull... items);

    /**
     * Gives the player those items following full vanilla logic,
     * making the player drop the items that did not fit into
     * the inventory. This method will update the count of items
     * to the amount that did not fit in the inventory.
     *
     * @param items the items to give, their count will be mutated
     * @return spawned item entities
     */
    @NotNull List<@NotNull Item> give(@NotNull Collection<@NotNull ItemStack> items);

    /**
     * Gives the player those items following full vanilla logic.
     * This method will update the count of items to the amount that
     * did not fit in the inventory.
     *
     * @param items the items to give, their count will be mutated
     * @param dropIfFull whether the player should drop items that
     *                   did not fit the inventory
     * @return spawned item entities, always empty if dropIfFull is false
     */
    @NotNull List<@NotNull Item> give(@NotNull Collection<@NotNull ItemStack> items, boolean dropIfFull);
}


Review comment (suggestion):
Just a note, this might wanna be a ItemStack first, ItemStack... other, but we decided against that because itwould make interop with getContents() methods that yield ItemStack[] a lot worse so, may people call this without any items I guess xD

Code after:
    @NotNull
    @Override
    Spigot spigot();
    // Spigot end

    // Paper start - entity effect API
    /**
     * Plays an entity effect to this player for the target entity
     * <p>
     * If the effect is not applicable to this class of entity, it will not play.
     *
     * @param effect the entity effect
     * @param target the target entity
     */
    void sendEntityEffect(org.bukkit.@NotNull EntityEffect effect, @NotNull Entity target);
    // Paper end - entity effect API

    /**
     * Gives the player the items following full vanilla logic,
     * making the player drop the items that did not fit into
     * the inventory.
     *
     * @param items the items to give.
     * @return the result of this method, holding leftovers and spawned items.
     */
    default @NotNull PlayerGiveResult give(@NotNull final ItemStack @NotNull ... items) {
        return this.give(List.of(items));
    }

    /**
     * Gives the player those items following full vanilla logic,
     * making the player drop the items that did not fit into
     * the inventory.
     *
     * @param items the items to give
     * @return the result of this method, holding leftovers and spawned items.
     */
    default @NotNull PlayerGiveResult give(@NotNull final Collection<@NotNull ItemStack> items) {
        return this.give(items, true);
    }

    /**
     * Gives the player those items following full vanilla logic.
     *
     * @param items      the items to give
     * @param dropIfFull whether the player should drop items that
     *                   did not fit the inventory
     * @return the result of this method, holding leftovers and spawned items.
     */
    @NotNull PlayerGiveResult give(@NotNull Collection<@NotNull ItemStack> items, boolean dropIfFull);
}