mirror of
https://github.com/YouHaveTrouble/Enchantio.git
synced 2026-05-11 21:56:55 +00:00
clean up
This commit is contained in:
@@ -2,7 +2,6 @@ package me.youhavetrouble.enchantio;
|
||||
|
||||
import io.papermc.paper.plugin.bootstrap.BootstrapContext;
|
||||
import io.papermc.paper.plugin.bootstrap.PluginBootstrap;
|
||||
import io.papermc.paper.plugin.bootstrap.PluginProviderContext;
|
||||
import io.papermc.paper.plugin.lifecycle.event.types.LifecycleEvents;
|
||||
import io.papermc.paper.registry.RegistryKey;
|
||||
import io.papermc.paper.registry.TypedKey;
|
||||
@@ -14,13 +13,12 @@ import me.youhavetrouble.enchantio.enchants.EnchantioEnchant;
|
||||
import me.youhavetrouble.enchantio.enchants.SoulboundEnchant;
|
||||
import me.youhavetrouble.enchantio.enchants.TelepathyEnchant;
|
||||
import org.bukkit.enchantments.Enchantment;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
@SuppressWarnings("all")
|
||||
@SuppressWarnings("UnstableApiUsage")
|
||||
public class EnchantioBootstrap implements PluginBootstrap {
|
||||
@Override
|
||||
public void bootstrap(@NotNull BootstrapContext context) {
|
||||
@@ -65,8 +63,4 @@ public class EnchantioBootstrap implements PluginBootstrap {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull JavaPlugin createPlugin(@NotNull PluginProviderContext context) {
|
||||
return PluginBootstrap.super.createPlugin(context);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user