Skip to content

Commit

Permalink
Remove unused parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
Jikoo committed Jun 14, 2024
1 parent b39cd13 commit 5699357
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -29,8 +28,8 @@ class EnchantMaxLevelMappingTest {

@BeforeAll
void beforeAll() {
Server server = ServerMocks.mockServer();
EnchantmentMocks.init(server);
ServerMocks.mockServer();
EnchantmentMocks.init();
}

@BeforeEach
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -26,8 +25,8 @@ class MultimapEnchantEnchantSettingTest {

@BeforeAll
void beforeAll() {
Server server = ServerMocks.mockServer();
EnchantmentMocks.init(server);
ServerMocks.mockServer();
EnchantmentMocks.init();
}

@BeforeEach
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -26,8 +25,8 @@ class SetEnchantSettingTest {

@BeforeAll
void beforeAll() {
Server server = ServerMocks.mockServer();
EnchantmentMocks.init(server);
ServerMocks.mockServer();
EnchantmentMocks.init();
}

@BeforeEach
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -40,7 +39,7 @@ public NamespacedKey getKey() {
}
};

public static void init(Server server) {
public static void init() {
List<Enchantment> 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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -35,8 +34,8 @@ class BlockAnvilOperationTest {

@BeforeAll
void beforeAll() {
Server server = ServerMocks.mockServer();
EnchantmentMocks.init(server);
ServerMocks.mockServer();
EnchantmentMocks.init();
}

@BeforeEach
Expand Down

0 comments on commit 5699357

Please sign in to comment.