mirror of
https://github.com/YouHaveTrouble/Enchantio.git
synced 2026-05-12 06:06:55 +00:00
add ability to configure active slots for the enchant
This commit is contained in:
@@ -10,14 +10,17 @@ import net.kyori.adventure.text.Component;
|
||||
import org.bukkit.enchantments.Enchantment;
|
||||
import org.bukkit.inventory.EquipmentSlotGroup;
|
||||
import org.bukkit.inventory.ItemType;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
@SuppressWarnings("UnstableApiUsage")
|
||||
public interface EnchantioEnchant {
|
||||
|
||||
@NotNull
|
||||
Key getKey();
|
||||
|
||||
@NotNull
|
||||
Component getDescription();
|
||||
|
||||
int getAnvilCost();
|
||||
@@ -26,20 +29,27 @@ public interface EnchantioEnchant {
|
||||
|
||||
int getWeight();
|
||||
|
||||
@NotNull
|
||||
EnchantmentRegistryEntry.EnchantmentCost getMinimumCost();
|
||||
|
||||
@NotNull
|
||||
EnchantmentRegistryEntry.EnchantmentCost getMaximumCost();
|
||||
|
||||
@NotNull
|
||||
Iterable<EquipmentSlotGroup> getActiveSlots();
|
||||
|
||||
@NotNull
|
||||
Set<TagEntry<ItemType>> getSupportedItems();
|
||||
|
||||
@NotNull
|
||||
Set<TagKey<Enchantment>> getEnchantTagKeys();
|
||||
|
||||
@NotNull
|
||||
default TagKey<ItemType> getTagForSupportedItems() {
|
||||
return TagKey.create(RegistryKey.ITEM, Key.key( getKey().asString() + "_enchantable"));
|
||||
}
|
||||
|
||||
@NotNull
|
||||
default TagEntry<Enchantment> getTagEntry() {
|
||||
return TagEntry.valueEntry(TypedKey.create(RegistryKey.ENCHANTMENT, getKey()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user