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 3ea6e6678432957c5caaff15ba20f8a8ddb393c9..10a74428ca8f8a869ba0d14f2a9b2126033df684 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; @@ -92,7 +93,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