diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java b/paper-server/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java index 59c9c970b8..4221a1e9cb 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java +++ b/paper-server/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 - more Enchantment API + @Override public String getTranslationKey() { return Util.makeDescriptionId("enchantment", this.handle.unwrapKey().get().location());