This commit is contained in:
2024-10-19 20:26:15 +02:00
parent 61ed32ccfa
commit 64d6d1929d
4 changed files with 19 additions and 25 deletions
@@ -11,37 +11,35 @@ import org.bukkit.enchantments.Enchantment;
import org.bukkit.inventory.EquipmentSlotGroup;
import org.bukkit.inventory.ItemType;
import java.util.Collections;
import java.util.Map;
import java.util.Set;
@SuppressWarnings("all")
@SuppressWarnings("UnstableApiUsage")
public interface EnchantioEnchant {
public Key getKey();
Key getKey();
public Component getDescription();
Component getDescription();
public int getAnvilCost();
int getAnvilCost();
public int getMaxLevel();
int getMaxLevel();
public int getWeight();
int getWeight();
public EnchantmentRegistryEntry.EnchantmentCost getMinimumCost();
EnchantmentRegistryEntry.EnchantmentCost getMinimumCost();
public EnchantmentRegistryEntry.EnchantmentCost getMaximumCost();
EnchantmentRegistryEntry.EnchantmentCost getMaximumCost();
public Iterable<EquipmentSlotGroup> getActiveSlots();
Iterable<EquipmentSlotGroup> getActiveSlots();
public boolean canGetFromEnchantingTable();
boolean canGetFromEnchantingTable();
public default TagEntry<Enchantment> getTagEntry() {
TagKey<ItemType> getTagForSupportedItems();
Set<TagEntry<ItemType>> getSupportedItems();
default TagEntry<Enchantment> getTagEntry() {
return TagEntry.valueEntry(TypedKey.create(RegistryKey.ENCHANTMENT, getKey()));
}
public TagKey<ItemType> getTagForSupportedItems();
public Set<TagEntry<ItemType>> getSupportedItems();
}
@@ -12,6 +12,7 @@ import org.bukkit.inventory.ItemType;
import java.util.Set;
@SuppressWarnings("UnstableApiUsage")
public class SoulboundEnchant implements EnchantioEnchant {
public static final Key KEY = Key.key("enchantio:soulbound");
@@ -23,7 +24,7 @@ public class SoulboundEnchant implements EnchantioEnchant {
@Override
public Component getDescription() {
return Component.translatable("enchantio.enchant.soulbound","Soulbound");
return Component.translatable("enchantio.enchant.soulbound", "Soulbound");
}
@Override
@@ -12,6 +12,7 @@ import org.bukkit.inventory.ItemType;
import java.util.Set;
@SuppressWarnings("UnstableApiUsage")
public class TelepathyEnchant implements EnchantioEnchant {
public static final Key KEY = Key.key("enchantio:telepathy");