From 168c6c55adbc246de22ba965467173da86d841b0 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Sat, 6 Jan 2024 16:07:53 +1100 Subject: [PATCH] Improve ItemFactory#enchantItem consistency By: md_5 --- .../src/main/java/org/bukkit/inventory/ItemFactory.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/paper-api/src/main/java/org/bukkit/inventory/ItemFactory.java b/paper-api/src/main/java/org/bukkit/inventory/ItemFactory.java index e606f63a28..096e0d60c4 100644 --- a/paper-api/src/main/java/org/bukkit/inventory/ItemFactory.java +++ b/paper-api/src/main/java/org/bukkit/inventory/ItemFactory.java @@ -184,7 +184,7 @@ public interface ItemFactory { * @param item the item to enchant * @param level the level to use, which is the level in the enchantment table * @param allowTreasures allows treasure enchants, e.g. mending, if true. - * @return the modified ItemStack, or a copy if the ItemStack cannot be enchanted directly + * @return a new ItemStack containing the result of the Enchantment */ @NotNull ItemStack enchantItem(@NotNull final Entity entity, @NotNull final ItemStack item, final int level, final boolean allowTreasures); @@ -198,8 +198,7 @@ public interface ItemFactory { * @param item the item to enchant * @param level the level to use, which is the level in the enchantment table * @param allowTreasures allow the treasure enchants, e.g. mending, if true. - * @return the modified ItemStack, or a copy if the ItemStack cannot be - * enchanted directly + * @return a new ItemStack containing the result of the Enchantment */ @NotNull ItemStack enchantItem(@NotNull final World world, @NotNull final ItemStack item, final int level, final boolean allowTreasures); @@ -212,8 +211,7 @@ public interface ItemFactory { * @param item the item to enchant * @param level the level to use, which is the level in the enchantment table * @param allowTreasures allow treasure enchantments, e.g. mending, if true. - * @return the modified ItemStack, or a copy if the ItemStack cannot be - * enchanted directly + * @return a new ItemStack containing the result of the Enchantment */ @NotNull ItemStack enchantItem(@NotNull final ItemStack item, final int level, final boolean allowTreasures);