mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2024-12-26 20:27:38 +01:00
Added support for displaying enchantments in trade ingredients
This commit is contained in:
parent
62278ff6b7
commit
b537851755
@ -6,6 +6,7 @@ import com.comphenix.protocol.events.PacketEvent;
|
||||
import com.willfp.ecoenchants.EcoEnchantsPlugin;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.MerchantRecipe;
|
||||
|
||||
import java.util.Arrays;
|
||||
@ -51,7 +52,9 @@ public class DisplayPacketAdapter extends PacketAdapter {
|
||||
oldRecipe.hasExperienceReward(),
|
||||
oldRecipe.getVillagerExperience(),
|
||||
oldRecipe.getPriceMultiplier());
|
||||
recipe.setIngredients(oldRecipe.getIngredients());
|
||||
List<ItemStack> ingredients = oldRecipe.getIngredients();
|
||||
ingredients.forEach(EnchantDisplay::displayEnchantments);
|
||||
recipe.setIngredients(ingredients);
|
||||
return recipe;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user