From 67c6356f231c45313a124e48840e2e449fd98e96 Mon Sep 17 00:00:00 2001 From: Will FP Date: Sat, 9 Dec 2023 15:59:18 +0000 Subject: [PATCH] We do a little import optimising --- .../willfp/ecoenchants/proxy/v1_17_R1/EcoCraftEnchantment.kt | 1 - .../willfp/ecoenchants/proxy/v1_18_R1/EcoCraftEnchantment.kt | 1 - .../willfp/ecoenchants/proxy/v1_18_R2/EcoCraftEnchantment.kt | 1 - .../willfp/ecoenchants/proxy/v1_19_R1/EcoCraftEnchantment.kt | 1 - .../willfp/ecoenchants/proxy/v1_19_R2/EcoCraftEnchantment.kt | 1 - .../willfp/ecoenchants/proxy/v1_19_R3/EcoCraftEnchantment.kt | 1 - .../willfp/ecoenchants/proxy/v1_20_R1/EcoCraftEnchantment.kt | 1 - .../willfp/ecoenchants/proxy/v1_20_R2/EcoCraftEnchantment.kt | 2 -- .../ecoenchants/proxy/v1_20_R3/ModernEnchantmentRegisterer.kt | 1 - .../v1_20_R3/registration/VanillaEcoEnchantsEnchantment.kt | 1 - .../kotlin/com/willfp/ecoenchants/commands/CommandReload.kt | 1 - .../com/willfp/ecoenchants/display/EnchantmentFormatting.kt | 1 - .../com/willfp/ecoenchants/enchant/impl/LibreforgeEcoEnchant.kt | 2 -- .../ecoenchants/enchant/impl/hardcoded/EnchantmentSoulbound.kt | 2 +- .../main/kotlin/com/willfp/ecoenchants/target/EnchantLookup.kt | 1 - .../kotlin/com/willfp/ecoenchants/target/EnchantmentTarget.kt | 1 - .../main/kotlin/com/willfp/ecoenchants/type/EnchantmentType.kt | 2 +- 17 files changed, 2 insertions(+), 19 deletions(-) diff --git a/eco-core/core-nms/v1_17_R1/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_17_R1/EcoCraftEnchantment.kt b/eco-core/core-nms/v1_17_R1/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_17_R1/EcoCraftEnchantment.kt index ad73b2a7..8b869843 100644 --- a/eco-core/core-nms/v1_17_R1/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_17_R1/EcoCraftEnchantment.kt +++ b/eco-core/core-nms/v1_17_R1/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_17_R1/EcoCraftEnchantment.kt @@ -3,7 +3,6 @@ package com.willfp.ecoenchants.proxy.v1_17_R1 import com.willfp.ecoenchants.enchant.EcoEnchant import com.willfp.ecoenchants.enchant.VanillaEnchantmentData import net.minecraft.world.item.enchantment.Enchantment -import org.bukkit.NamespacedKey import org.bukkit.craftbukkit.v1_17_R1.enchantments.CraftEnchantment diff --git a/eco-core/core-nms/v1_18_R1/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_18_R1/EcoCraftEnchantment.kt b/eco-core/core-nms/v1_18_R1/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_18_R1/EcoCraftEnchantment.kt index d0137be6..d60aaca2 100644 --- a/eco-core/core-nms/v1_18_R1/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_18_R1/EcoCraftEnchantment.kt +++ b/eco-core/core-nms/v1_18_R1/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_18_R1/EcoCraftEnchantment.kt @@ -3,7 +3,6 @@ package com.willfp.ecoenchants.proxy.v1_18_R1 import com.willfp.ecoenchants.enchant.EcoEnchant import com.willfp.ecoenchants.enchant.VanillaEnchantmentData import net.minecraft.world.item.enchantment.Enchantment -import org.bukkit.NamespacedKey import org.bukkit.craftbukkit.v1_18_R1.enchantments.CraftEnchantment diff --git a/eco-core/core-nms/v1_18_R2/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_18_R2/EcoCraftEnchantment.kt b/eco-core/core-nms/v1_18_R2/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_18_R2/EcoCraftEnchantment.kt index f6a68ec3..1f164bdf 100644 --- a/eco-core/core-nms/v1_18_R2/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_18_R2/EcoCraftEnchantment.kt +++ b/eco-core/core-nms/v1_18_R2/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_18_R2/EcoCraftEnchantment.kt @@ -3,7 +3,6 @@ package com.willfp.ecoenchants.proxy.v1_18_R2 import com.willfp.ecoenchants.enchant.EcoEnchant import com.willfp.ecoenchants.enchant.VanillaEnchantmentData import net.minecraft.world.item.enchantment.Enchantment -import org.bukkit.NamespacedKey import org.bukkit.craftbukkit.v1_18_R2.enchantments.CraftEnchantment diff --git a/eco-core/core-nms/v1_19_R1/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_19_R1/EcoCraftEnchantment.kt b/eco-core/core-nms/v1_19_R1/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_19_R1/EcoCraftEnchantment.kt index 2fd8d9f5..ba0ad65a 100644 --- a/eco-core/core-nms/v1_19_R1/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_19_R1/EcoCraftEnchantment.kt +++ b/eco-core/core-nms/v1_19_R1/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_19_R1/EcoCraftEnchantment.kt @@ -3,7 +3,6 @@ package com.willfp.ecoenchants.proxy.v1_19_R1 import com.willfp.ecoenchants.enchant.EcoEnchant import com.willfp.ecoenchants.enchant.VanillaEnchantmentData import net.minecraft.world.item.enchantment.Enchantment -import org.bukkit.NamespacedKey import org.bukkit.craftbukkit.v1_19_R1.enchantments.CraftEnchantment diff --git a/eco-core/core-nms/v1_19_R2/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_19_R2/EcoCraftEnchantment.kt b/eco-core/core-nms/v1_19_R2/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_19_R2/EcoCraftEnchantment.kt index ec9bfd5b..02c1a5b7 100644 --- a/eco-core/core-nms/v1_19_R2/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_19_R2/EcoCraftEnchantment.kt +++ b/eco-core/core-nms/v1_19_R2/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_19_R2/EcoCraftEnchantment.kt @@ -3,7 +3,6 @@ package com.willfp.ecoenchants.proxy.v1_19_R2 import com.willfp.ecoenchants.enchant.EcoEnchant import com.willfp.ecoenchants.enchant.VanillaEnchantmentData import net.minecraft.world.item.enchantment.Enchantment -import org.bukkit.NamespacedKey import org.bukkit.craftbukkit.v1_19_R2.enchantments.CraftEnchantment diff --git a/eco-core/core-nms/v1_19_R3/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_19_R3/EcoCraftEnchantment.kt b/eco-core/core-nms/v1_19_R3/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_19_R3/EcoCraftEnchantment.kt index 6069dfce..951c16b4 100644 --- a/eco-core/core-nms/v1_19_R3/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_19_R3/EcoCraftEnchantment.kt +++ b/eco-core/core-nms/v1_19_R3/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_19_R3/EcoCraftEnchantment.kt @@ -3,7 +3,6 @@ package com.willfp.ecoenchants.proxy.v1_19_R3 import com.willfp.ecoenchants.enchant.EcoEnchant import com.willfp.ecoenchants.enchant.VanillaEnchantmentData import net.minecraft.world.item.enchantment.Enchantment -import org.bukkit.NamespacedKey import org.bukkit.craftbukkit.v1_19_R3.enchantments.CraftEnchantment diff --git a/eco-core/core-nms/v1_20_R1/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_20_R1/EcoCraftEnchantment.kt b/eco-core/core-nms/v1_20_R1/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_20_R1/EcoCraftEnchantment.kt index 230c38d2..931fdd29 100644 --- a/eco-core/core-nms/v1_20_R1/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_20_R1/EcoCraftEnchantment.kt +++ b/eco-core/core-nms/v1_20_R1/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_20_R1/EcoCraftEnchantment.kt @@ -3,7 +3,6 @@ package com.willfp.ecoenchants.proxy.v1_20_R1 import com.willfp.ecoenchants.enchant.EcoEnchant import com.willfp.ecoenchants.enchant.VanillaEnchantmentData import net.minecraft.world.item.enchantment.Enchantment -import org.bukkit.NamespacedKey import org.bukkit.craftbukkit.v1_20_R1.enchantments.CraftEnchantment diff --git a/eco-core/core-nms/v1_20_R2/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_20_R2/EcoCraftEnchantment.kt b/eco-core/core-nms/v1_20_R2/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_20_R2/EcoCraftEnchantment.kt index 098967cc..570522f1 100644 --- a/eco-core/core-nms/v1_20_R2/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_20_R2/EcoCraftEnchantment.kt +++ b/eco-core/core-nms/v1_20_R2/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_20_R2/EcoCraftEnchantment.kt @@ -2,9 +2,7 @@ package com.willfp.ecoenchants.proxy.v1_20_R2 import com.willfp.ecoenchants.enchant.EcoEnchant import com.willfp.ecoenchants.enchant.VanillaEnchantmentData -import com.willfp.ecoenchants.enchant.registration.legacy.LegacyDelegatedEnchantment import net.minecraft.world.item.enchantment.Enchantment -import org.bukkit.NamespacedKey import org.bukkit.craftbukkit.v1_20_R2.enchantments.CraftEnchantment class EcoCraftEnchantment( diff --git a/eco-core/core-nms/v1_20_R3/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_20_R3/ModernEnchantmentRegisterer.kt b/eco-core/core-nms/v1_20_R3/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_20_R3/ModernEnchantmentRegisterer.kt index 4340fd7b..f095de8b 100644 --- a/eco-core/core-nms/v1_20_R3/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_20_R3/ModernEnchantmentRegisterer.kt +++ b/eco-core/core-nms/v1_20_R3/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_20_R3/ModernEnchantmentRegisterer.kt @@ -1,6 +1,5 @@ package com.willfp.ecoenchants.proxy.v1_20_R3 -import com.willfp.ecoenchants.enchant.EcoEnchant import com.willfp.ecoenchants.enchant.EcoEnchants import com.willfp.ecoenchants.enchant.impl.EcoEnchantBase import com.willfp.ecoenchants.enchant.registration.modern.ModernEnchantmentRegistererProxy diff --git a/eco-core/core-nms/v1_20_R3/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_20_R3/registration/VanillaEcoEnchantsEnchantment.kt b/eco-core/core-nms/v1_20_R3/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_20_R3/registration/VanillaEcoEnchantsEnchantment.kt index 19db266c..e23cb269 100644 --- a/eco-core/core-nms/v1_20_R3/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_20_R3/registration/VanillaEcoEnchantsEnchantment.kt +++ b/eco-core/core-nms/v1_20_R3/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_20_R3/registration/VanillaEcoEnchantsEnchantment.kt @@ -11,7 +11,6 @@ import net.minecraft.world.inventory.AnvilMenu import net.minecraft.world.item.ItemStack import net.minecraft.world.item.enchantment.Enchantment import net.minecraft.world.item.enchantment.EnchantmentCategory -import net.minecraft.world.item.enchantment.EnchantmentHelper import org.bukkit.craftbukkit.v1_20_R3.enchantments.CraftEnchantment import org.bukkit.craftbukkit.v1_20_R3.inventory.CraftItemStack import java.util.Objects diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/commands/CommandReload.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/commands/CommandReload.kt index 5c9542b4..96bdb7a1 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/commands/CommandReload.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/commands/CommandReload.kt @@ -3,7 +3,6 @@ package com.willfp.ecoenchants.commands import com.willfp.eco.core.EcoPlugin import com.willfp.eco.core.Prerequisite import com.willfp.eco.core.command.impl.Subcommand -import com.willfp.eco.util.StringUtils import org.bukkit.command.CommandSender class CommandReload(plugin: EcoPlugin) : Subcommand(plugin, "reload", "ecoenchants.command.reload", false) { diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/display/EnchantmentFormatting.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/display/EnchantmentFormatting.kt index 52ce5dbc..756e9d61 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/display/EnchantmentFormatting.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/display/EnchantmentFormatting.kt @@ -6,7 +6,6 @@ import com.willfp.eco.core.placeholder.context.placeholderContext import com.willfp.eco.util.NumberUtils import com.willfp.eco.util.StringUtils import com.willfp.eco.util.formatEco -import com.willfp.ecoenchants.EcoEnchantsPlugin import com.willfp.ecoenchants.enchant.EcoEnchantLike import org.bukkit.entity.Player diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/enchant/impl/LibreforgeEcoEnchant.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/enchant/impl/LibreforgeEcoEnchant.kt index 8b3bd562..86f279d4 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/enchant/impl/LibreforgeEcoEnchant.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/enchant/impl/LibreforgeEcoEnchant.kt @@ -5,8 +5,6 @@ import com.willfp.eco.util.containsIgnoreCase import com.willfp.ecoenchants.EcoEnchantsPlugin import com.willfp.ecoenchants.enchant.EcoEnchantLevel import com.willfp.ecoenchants.enchant.MissingDependencyException -import com.willfp.libreforge.BlankHolder.conditions -import com.willfp.libreforge.BlankHolder.effects import com.willfp.libreforge.SilentViolationContext import com.willfp.libreforge.effects.EffectList import com.willfp.libreforge.effects.Effects diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/enchant/impl/hardcoded/EnchantmentSoulbound.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/enchant/impl/hardcoded/EnchantmentSoulbound.kt index fc7fa375..a6d900b4 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/enchant/impl/hardcoded/EnchantmentSoulbound.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/enchant/impl/hardcoded/EnchantmentSoulbound.kt @@ -9,8 +9,8 @@ import com.willfp.eco.core.drops.DropQueue import com.willfp.eco.core.fast.fast import com.willfp.eco.core.items.Items import com.willfp.ecoenchants.EcoEnchantsPlugin -import com.willfp.ecoenchants.enchant.impl.HardcodedEcoEnchant import com.willfp.ecoenchants.enchant.EcoEnchant +import com.willfp.ecoenchants.enchant.impl.HardcodedEcoEnchant import com.willfp.ecoenchants.target.EnchantLookup.getActiveEnchantLevelInSlot import com.willfp.ecoenchants.target.EnchantLookup.hasEnchantActive import org.bukkit.entity.Player diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/target/EnchantLookup.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/target/EnchantLookup.kt index 1e8d4f8e..9226d623 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/target/EnchantLookup.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/target/EnchantLookup.kt @@ -3,7 +3,6 @@ package com.willfp.ecoenchants.target import com.github.benmanes.caffeine.cache.Caffeine import com.willfp.eco.core.fast.fast import com.willfp.eco.core.items.HashedItem -import com.willfp.ecoenchants.EcoEnchantsPlugin import com.willfp.ecoenchants.enchant.EcoEnchant import com.willfp.ecoenchants.enchant.EcoEnchantLevel import com.willfp.ecoenchants.enchant.FoundEcoEnchantLevel diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/target/EnchantmentTarget.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/target/EnchantmentTarget.kt index 351a8a67..ae81adbb 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/target/EnchantmentTarget.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/target/EnchantmentTarget.kt @@ -5,7 +5,6 @@ import com.willfp.eco.core.items.Items import com.willfp.eco.core.items.TestableItem import com.willfp.eco.core.recipe.parts.EmptyTestableItem import com.willfp.eco.core.registry.Registrable -import com.willfp.ecoenchants.EcoEnchantsPlugin import com.willfp.ecoenchants.plugin import com.willfp.libreforge.slot.SlotType import com.willfp.libreforge.slot.SlotTypes diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/type/EnchantmentType.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/type/EnchantmentType.kt index 3875eb3b..8e89dbf0 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/type/EnchantmentType.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/type/EnchantmentType.kt @@ -6,7 +6,7 @@ import com.willfp.eco.core.registry.Registrable import com.willfp.ecoenchants.libreforge.TriggerEnchantType import com.willfp.ecoenchants.mechanics.infiniteIfNegative import com.willfp.libreforge.triggers.Triggers -import java.util.* +import java.util.Objects class EnchantmentType( private val plugin: EcoPlugin,