From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Jake Potrebic Date: Thu, 6 May 2021 19:57:58 -0700 Subject: [PATCH] More Enchantment API == AT == public net.minecraft.world.item.enchantment.Enchantment definition Co-authored-by: Luis Co-authored-by: Janet Blackquill diff --git a/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java b/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java index fc6606e1bf2e2c35cb6c84af78859c3441775907..edf4df4d13dc814e98b897a3f8a5fd4757284299 100644 --- a/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java +++ b/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java @@ -5,6 +5,7 @@ import java.util.Locale; import net.minecraft.Util; import net.minecraft.core.Holder; import net.minecraft.core.registries.Registries; +import net.minecraft.network.chat.contents.TranslatableContents; import net.minecraft.tags.EnchantmentTags; import org.bukkit.NamespacedKey; import org.bukkit.Registry; @@ -90,7 +91,7 @@ public class CraftEnchantment extends Enchantment implements Handleable getActiveSlotGroups() { + return this.getHandle().definition().slots().stream() + .map(org.bukkit.craftbukkit.CraftEquipmentSlot::getSlot) + .collect(java.util.stream.Collectors.toSet()); } // Paper end