From 5699357b0d4318b76d37941c29b39381049316d6 Mon Sep 17 00:00:00 2001 From: Jikoo Date: Thu, 13 Jun 2024 22:20:03 -0400 Subject: [PATCH] Remove unused parameter --- .../block/impl/furnace/EnchantableFurnaceConfigTest.java | 5 ++--- .../enchantableblocks/config/EnchantableBlockConfigTest.java | 5 ++--- .../config/data/EnchantMaxLevelMappingTest.java | 5 ++--- .../config/data/MultimapEnchantEnchantSettingTest.java | 5 ++--- .../enchantableblocks/config/data/SetEnchantSettingTest.java | 5 ++--- .../jikoo/enchantableblocks/listener/AnvilEnchanterTest.java | 2 +- .../jikoo/enchantableblocks/listener/TableEnchanterTest.java | 2 +- .../mock/enchantments/EnchantmentMocks.java | 3 +-- .../util/enchant/BlockAnvilOperationTest.java | 5 ++--- 9 files changed, 15 insertions(+), 22 deletions(-) diff --git a/src/test/java/com/github/jikoo/enchantableblocks/block/impl/furnace/EnchantableFurnaceConfigTest.java b/src/test/java/com/github/jikoo/enchantableblocks/block/impl/furnace/EnchantableFurnaceConfigTest.java index eaa7ba0..af141c2 100644 --- a/src/test/java/com/github/jikoo/enchantableblocks/block/impl/furnace/EnchantableFurnaceConfigTest.java +++ b/src/test/java/com/github/jikoo/enchantableblocks/block/impl/furnace/EnchantableFurnaceConfigTest.java @@ -15,7 +15,6 @@ import java.util.Collection; import java.util.Set; import org.bukkit.Material; -import org.bukkit.Server; import org.bukkit.configuration.file.YamlConfiguration; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.DisplayName; @@ -34,8 +33,8 @@ class EnchantableFurnaceConfigTest { @BeforeAll void beforeAll() { - Server server = ServerMocks.mockServer(); - EnchantmentMocks.init(server); + ServerMocks.mockServer(); + EnchantmentMocks.init(); File configFile = Path.of(".", "src", "test", "resources", "furnace_config.yml").toFile(); YamlConfiguration configuration = YamlConfiguration.loadConfiguration(configFile); diff --git a/src/test/java/com/github/jikoo/enchantableblocks/config/EnchantableBlockConfigTest.java b/src/test/java/com/github/jikoo/enchantableblocks/config/EnchantableBlockConfigTest.java index 4ce2d32..c19d710 100644 --- a/src/test/java/com/github/jikoo/enchantableblocks/config/EnchantableBlockConfigTest.java +++ b/src/test/java/com/github/jikoo/enchantableblocks/config/EnchantableBlockConfigTest.java @@ -19,7 +19,6 @@ import java.util.Map.Entry; import java.util.Optional; import java.util.Set; -import org.bukkit.Server; import org.bukkit.configuration.file.YamlConfiguration; import org.bukkit.enchantments.Enchantment; import org.junit.jupiter.api.BeforeAll; @@ -42,8 +41,8 @@ class EnchantableBlockConfigTest { @BeforeAll void beforeAll() { - Server server = ServerMocks.mockServer(); - EnchantmentMocks.init(server); + ServerMocks.mockServer(); + EnchantmentMocks.init(); File configFile = Path.of(".", "src", "test", "resources", "generic_config.yml").toFile(); YamlConfiguration configuration = YamlConfiguration.loadConfiguration(configFile); diff --git a/src/test/java/com/github/jikoo/enchantableblocks/config/data/EnchantMaxLevelMappingTest.java b/src/test/java/com/github/jikoo/enchantableblocks/config/data/EnchantMaxLevelMappingTest.java index 67a56cc..7358a37 100644 --- a/src/test/java/com/github/jikoo/enchantableblocks/config/data/EnchantMaxLevelMappingTest.java +++ b/src/test/java/com/github/jikoo/enchantableblocks/config/data/EnchantMaxLevelMappingTest.java @@ -11,7 +11,6 @@ import com.github.jikoo.enchantableblocks.mock.ServerMocks; import com.github.jikoo.enchantableblocks.mock.enchantments.EnchantmentMocks; -import org.bukkit.Server; import org.bukkit.configuration.ConfigurationSection; import org.bukkit.enchantments.Enchantment; import org.junit.jupiter.api.BeforeAll; @@ -29,8 +28,8 @@ class EnchantMaxLevelMappingTest { @BeforeAll void beforeAll() { - Server server = ServerMocks.mockServer(); - EnchantmentMocks.init(server); + ServerMocks.mockServer(); + EnchantmentMocks.init(); } @BeforeEach diff --git a/src/test/java/com/github/jikoo/enchantableblocks/config/data/MultimapEnchantEnchantSettingTest.java b/src/test/java/com/github/jikoo/enchantableblocks/config/data/MultimapEnchantEnchantSettingTest.java index 1da756b..9c10bc5 100644 --- a/src/test/java/com/github/jikoo/enchantableblocks/config/data/MultimapEnchantEnchantSettingTest.java +++ b/src/test/java/com/github/jikoo/enchantableblocks/config/data/MultimapEnchantEnchantSettingTest.java @@ -8,7 +8,6 @@ import com.github.jikoo.enchantableblocks.mock.ServerMocks; import com.github.jikoo.enchantableblocks.mock.enchantments.EnchantmentMocks; import com.google.common.collect.HashMultimap; -import org.bukkit.Server; import org.bukkit.configuration.ConfigurationSection; import org.bukkit.enchantments.Enchantment; import org.junit.jupiter.api.BeforeAll; @@ -26,8 +25,8 @@ class MultimapEnchantEnchantSettingTest { @BeforeAll void beforeAll() { - Server server = ServerMocks.mockServer(); - EnchantmentMocks.init(server); + ServerMocks.mockServer(); + EnchantmentMocks.init(); } @BeforeEach diff --git a/src/test/java/com/github/jikoo/enchantableblocks/config/data/SetEnchantSettingTest.java b/src/test/java/com/github/jikoo/enchantableblocks/config/data/SetEnchantSettingTest.java index 9f41559..c1b5357 100644 --- a/src/test/java/com/github/jikoo/enchantableblocks/config/data/SetEnchantSettingTest.java +++ b/src/test/java/com/github/jikoo/enchantableblocks/config/data/SetEnchantSettingTest.java @@ -8,7 +8,6 @@ import com.github.jikoo.enchantableblocks.mock.ServerMocks; import com.github.jikoo.enchantableblocks.mock.enchantments.EnchantmentMocks; import java.util.Set; -import org.bukkit.Server; import org.bukkit.configuration.ConfigurationSection; import org.bukkit.enchantments.Enchantment; import org.junit.jupiter.api.BeforeAll; @@ -26,8 +25,8 @@ class SetEnchantSettingTest { @BeforeAll void beforeAll() { - Server server = ServerMocks.mockServer(); - EnchantmentMocks.init(server); + ServerMocks.mockServer(); + EnchantmentMocks.init(); } @BeforeEach diff --git a/src/test/java/com/github/jikoo/enchantableblocks/listener/AnvilEnchanterTest.java b/src/test/java/com/github/jikoo/enchantableblocks/listener/AnvilEnchanterTest.java index f60a3ed..c7134b6 100644 --- a/src/test/java/com/github/jikoo/enchantableblocks/listener/AnvilEnchanterTest.java +++ b/src/test/java/com/github/jikoo/enchantableblocks/listener/AnvilEnchanterTest.java @@ -66,7 +66,7 @@ class AnvilEnchanterTest { @BeforeAll void setUpAll() { var server = ServerMocks.mockServer(); - EnchantmentMocks.init(server); + EnchantmentMocks.init(); enchantment = Enchantment.EFFICIENCY; goodMat = Material.COAL_ORE; diff --git a/src/test/java/com/github/jikoo/enchantableblocks/listener/TableEnchanterTest.java b/src/test/java/com/github/jikoo/enchantableblocks/listener/TableEnchanterTest.java index 29bc0ba..b89bd8f 100644 --- a/src/test/java/com/github/jikoo/enchantableblocks/listener/TableEnchanterTest.java +++ b/src/test/java/com/github/jikoo/enchantableblocks/listener/TableEnchanterTest.java @@ -61,7 +61,7 @@ class TableEnchanterTest { @BeforeAll void setUpAll() { var server = ServerMocks.mockServer(); - EnchantmentMocks.init(server); + EnchantmentMocks.init(); var factory = ItemFactoryMocks.mockFactory(); when(server.getItemFactory()).thenReturn(factory); diff --git a/src/test/java/com/github/jikoo/enchantableblocks/mock/enchantments/EnchantmentMocks.java b/src/test/java/com/github/jikoo/enchantableblocks/mock/enchantments/EnchantmentMocks.java index 6d81870..8958c09 100644 --- a/src/test/java/com/github/jikoo/enchantableblocks/mock/enchantments/EnchantmentMocks.java +++ b/src/test/java/com/github/jikoo/enchantableblocks/mock/enchantments/EnchantmentMocks.java @@ -13,7 +13,6 @@ import java.util.Set; import org.bukkit.Material; import org.bukkit.NamespacedKey; -import org.bukkit.Server; import org.bukkit.Tag; import org.bukkit.enchantments.Enchantment; import org.bukkit.inventory.ItemStack; @@ -40,7 +39,7 @@ public NamespacedKey getKey() { } }; - public static void init(Server server) { + public static void init() { List protections = List.of(Enchantment.PROTECTION, Enchantment.FIRE_PROTECTION, Enchantment.BLAST_PROTECTION, Enchantment.PROJECTILE_PROTECTION); setUpEnchant(Enchantment.PROTECTION, 4, Tag.ITEMS_ENCHANTABLE_ARMOR, protections); setUpEnchant(Enchantment.FIRE_PROTECTION, 4, Tag.ITEMS_ENCHANTABLE_ARMOR, protections); diff --git a/src/test/java/com/github/jikoo/enchantableblocks/util/enchant/BlockAnvilOperationTest.java b/src/test/java/com/github/jikoo/enchantableblocks/util/enchant/BlockAnvilOperationTest.java index 8629451..a958d94 100644 --- a/src/test/java/com/github/jikoo/enchantableblocks/util/enchant/BlockAnvilOperationTest.java +++ b/src/test/java/com/github/jikoo/enchantableblocks/util/enchant/BlockAnvilOperationTest.java @@ -18,7 +18,6 @@ import com.google.common.collect.Multimap; import java.util.Set; import org.bukkit.Material; -import org.bukkit.Server; import org.bukkit.enchantments.Enchantment; import org.bukkit.inventory.ItemStack; import org.junit.jupiter.api.BeforeAll; @@ -35,8 +34,8 @@ class BlockAnvilOperationTest { @BeforeAll void beforeAll() { - Server server = ServerMocks.mockServer(); - EnchantmentMocks.init(server); + ServerMocks.mockServer(); + EnchantmentMocks.init(); } @BeforeEach