diff --git a/src/main/java/com/onarandombox/MultiverseCore/api/SafeTTeleporter.java b/src/main/java/com/onarandombox/MultiverseCore/api/SafeTTeleporter.java index 95fafa9a..51350238 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/api/SafeTTeleporter.java +++ b/src/main/java/com/onarandombox/MultiverseCore/api/SafeTTeleporter.java @@ -1,5 +1,7 @@ package com.onarandombox.MultiverseCore.api; +import java.util.concurrent.CompletableFuture; + import co.aikar.commands.BukkitCommandIssuer; import com.onarandombox.MultiverseCore.destination.ParsedDestination; import com.onarandombox.MultiverseCore.teleportation.TeleportResult; @@ -8,8 +10,6 @@ import org.bukkit.command.CommandSender; import org.bukkit.entity.Entity; import org.jvnet.hk2.annotations.Contract; -import java.util.concurrent.CompletableFuture; - /** * Used to safely teleport people. */ diff --git a/src/main/java/com/onarandombox/MultiverseCore/api/Teleporter.java b/src/main/java/com/onarandombox/MultiverseCore/api/Teleporter.java index 838aea9d..39795957 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/api/Teleporter.java +++ b/src/main/java/com/onarandombox/MultiverseCore/api/Teleporter.java @@ -1,13 +1,13 @@ package com.onarandombox.MultiverseCore.api; +import java.util.concurrent.CompletableFuture; + import co.aikar.commands.BukkitCommandIssuer; import com.onarandombox.MultiverseCore.destination.ParsedDestination; import com.onarandombox.MultiverseCore.teleportation.TeleportResult; import org.bukkit.entity.Entity; import org.jvnet.hk2.annotations.Contract; -import java.util.concurrent.CompletableFuture; - @Contract public interface Teleporter { /** diff --git a/src/main/java/com/onarandombox/MultiverseCore/api/WorldPurger.java b/src/main/java/com/onarandombox/MultiverseCore/api/WorldPurger.java index 4c95067a..17b150cf 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/api/WorldPurger.java +++ b/src/main/java/com/onarandombox/MultiverseCore/api/WorldPurger.java @@ -1,11 +1,11 @@ package com.onarandombox.MultiverseCore.api; +import java.util.List; + import org.bukkit.command.CommandSender; import org.bukkit.entity.Entity; import org.jvnet.hk2.annotations.Contract; -import java.util.List; - /** * Used to remove animals from worlds that don't belong there. */ diff --git a/src/main/java/com/onarandombox/MultiverseCore/commands/CreateCommand.java b/src/main/java/com/onarandombox/MultiverseCore/commands/CreateCommand.java index cbc3b502..d9ffe695 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/commands/CreateCommand.java +++ b/src/main/java/com/onarandombox/MultiverseCore/commands/CreateCommand.java @@ -1,5 +1,8 @@ package com.onarandombox.MultiverseCore.commands; +import java.util.Collections; +import java.util.Random; + import co.aikar.commands.annotation.CommandAlias; import co.aikar.commands.annotation.CommandCompletion; import co.aikar.commands.annotation.CommandPermission; @@ -25,9 +28,6 @@ import org.bukkit.WorldType; import org.jetbrains.annotations.NotNull; import org.jvnet.hk2.annotations.Service; -import java.util.Collections; -import java.util.Random; - @Service @CommandAlias("mv") public class CreateCommand extends MultiverseCommand { diff --git a/src/main/java/com/onarandombox/MultiverseCore/commands/DumpsCommand.java b/src/main/java/com/onarandombox/MultiverseCore/commands/DumpsCommand.java index 8a1c9ab0..70cfc2d9 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/commands/DumpsCommand.java +++ b/src/main/java/com/onarandombox/MultiverseCore/commands/DumpsCommand.java @@ -1,5 +1,15 @@ package com.onarandombox.MultiverseCore.commands; +import static com.onarandombox.MultiverseCore.utils.file.FileUtils.getBukkitConfig; +import static com.onarandombox.MultiverseCore.utils.file.FileUtils.getServerProperties; + +import java.io.File; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.Map; + import co.aikar.commands.CommandIssuer; import co.aikar.commands.annotation.CommandAlias; import co.aikar.commands.annotation.CommandCompletion; @@ -30,16 +40,6 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.jvnet.hk2.annotations.Service; -import java.io.File; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.nio.file.Files; -import java.nio.file.Path; -import java.util.Map; - -import static com.onarandombox.MultiverseCore.utils.file.FileUtils.getBukkitConfig; -import static com.onarandombox.MultiverseCore.utils.file.FileUtils.getServerProperties; - @Service @CommandAlias("mv") public class DumpsCommand extends MultiverseCommand { diff --git a/src/main/java/com/onarandombox/MultiverseCore/commands/GamerulesCommand.java b/src/main/java/com/onarandombox/MultiverseCore/commands/GamerulesCommand.java index 4ce44ae4..2052e7bc 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/commands/GamerulesCommand.java +++ b/src/main/java/com/onarandombox/MultiverseCore/commands/GamerulesCommand.java @@ -1,5 +1,8 @@ package com.onarandombox.MultiverseCore.commands; +import java.util.HashMap; +import java.util.Map; + import co.aikar.commands.CommandIssuer; import co.aikar.commands.InvalidCommandArgument; import co.aikar.commands.MessageType; @@ -31,9 +34,6 @@ import org.bukkit.World; import org.jetbrains.annotations.NotNull; import org.jvnet.hk2.annotations.Service; -import java.util.HashMap; -import java.util.Map; - /** * List all gamerules in your current or specified world. */ diff --git a/src/main/java/com/onarandombox/MultiverseCore/commands/ListCommand.java b/src/main/java/com/onarandombox/MultiverseCore/commands/ListCommand.java index 75badc5d..b9bfdfc2 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/commands/ListCommand.java +++ b/src/main/java/com/onarandombox/MultiverseCore/commands/ListCommand.java @@ -1,5 +1,8 @@ package com.onarandombox.MultiverseCore.commands; +import java.util.ArrayList; +import java.util.List; + import co.aikar.commands.InvalidCommandArgument; import co.aikar.commands.annotation.CommandAlias; import co.aikar.commands.annotation.CommandCompletion; @@ -29,9 +32,6 @@ import org.bukkit.World; import org.jetbrains.annotations.NotNull; import org.jvnet.hk2.annotations.Service; -import java.util.ArrayList; -import java.util.List; - @Service @CommandAlias("mv") public class ListCommand extends MultiverseCommand { diff --git a/src/main/java/com/onarandombox/MultiverseCore/commands/RegenCommand.java b/src/main/java/com/onarandombox/MultiverseCore/commands/RegenCommand.java index 2386931b..62c1b241 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/commands/RegenCommand.java +++ b/src/main/java/com/onarandombox/MultiverseCore/commands/RegenCommand.java @@ -1,5 +1,8 @@ package com.onarandombox.MultiverseCore.commands; +import java.util.Collections; +import java.util.Random; + import co.aikar.commands.MessageType; import co.aikar.commands.annotation.CommandAlias; import co.aikar.commands.annotation.CommandCompletion; @@ -25,9 +28,6 @@ import jakarta.inject.Inject; import org.jetbrains.annotations.NotNull; import org.jvnet.hk2.annotations.Service; -import java.util.Collections; -import java.util.Random; - @Service @CommandAlias("mv") public class RegenCommand extends MultiverseCommand { diff --git a/src/main/java/com/onarandombox/MultiverseCore/commands/ReloadCommand.java b/src/main/java/com/onarandombox/MultiverseCore/commands/ReloadCommand.java index 8d13e0df..d30deb18 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/commands/ReloadCommand.java +++ b/src/main/java/com/onarandombox/MultiverseCore/commands/ReloadCommand.java @@ -1,5 +1,8 @@ package com.onarandombox.MultiverseCore.commands; +import java.util.ArrayList; +import java.util.List; + import co.aikar.commands.BukkitCommandIssuer; import co.aikar.commands.annotation.CommandAlias; import co.aikar.commands.annotation.CommandPermission; @@ -17,9 +20,6 @@ import org.bukkit.plugin.PluginManager; import org.jetbrains.annotations.NotNull; import org.jvnet.hk2.annotations.Service; -import java.util.ArrayList; -import java.util.List; - @Service @CommandAlias("mv") public class ReloadCommand extends MultiverseCommand { diff --git a/src/main/java/com/onarandombox/MultiverseCore/commands/TeleportCommand.java b/src/main/java/com/onarandombox/MultiverseCore/commands/TeleportCommand.java index a26f7635..30b39141 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/commands/TeleportCommand.java +++ b/src/main/java/com/onarandombox/MultiverseCore/commands/TeleportCommand.java @@ -1,5 +1,8 @@ package com.onarandombox.MultiverseCore.commands; +import java.util.Arrays; +import java.util.concurrent.CompletableFuture; + import co.aikar.commands.BukkitCommandIssuer; import co.aikar.commands.CommandIssuer; import co.aikar.commands.annotation.CommandAlias; @@ -18,9 +21,6 @@ import jakarta.inject.Inject; import org.bukkit.entity.Player; import org.jvnet.hk2.annotations.Service; -import java.util.Arrays; -import java.util.concurrent.CompletableFuture; - @Service @CommandAlias("mv") public class TeleportCommand extends MultiverseCommand { diff --git a/src/main/java/com/onarandombox/MultiverseCore/commandtools/MVCommandCompletions.java b/src/main/java/com/onarandombox/MultiverseCore/commandtools/MVCommandCompletions.java index 77f66d6a..687a5ba9 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/commandtools/MVCommandCompletions.java +++ b/src/main/java/com/onarandombox/MultiverseCore/commandtools/MVCommandCompletions.java @@ -1,5 +1,13 @@ package com.onarandombox.MultiverseCore.commandtools; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.stream.Collectors; + import co.aikar.commands.BukkitCommandCompletionContext; import co.aikar.commands.BukkitCommandIssuer; import co.aikar.commands.CommandIssuer; @@ -20,14 +28,6 @@ import org.bukkit.GameRule; import org.jetbrains.annotations.NotNull; import org.jvnet.hk2.annotations.Service; -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.stream.Collectors; - @Service public class MVCommandCompletions extends PaperCommandCompletions { diff --git a/src/main/java/com/onarandombox/MultiverseCore/commandtools/MVCommandContexts.java b/src/main/java/com/onarandombox/MultiverseCore/commandtools/MVCommandContexts.java index c0084e6e..531b29f3 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/commandtools/MVCommandContexts.java +++ b/src/main/java/com/onarandombox/MultiverseCore/commandtools/MVCommandContexts.java @@ -1,5 +1,8 @@ package com.onarandombox.MultiverseCore.commandtools; +import java.util.HashSet; +import java.util.Set; + import co.aikar.commands.BukkitCommandExecutionContext; import co.aikar.commands.BukkitCommandIssuer; import co.aikar.commands.InvalidCommandArgument; @@ -25,9 +28,6 @@ import org.bukkit.GameRule; import org.bukkit.entity.Player; import org.jvnet.hk2.annotations.Service; -import java.util.HashSet; -import java.util.Set; - @Service public class MVCommandContexts extends PaperCommandContexts { diff --git a/src/main/java/com/onarandombox/MultiverseCore/commandtools/MVCommandManager.java b/src/main/java/com/onarandombox/MultiverseCore/commandtools/MVCommandManager.java index 1da09d86..58de1ae1 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/commandtools/MVCommandManager.java +++ b/src/main/java/com/onarandombox/MultiverseCore/commandtools/MVCommandManager.java @@ -1,5 +1,7 @@ package com.onarandombox.MultiverseCore.commandtools; +import java.util.List; + import co.aikar.commands.BukkitCommandCompletionContext; import co.aikar.commands.BukkitCommandExecutionContext; import co.aikar.commands.CommandCompletions; @@ -18,8 +20,6 @@ import org.bukkit.command.CommandSender; import org.jetbrains.annotations.NotNull; import org.jvnet.hk2.annotations.Service; -import java.util.List; - /** * Main class to manage permissions. */ diff --git a/src/main/java/com/onarandombox/MultiverseCore/commandtools/flags/CommandFlag.java b/src/main/java/com/onarandombox/MultiverseCore/commandtools/flags/CommandFlag.java index 2c83c882..a11582e0 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/commandtools/flags/CommandFlag.java +++ b/src/main/java/com/onarandombox/MultiverseCore/commandtools/flags/CommandFlag.java @@ -1,11 +1,11 @@ package com.onarandombox.MultiverseCore.commandtools.flags; -import org.jetbrains.annotations.NotNull; - import java.util.ArrayList; import java.util.Collections; import java.util.List; +import org.jetbrains.annotations.NotNull; + /** * Represents a flag. */ diff --git a/src/main/java/com/onarandombox/MultiverseCore/commandtools/flags/CommandFlagGroup.java b/src/main/java/com/onarandombox/MultiverseCore/commandtools/flags/CommandFlagGroup.java index 932f1f2e..a36d23d7 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/commandtools/flags/CommandFlagGroup.java +++ b/src/main/java/com/onarandombox/MultiverseCore/commandtools/flags/CommandFlagGroup.java @@ -1,8 +1,5 @@ package com.onarandombox.MultiverseCore.commandtools.flags; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; @@ -10,6 +7,9 @@ import java.util.List; import java.util.Map; import java.util.Set; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + /** * A group of flags. */ diff --git a/src/main/java/com/onarandombox/MultiverseCore/commandtools/flags/CommandFlagsManager.java b/src/main/java/com/onarandombox/MultiverseCore/commandtools/flags/CommandFlagsManager.java index 57dcb298..bf9eadda 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/commandtools/flags/CommandFlagsManager.java +++ b/src/main/java/com/onarandombox/MultiverseCore/commandtools/flags/CommandFlagsManager.java @@ -1,16 +1,16 @@ package com.onarandombox.MultiverseCore.commandtools.flags; -import co.aikar.commands.InvalidCommandArgument; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; -import org.jvnet.hk2.annotations.Service; - import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.Map; +import co.aikar.commands.InvalidCommandArgument; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; +import org.jvnet.hk2.annotations.Service; + /** * Manages all the flag groups and parsing. */ diff --git a/src/main/java/com/onarandombox/MultiverseCore/commandtools/flags/CommandValueFlag.java b/src/main/java/com/onarandombox/MultiverseCore/commandtools/flags/CommandValueFlag.java index 4e2acb13..5c28ce46 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/commandtools/flags/CommandValueFlag.java +++ b/src/main/java/com/onarandombox/MultiverseCore/commandtools/flags/CommandValueFlag.java @@ -1,15 +1,15 @@ package com.onarandombox.MultiverseCore.commandtools.flags; -import co.aikar.commands.InvalidCommandArgument; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - import java.util.Arrays; import java.util.Collection; import java.util.List; import java.util.function.Function; import java.util.stream.Collectors; +import co.aikar.commands.InvalidCommandArgument; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + /** * Represents a flag with a value. * diff --git a/src/main/java/com/onarandombox/MultiverseCore/commandtools/flags/ParsedCommandFlags.java b/src/main/java/com/onarandombox/MultiverseCore/commandtools/flags/ParsedCommandFlags.java index 0d97efe4..605237bd 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/commandtools/flags/ParsedCommandFlags.java +++ b/src/main/java/com/onarandombox/MultiverseCore/commandtools/flags/ParsedCommandFlags.java @@ -1,11 +1,11 @@ package com.onarandombox.MultiverseCore.commandtools.flags; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - import java.util.HashMap; import java.util.Map; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + /** * Object to contain the results of the flags present and its values. */ diff --git a/src/main/java/com/onarandombox/MultiverseCore/commandtools/queue/CommandQueueManager.java b/src/main/java/com/onarandombox/MultiverseCore/commandtools/queue/CommandQueueManager.java index 72d97c86..3b9ea879 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/commandtools/queue/CommandQueueManager.java +++ b/src/main/java/com/onarandombox/MultiverseCore/commandtools/queue/CommandQueueManager.java @@ -7,6 +7,9 @@ package com.onarandombox.MultiverseCore.commandtools.queue; +import java.util.Map; +import java.util.WeakHashMap; + import com.dumptruckman.minecraft.util.Logging; import com.onarandombox.MultiverseCore.MultiverseCore; import jakarta.inject.Inject; @@ -20,9 +23,6 @@ import org.bukkit.scheduler.BukkitTask; import org.jetbrains.annotations.NotNull; import org.jvnet.hk2.annotations.Service; -import java.util.Map; -import java.util.WeakHashMap; - /** *
Manages the queuing of dangerous commands that require {@code /mv confirm} before executing.
* diff --git a/src/main/java/com/onarandombox/MultiverseCore/commandtools/queue/DummyCommandBlockSender.java b/src/main/java/com/onarandombox/MultiverseCore/commandtools/queue/DummyCommandBlockSender.java index 181e8e50..0c31c134 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/commandtools/queue/DummyCommandBlockSender.java +++ b/src/main/java/com/onarandombox/MultiverseCore/commandtools/queue/DummyCommandBlockSender.java @@ -1,5 +1,8 @@ package com.onarandombox.MultiverseCore.commandtools.queue; +import java.util.Set; +import java.util.UUID; + import org.bukkit.Bukkit; import org.bukkit.Server; import org.bukkit.command.CommandSender; @@ -10,9 +13,6 @@ import org.bukkit.plugin.Plugin; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import java.util.Set; -import java.util.UUID; - /** * Used by {@link CommandQueueManager}, so different commands block can be recognised as one. */ diff --git a/src/main/java/com/onarandombox/MultiverseCore/config/MVCoreConfig.java b/src/main/java/com/onarandombox/MultiverseCore/config/MVCoreConfig.java index 5a4f1026..1e713b84 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/config/MVCoreConfig.java +++ b/src/main/java/com/onarandombox/MultiverseCore/config/MVCoreConfig.java @@ -1,5 +1,9 @@ package com.onarandombox.MultiverseCore.config; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; + import com.dumptruckman.minecraft.util.Logging; import com.onarandombox.MultiverseCore.MultiverseCore; import com.onarandombox.MultiverseCore.api.MVConfig; @@ -17,10 +21,6 @@ import org.bukkit.plugin.PluginManager; import org.jetbrains.annotations.NotNull; import org.jvnet.hk2.annotations.Service; -import java.io.IOException; -import java.nio.file.Files; -import java.nio.file.Path; - @Service public class MVCoreConfig implements MVConfig { public static final String CONFIG_FILENAME = "config.yml"; diff --git a/src/main/java/com/onarandombox/MultiverseCore/configuration/handle/CommentedYamlConfigHandle.java b/src/main/java/com/onarandombox/MultiverseCore/configuration/handle/CommentedYamlConfigHandle.java index 23208c8d..a35daa88 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/configuration/handle/CommentedYamlConfigHandle.java +++ b/src/main/java/com/onarandombox/MultiverseCore/configuration/handle/CommentedYamlConfigHandle.java @@ -1,5 +1,9 @@ package com.onarandombox.MultiverseCore.configuration.handle; +import java.io.IOException; +import java.nio.file.Path; +import java.util.logging.Logger; + import com.dumptruckman.minecraft.util.Logging; import com.onarandombox.MultiverseCore.configuration.migration.ConfigMigrator; import com.onarandombox.MultiverseCore.configuration.node.CommentedNode; @@ -10,10 +14,6 @@ import io.vavr.control.Try; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import java.io.IOException; -import java.nio.file.Path; -import java.util.logging.Logger; - /** * Configuration handle for commented YAML files. */ diff --git a/src/main/java/com/onarandombox/MultiverseCore/configuration/handle/ConfigurationSectionHandle.java b/src/main/java/com/onarandombox/MultiverseCore/configuration/handle/ConfigurationSectionHandle.java index 7e7aeeef..eeb79fb6 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/configuration/handle/ConfigurationSectionHandle.java +++ b/src/main/java/com/onarandombox/MultiverseCore/configuration/handle/ConfigurationSectionHandle.java @@ -1,5 +1,7 @@ package com.onarandombox.MultiverseCore.configuration.handle; +import java.util.logging.Logger; + import com.onarandombox.MultiverseCore.configuration.migration.ConfigMigrator; import com.onarandombox.MultiverseCore.configuration.node.NodeGroup; import io.vavr.control.Try; @@ -7,8 +9,6 @@ import org.bukkit.configuration.ConfigurationSection; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import java.util.logging.Logger; - /** * Configuration handle for a single configuration section. */ diff --git a/src/main/java/com/onarandombox/MultiverseCore/configuration/handle/FileConfigHandle.java b/src/main/java/com/onarandombox/MultiverseCore/configuration/handle/FileConfigHandle.java index c1f61c1b..82d30dd8 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/configuration/handle/FileConfigHandle.java +++ b/src/main/java/com/onarandombox/MultiverseCore/configuration/handle/FileConfigHandle.java @@ -1,5 +1,10 @@ package com.onarandombox.MultiverseCore.configuration.handle; +import java.io.File; +import java.io.IOException; +import java.nio.file.Path; +import java.util.logging.Logger; + import com.onarandombox.MultiverseCore.configuration.migration.ConfigMigrator; import com.onarandombox.MultiverseCore.configuration.node.NodeGroup; import io.vavr.control.Try; @@ -8,11 +13,6 @@ import org.bukkit.configuration.file.FileConfiguration; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import java.io.File; -import java.io.IOException; -import java.nio.file.Path; -import java.util.logging.Logger; - /** * Generic configuration handle for file based configurations. * @paramUtility class in helping to check the status of a world name and it's associated world folder.
* diff --git a/src/main/java/com/onarandombox/MultiverseCore/world/WorldProperties.java b/src/main/java/com/onarandombox/MultiverseCore/world/WorldProperties.java index c42429c0..d650f435 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/world/WorldProperties.java +++ b/src/main/java/com/onarandombox/MultiverseCore/world/WorldProperties.java @@ -1,5 +1,13 @@ package com.onarandombox.MultiverseCore.world; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + import com.onarandombox.MultiverseCore.world.SimpleMVWorld.NullLocation; import com.onarandombox.MultiverseCore.world.configuration.AllowedPortalType; import com.onarandombox.MultiverseCore.world.configuration.EnglishChatColor; @@ -23,14 +31,6 @@ import org.bukkit.World.Environment; import org.bukkit.configuration.serialization.SerializableAs; import org.jetbrains.annotations.Nullable; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - /* * This is a property class, I think we don't need that much javadoc. * BEGIN CHECKSTYLE-SUPPRESSION: Javadoc diff --git a/src/main/java/com/onarandombox/MultiverseCore/world/configuration/EntryFee.java b/src/main/java/com/onarandombox/MultiverseCore/world/configuration/EntryFee.java index f8fe8008..32afbd1c 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/world/configuration/EntryFee.java +++ b/src/main/java/com/onarandombox/MultiverseCore/world/configuration/EntryFee.java @@ -1,5 +1,7 @@ package com.onarandombox.MultiverseCore.world.configuration; +import java.util.Map; + import com.onarandombox.MultiverseCore.utils.MaterialConverter; import me.main__.util.SerializationConfig.Property; import me.main__.util.SerializationConfig.SerializationConfig; @@ -8,8 +10,6 @@ import org.bukkit.Material; import org.bukkit.configuration.serialization.SerializableAs; import org.jetbrains.annotations.Nullable; -import java.util.Map; - /** * Entryfee-settings. */ diff --git a/src/main/java/com/onarandombox/MultiverseCore/world/configuration/SpawnSettings.java b/src/main/java/com/onarandombox/MultiverseCore/world/configuration/SpawnSettings.java index 391c1fd0..977c8939 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/world/configuration/SpawnSettings.java +++ b/src/main/java/com/onarandombox/MultiverseCore/world/configuration/SpawnSettings.java @@ -1,11 +1,11 @@ package com.onarandombox.MultiverseCore.world.configuration; +import java.util.Map; + import me.main__.util.SerializationConfig.Property; import me.main__.util.SerializationConfig.SerializationConfig; import org.bukkit.configuration.serialization.SerializableAs; -import java.util.Map; - /** * Spawning-Settings. */ diff --git a/src/main/java/com/onarandombox/MultiverseCore/world/configuration/SubSpawnSettings.java b/src/main/java/com/onarandombox/MultiverseCore/world/configuration/SubSpawnSettings.java index bde127f0..ee75ac96 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/world/configuration/SubSpawnSettings.java +++ b/src/main/java/com/onarandombox/MultiverseCore/world/configuration/SubSpawnSettings.java @@ -1,13 +1,13 @@ package com.onarandombox.MultiverseCore.world.configuration; -import me.main__.util.SerializationConfig.Property; -import me.main__.util.SerializationConfig.SerializationConfig; -import org.bukkit.configuration.serialization.SerializableAs; - import java.util.ArrayList; import java.util.List; import java.util.Map; +import me.main__.util.SerializationConfig.Property; +import me.main__.util.SerializationConfig.SerializationConfig; +import org.bukkit.configuration.serialization.SerializableAs; + /** * SpawnSubSettings. */ diff --git a/src/main/java/com/onarandombox/MultiverseCore/worldnew/LoadedMultiverseWorld.java b/src/main/java/com/onarandombox/MultiverseCore/worldnew/LoadedMultiverseWorld.java index 1bf6f19e..a50fd96c 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/worldnew/LoadedMultiverseWorld.java +++ b/src/main/java/com/onarandombox/MultiverseCore/worldnew/LoadedMultiverseWorld.java @@ -1,5 +1,8 @@ package com.onarandombox.MultiverseCore.worldnew; +import java.util.List; +import java.util.UUID; + import com.dumptruckman.minecraft.util.Logging; import com.onarandombox.MultiverseCore.api.BlockSafety; import com.onarandombox.MultiverseCore.api.LocationManipulation; @@ -15,9 +18,6 @@ import org.bukkit.WorldType; import org.bukkit.entity.Player; import org.jetbrains.annotations.NotNull; -import java.util.List; -import java.util.UUID; - /** * Extension of {@link MultiverseWorld} that represents a world that is currently loaded with bukkit world object. */ diff --git a/src/main/java/com/onarandombox/MultiverseCore/worldnew/MultiverseWorld.java b/src/main/java/com/onarandombox/MultiverseCore/worldnew/MultiverseWorld.java index 49b817fc..de6f9414 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/worldnew/MultiverseWorld.java +++ b/src/main/java/com/onarandombox/MultiverseCore/worldnew/MultiverseWorld.java @@ -1,5 +1,8 @@ package com.onarandombox.MultiverseCore.worldnew; +import java.util.Collection; +import java.util.List; + import com.google.common.base.Strings; import com.onarandombox.MultiverseCore.world.configuration.AllowedPortalType; import com.onarandombox.MultiverseCore.worldnew.config.WorldConfig; @@ -12,9 +15,6 @@ import org.bukkit.Material; import org.bukkit.World; import org.jetbrains.annotations.Nullable; -import java.util.Collection; -import java.util.List; - /** * Represents a world handled by Multiverse which has all the custom properties provided by Multiverse. */ diff --git a/src/main/java/com/onarandombox/MultiverseCore/worldnew/WorldManager.java b/src/main/java/com/onarandombox/MultiverseCore/worldnew/WorldManager.java index 8117c645..56930a2e 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/worldnew/WorldManager.java +++ b/src/main/java/com/onarandombox/MultiverseCore/worldnew/WorldManager.java @@ -1,5 +1,19 @@ package com.onarandombox.MultiverseCore.worldnew; +import static com.onarandombox.MultiverseCore.utils.message.MessageReplacement.replace; +import static com.onarandombox.MultiverseCore.worldnew.helpers.DataStore.WorldBorderStore; +import static com.onarandombox.MultiverseCore.worldnew.helpers.DataStore.WorldConfigStore; + +import java.io.File; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.atomic.AtomicReference; + import com.dumptruckman.minecraft.util.Logging; import com.google.common.base.Strings; import com.onarandombox.MultiverseCore.api.BlockSafety; @@ -41,20 +55,6 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.jvnet.hk2.annotations.Service; -import java.io.File; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.concurrent.atomic.AtomicReference; - -import static com.onarandombox.MultiverseCore.utils.message.MessageReplacement.replace; -import static com.onarandombox.MultiverseCore.worldnew.helpers.DataStore.WorldBorderStore; -import static com.onarandombox.MultiverseCore.worldnew.helpers.DataStore.WorldConfigStore; - /** * This manager contains all the world managing functions that your heart desires. */ diff --git a/src/main/java/com/onarandombox/MultiverseCore/worldnew/WorldNameChecker.java b/src/main/java/com/onarandombox/MultiverseCore/worldnew/WorldNameChecker.java index 856c0032..a7bbbb80 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/worldnew/WorldNameChecker.java +++ b/src/main/java/com/onarandombox/MultiverseCore/worldnew/WorldNameChecker.java @@ -1,14 +1,14 @@ package com.onarandombox.MultiverseCore.worldnew; +import java.io.File; +import java.util.Set; +import java.util.regex.Pattern; + import org.bukkit.Bukkit; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.jvnet.hk2.annotations.Service; -import java.io.File; -import java.util.Set; -import java.util.regex.Pattern; - /** *Utility class in helping to check the status of a world name and it's associated world folder.
* diff --git a/src/main/java/com/onarandombox/MultiverseCore/worldnew/WorldPurger.java b/src/main/java/com/onarandombox/MultiverseCore/worldnew/WorldPurger.java index cf553917..3fe4e535 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/worldnew/WorldPurger.java +++ b/src/main/java/com/onarandombox/MultiverseCore/worldnew/WorldPurger.java @@ -1,5 +1,10 @@ package com.onarandombox.MultiverseCore.worldnew; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.Objects; + import com.dumptruckman.minecraft.util.Logging; import org.bukkit.World; import org.bukkit.command.CommandSender; @@ -19,11 +24,6 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.jvnet.hk2.annotations.Service; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import java.util.Objects; - // TODO: This entire class is a mess. /** * Used to remove animals from worlds that don't belong there. diff --git a/src/main/java/com/onarandombox/MultiverseCore/worldnew/config/LegacyAliasMigrator.java b/src/main/java/com/onarandombox/MultiverseCore/worldnew/config/LegacyAliasMigrator.java index 1a0a473b..32709f1a 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/worldnew/config/LegacyAliasMigrator.java +++ b/src/main/java/com/onarandombox/MultiverseCore/worldnew/config/LegacyAliasMigrator.java @@ -1,12 +1,12 @@ package com.onarandombox.MultiverseCore.worldnew.config; +import java.util.concurrent.atomic.AtomicReference; + import com.onarandombox.MultiverseCore.configuration.migration.MigratorAction; import io.vavr.control.Try; import org.bukkit.ChatColor; import org.bukkit.configuration.ConfigurationSection; -import java.util.concurrent.atomic.AtomicReference; - class LegacyAliasMigrator implements MigratorAction { @Override public void migrate(ConfigurationSection config) { diff --git a/src/main/java/com/onarandombox/MultiverseCore/worldnew/config/NullLocation.java b/src/main/java/com/onarandombox/MultiverseCore/worldnew/config/NullLocation.java index ffba0b0f..5825a3e6 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/worldnew/config/NullLocation.java +++ b/src/main/java/com/onarandombox/MultiverseCore/worldnew/config/NullLocation.java @@ -1,14 +1,14 @@ package com.onarandombox.MultiverseCore.worldnew.config; +import java.util.Collections; +import java.util.Map; + import com.onarandombox.MultiverseCore.world.SimpleMVWorld; import org.bukkit.Location; import org.bukkit.configuration.serialization.SerializableAs; import org.bukkit.util.Vector; import org.jetbrains.annotations.NotNull; -import java.util.Collections; -import java.util.Map; - /** * Null-location. */ diff --git a/src/main/java/com/onarandombox/MultiverseCore/worldnew/config/SpawnLocation.java b/src/main/java/com/onarandombox/MultiverseCore/worldnew/config/SpawnLocation.java index cf8f087a..797603c2 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/worldnew/config/SpawnLocation.java +++ b/src/main/java/com/onarandombox/MultiverseCore/worldnew/config/SpawnLocation.java @@ -1,5 +1,10 @@ package com.onarandombox.MultiverseCore.worldnew.config; +import java.lang.ref.Reference; +import java.lang.ref.WeakReference; +import java.util.HashMap; +import java.util.Map; + import org.bukkit.Chunk; import org.bukkit.Location; import org.bukkit.World; @@ -8,11 +13,6 @@ import org.bukkit.configuration.serialization.ConfigurationSerializable; import org.bukkit.configuration.serialization.SerializableAs; import org.jetbrains.annotations.NotNull; -import java.lang.ref.Reference; -import java.lang.ref.WeakReference; -import java.util.HashMap; -import java.util.Map; - /** * Just like a regular {@link Location}, however {@code world} is usually {@code null} * or just a weak reference and it implements {@link ConfigurationSerializable}. diff --git a/src/main/java/com/onarandombox/MultiverseCore/worldnew/config/WorldConfig.java b/src/main/java/com/onarandombox/MultiverseCore/worldnew/config/WorldConfig.java index f8569c1c..349443aa 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/worldnew/config/WorldConfig.java +++ b/src/main/java/com/onarandombox/MultiverseCore/worldnew/config/WorldConfig.java @@ -1,5 +1,8 @@ package com.onarandombox.MultiverseCore.worldnew.config; +import java.util.Collection; +import java.util.List; + import com.dumptruckman.minecraft.util.Logging; import com.onarandombox.MultiverseCore.configuration.handle.ConfigurationSectionHandle; import com.onarandombox.MultiverseCore.configuration.migration.BooleanMigratorAction; @@ -21,9 +24,6 @@ import org.bukkit.configuration.ConfigurationSection; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import java.util.Collection; -import java.util.List; - /** * Represents a world configuration. */ diff --git a/src/main/java/com/onarandombox/MultiverseCore/worldnew/config/WorldConfigNodes.java b/src/main/java/com/onarandombox/MultiverseCore/worldnew/config/WorldConfigNodes.java index 9930767c..940ec695 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/worldnew/config/WorldConfigNodes.java +++ b/src/main/java/com/onarandombox/MultiverseCore/worldnew/config/WorldConfigNodes.java @@ -1,5 +1,8 @@ package com.onarandombox.MultiverseCore.worldnew.config; +import java.util.ArrayList; +import java.util.List; + import com.onarandombox.MultiverseCore.configuration.node.ConfigNode; import com.onarandombox.MultiverseCore.configuration.node.Node; import com.onarandombox.MultiverseCore.configuration.node.NodeGroup; @@ -11,9 +14,6 @@ import org.bukkit.Location; import org.bukkit.Material; import org.bukkit.World; -import java.util.ArrayList; -import java.util.List; - /** * Represents nodes in a world configuration. */ diff --git a/src/main/java/com/onarandombox/MultiverseCore/worldnew/config/WorldsConfigManager.java b/src/main/java/com/onarandombox/MultiverseCore/worldnew/config/WorldsConfigManager.java index 8c815db5..47ce1b1a 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/worldnew/config/WorldsConfigManager.java +++ b/src/main/java/com/onarandombox/MultiverseCore/worldnew/config/WorldsConfigManager.java @@ -1,5 +1,14 @@ package com.onarandombox.MultiverseCore.worldnew.config; +import java.io.File; +import java.io.IOException; +import java.nio.file.Files; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + import com.dumptruckman.minecraft.util.Logging; import com.onarandombox.MultiverseCore.MultiverseCore; import io.vavr.Tuple2; @@ -12,15 +21,6 @@ import org.bukkit.configuration.file.YamlConfiguration; import org.jetbrains.annotations.NotNull; import org.jvnet.hk2.annotations.Service; -import java.io.File; -import java.io.IOException; -import java.nio.file.Files; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Set; - /** * Manages the worlds.yml file. */ diff --git a/src/main/java/com/onarandombox/MultiverseCore/worldnew/entrycheck/WorldEntryChecker.java b/src/main/java/com/onarandombox/MultiverseCore/worldnew/entrycheck/WorldEntryChecker.java index 0c82c11c..84df53f4 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/worldnew/entrycheck/WorldEntryChecker.java +++ b/src/main/java/com/onarandombox/MultiverseCore/worldnew/entrycheck/WorldEntryChecker.java @@ -1,5 +1,9 @@ package com.onarandombox.MultiverseCore.worldnew.entrycheck; +import static com.onarandombox.MultiverseCore.utils.message.MessageReplacement.replace; + +import java.util.Collection; + import com.onarandombox.MultiverseCore.config.MVCoreConfig; import com.onarandombox.MultiverseCore.economy.MVEconomist; import com.onarandombox.MultiverseCore.permissions.CorePermissionsChecker; @@ -17,10 +21,6 @@ import org.bukkit.entity.Player; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import java.util.Collection; - -import static com.onarandombox.MultiverseCore.utils.message.MessageReplacement.replace; - /** * Checks if a player can enter a world. */ diff --git a/src/main/java/com/onarandombox/MultiverseCore/worldnew/generators/GeneratorPlugin.java b/src/main/java/com/onarandombox/MultiverseCore/worldnew/generators/GeneratorPlugin.java index f6264285..824a2db4 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/worldnew/generators/GeneratorPlugin.java +++ b/src/main/java/com/onarandombox/MultiverseCore/worldnew/generators/GeneratorPlugin.java @@ -1,10 +1,10 @@ package com.onarandombox.MultiverseCore.worldnew.generators; +import java.util.Collection; + import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import java.util.Collection; - /** *A generator API for Multiverse.
* diff --git a/src/main/java/com/onarandombox/MultiverseCore/worldnew/generators/GeneratorProvider.java b/src/main/java/com/onarandombox/MultiverseCore/worldnew/generators/GeneratorProvider.java index 1f282666..d2d09491 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/worldnew/generators/GeneratorProvider.java +++ b/src/main/java/com/onarandombox/MultiverseCore/worldnew/generators/GeneratorProvider.java @@ -1,5 +1,16 @@ package com.onarandombox.MultiverseCore.worldnew.generators; +import static com.onarandombox.MultiverseCore.utils.file.FileUtils.getBukkitConfig; + +import java.io.File; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + import com.dumptruckman.minecraft.util.Logging; import com.onarandombox.MultiverseCore.MultiverseCore; import io.vavr.control.Try; @@ -18,17 +29,6 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.jvnet.hk2.annotations.Service; -import java.io.File; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import static com.onarandombox.MultiverseCore.utils.file.FileUtils.getBukkitConfig; - /** * Parse the default world generators from the bukkit config and load any generator plugins. * Helps in suggesting and validating generator strings. diff --git a/src/main/java/com/onarandombox/MultiverseCore/worldnew/generators/SimpleGeneratorPlugin.java b/src/main/java/com/onarandombox/MultiverseCore/worldnew/generators/SimpleGeneratorPlugin.java index 6a701c09..5c05f050 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/worldnew/generators/SimpleGeneratorPlugin.java +++ b/src/main/java/com/onarandombox/MultiverseCore/worldnew/generators/SimpleGeneratorPlugin.java @@ -1,11 +1,11 @@ package com.onarandombox.MultiverseCore.worldnew.generators; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - import java.util.Collection; import java.util.Collections; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + /** * A default implementation of {@link GeneratorPlugin} for those generator plugins that do not provide their own * custom {@link GeneratorPlugin} implementation to Multiverse. diff --git a/src/main/java/com/onarandombox/MultiverseCore/worldnew/helpers/DataStore.java b/src/main/java/com/onarandombox/MultiverseCore/worldnew/helpers/DataStore.java index bd65e57c..b39697e7 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/worldnew/helpers/DataStore.java +++ b/src/main/java/com/onarandombox/MultiverseCore/worldnew/helpers/DataStore.java @@ -1,5 +1,9 @@ package com.onarandombox.MultiverseCore.worldnew.helpers; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + import com.dumptruckman.minecraft.util.Logging; import com.onarandombox.MultiverseCore.worldnew.LoadedMultiverseWorld; import io.vavr.control.Try; @@ -7,10 +11,6 @@ import org.bukkit.GameRule; import org.bukkit.World; import org.jvnet.hk2.annotations.Service; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - /** * A data store for storing and restoring data from an object. * diff --git a/src/main/java/com/onarandombox/MultiverseCore/worldnew/helpers/FilesManipulator.java b/src/main/java/com/onarandombox/MultiverseCore/worldnew/helpers/FilesManipulator.java index 6661ae22..49ade635 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/worldnew/helpers/FilesManipulator.java +++ b/src/main/java/com/onarandombox/MultiverseCore/worldnew/helpers/FilesManipulator.java @@ -1,9 +1,6 @@ package com.onarandombox.MultiverseCore.worldnew.helpers; -import com.dumptruckman.minecraft.util.Logging; -import io.vavr.control.Try; -import org.jetbrains.annotations.NotNull; -import org.jvnet.hk2.annotations.Service; +import static java.nio.file.StandardCopyOption.COPY_ATTRIBUTES; import java.io.File; import java.io.IOException; @@ -17,7 +14,10 @@ import java.util.Comparator; import java.util.List; import java.util.stream.Stream; -import static java.nio.file.StandardCopyOption.COPY_ATTRIBUTES; +import com.dumptruckman.minecraft.util.Logging; +import io.vavr.control.Try; +import org.jetbrains.annotations.NotNull; +import org.jvnet.hk2.annotations.Service; /** * A helper class for manipulating files and folders. diff --git a/src/main/java/com/onarandombox/MultiverseCore/worldnew/options/CreateWorldOptions.java b/src/main/java/com/onarandombox/MultiverseCore/worldnew/options/CreateWorldOptions.java index 9da8f633..f769bbeb 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/worldnew/options/CreateWorldOptions.java +++ b/src/main/java/com/onarandombox/MultiverseCore/worldnew/options/CreateWorldOptions.java @@ -1,12 +1,12 @@ package com.onarandombox.MultiverseCore.worldnew.options; +import java.util.Random; + import org.bukkit.World; import org.bukkit.WorldType; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import java.util.Random; - /** * Options for customizing the creation of a new world. */ diff --git a/src/main/java/com/onarandombox/MultiverseCore/worldnew/options/RegenWorldOptions.java b/src/main/java/com/onarandombox/MultiverseCore/worldnew/options/RegenWorldOptions.java index 35167bf7..600796f0 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/worldnew/options/RegenWorldOptions.java +++ b/src/main/java/com/onarandombox/MultiverseCore/worldnew/options/RegenWorldOptions.java @@ -1,11 +1,11 @@ package com.onarandombox.MultiverseCore.worldnew.options; +import java.util.Random; + import com.onarandombox.MultiverseCore.worldnew.LoadedMultiverseWorld; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import java.util.Random; - /** * Options for customizing the regeneration of a world. */ diff --git a/src/old-test/java/com/onarandombox/MultiverseCore/TestDebugMode.java b/src/old-test/java/com/onarandombox/MultiverseCore/TestDebugMode.java index 4ec5d539..5c5357a2 100644 --- a/src/old-test/java/com/onarandombox/MultiverseCore/TestDebugMode.java +++ b/src/old-test/java/com/onarandombox/MultiverseCore/TestDebugMode.java @@ -7,9 +7,15 @@ package com.onarandombox.MultiverseCore; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + +import java.io.File; + import com.onarandombox.MultiverseCore.api.MVCore; import com.onarandombox.MultiverseCore.utils.TestInstanceCreator; -import junit.framework.Assert; import org.bukkit.Server; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; @@ -18,13 +24,6 @@ import org.junit.After; import org.junit.Before; import org.junit.Test; -import java.io.File; - -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; - public class TestDebugMode { TestInstanceCreator creator; Server mockServer; diff --git a/src/old-test/java/com/onarandombox/MultiverseCore/TestEntitySpawnRules.java b/src/old-test/java/com/onarandombox/MultiverseCore/TestEntitySpawnRules.java index 3392ed1f..a5a8e824 100644 --- a/src/old-test/java/com/onarandombox/MultiverseCore/TestEntitySpawnRules.java +++ b/src/old-test/java/com/onarandombox/MultiverseCore/TestEntitySpawnRules.java @@ -1,7 +1,20 @@ package com.onarandombox.MultiverseCore; -import com.onarandombox.MultiverseCore.api.MVWorldManager; +import static org.junit.Assert.assertTrue; +import static org.mockito.Mockito.anyBoolean; +import static org.mockito.Mockito.anyString; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.never; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; + +import java.lang.reflect.Field; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + import com.onarandombox.MultiverseCore.api.MVWorld; +import com.onarandombox.MultiverseCore.api.MVWorldManager; import com.onarandombox.MultiverseCore.listeners.MVEntityListener; import com.onarandombox.MultiverseCore.utils.MockWorldFactory; import com.onarandombox.MultiverseCore.utils.TestInstanceCreator; @@ -17,19 +30,6 @@ import org.junit.After; import org.junit.Before; import org.junit.Test; -import java.lang.reflect.Field; -import java.util.Arrays; -import java.util.Collections; -import java.util.List; - -import static org.junit.Assert.assertTrue; -import static org.mockito.Mockito.anyBoolean; -import static org.mockito.Mockito.anyString; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.never; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; - public class TestEntitySpawnRules { TestInstanceCreator creator; MultiverseCore core; diff --git a/src/old-test/java/com/onarandombox/MultiverseCore/TestEntryFeeConversion.java b/src/old-test/java/com/onarandombox/MultiverseCore/TestEntryFeeConversion.java index f62c91bc..dd7a1d3f 100644 --- a/src/old-test/java/com/onarandombox/MultiverseCore/TestEntryFeeConversion.java +++ b/src/old-test/java/com/onarandombox/MultiverseCore/TestEntryFeeConversion.java @@ -1,5 +1,9 @@ package com.onarandombox.MultiverseCore; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; + import java.util.HashMap; import java.util.Map; @@ -10,10 +14,6 @@ import org.junit.After; import org.junit.Before; import org.junit.Test; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; - public class TestEntryFeeConversion { private TestInstanceCreator creator; diff --git a/src/old-test/java/com/onarandombox/MultiverseCore/TestModifyCommand.java b/src/old-test/java/com/onarandombox/MultiverseCore/TestModifyCommand.java index 74c57e6b..f324ddae 100644 --- a/src/old-test/java/com/onarandombox/MultiverseCore/TestModifyCommand.java +++ b/src/old-test/java/com/onarandombox/MultiverseCore/TestModifyCommand.java @@ -1,21 +1,17 @@ package com.onarandombox.MultiverseCore; -import com.onarandombox.MultiverseCore.api.MVWorld; +import static org.junit.Assert.assertTrue; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + import com.onarandombox.MultiverseCore.utils.TestInstanceCreator; import org.bukkit.Server; -import org.bukkit.World.Environment; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.junit.After; import org.junit.Before; import org.junit.Test; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; - public class TestModifyCommand { TestInstanceCreator creator; Server mockServer; diff --git a/src/old-test/java/com/onarandombox/MultiverseCore/TestWorldProperties.java b/src/old-test/java/com/onarandombox/MultiverseCore/TestWorldProperties.java index e08a0ff8..b36aec3b 100644 --- a/src/old-test/java/com/onarandombox/MultiverseCore/TestWorldProperties.java +++ b/src/old-test/java/com/onarandombox/MultiverseCore/TestWorldProperties.java @@ -7,6 +7,13 @@ package com.onarandombox.MultiverseCore; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; + import com.onarandombox.MultiverseCore.api.MVWorld; import com.onarandombox.MultiverseCore.utils.MockWorldFactory; import com.onarandombox.MultiverseCore.utils.TestInstanceCreator; @@ -30,18 +37,6 @@ import org.junit.After; import org.junit.Before; import org.junit.Test; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertSame; -import static org.junit.Assert.assertTrue; -import static org.mockito.Mockito.any; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.times; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; - public class TestWorldProperties { private TestInstanceCreator creator; private MultiverseCore core; diff --git a/src/old-test/java/com/onarandombox/MultiverseCore/TestWorldPurger.java b/src/old-test/java/com/onarandombox/MultiverseCore/TestWorldPurger.java index c95c04aa..fb0f5088 100644 --- a/src/old-test/java/com/onarandombox/MultiverseCore/TestWorldPurger.java +++ b/src/old-test/java/com/onarandombox/MultiverseCore/TestWorldPurger.java @@ -1,5 +1,13 @@ package com.onarandombox.MultiverseCore; +import static org.junit.Assert.assertTrue; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.never; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; + +import java.util.Arrays; + import com.onarandombox.MultiverseCore.api.MVWorld; import com.onarandombox.MultiverseCore.api.WorldPurger; import com.onarandombox.MultiverseCore.utils.TestInstanceCreator; @@ -11,14 +19,6 @@ import org.junit.After; import org.junit.Before; import org.junit.Test; -import java.util.Arrays; - -import static org.junit.Assert.assertTrue; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.never; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; - public class TestWorldPurger { TestInstanceCreator creator; MultiverseCore core; diff --git a/src/old-test/java/com/onarandombox/MultiverseCore/TestWorldStuff.java b/src/old-test/java/com/onarandombox/MultiverseCore/TestWorldStuff.java index 0c3372fc..04367c04 100644 --- a/src/old-test/java/com/onarandombox/MultiverseCore/TestWorldStuff.java +++ b/src/old-test/java/com/onarandombox/MultiverseCore/TestWorldStuff.java @@ -7,34 +7,25 @@ package com.onarandombox.MultiverseCore; -import com.onarandombox.MultiverseCore.api.MVWorld; -import com.onarandombox.MultiverseCore.exceptions.PropertyDoesNotExistException; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; + +import java.io.File; + import com.onarandombox.MultiverseCore.utils.MockWorldFactory; import com.onarandombox.MultiverseCore.utils.TestInstanceCreator; -import com.onarandombox.MultiverseCore.utils.WorldCreatorMatcher; import org.bukkit.ChatColor; -import org.bukkit.GameMode; import org.bukkit.Server; -import org.bukkit.WorldCreator; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.plugin.Plugin; import org.junit.After; import org.junit.Before; import org.junit.Test; -import org.mockito.ArgumentMatchers; -import org.mockito.internal.verification.VerificationModeFactory; - -import java.io.File; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.times; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; public class TestWorldStuff { diff --git a/src/old-test/java/com/onarandombox/MultiverseCore/utils/FileUtilsTest.java b/src/old-test/java/com/onarandombox/MultiverseCore/utils/FileUtilsTest.java index 84e705ae..e125d882 100644 --- a/src/old-test/java/com/onarandombox/MultiverseCore/utils/FileUtilsTest.java +++ b/src/old-test/java/com/onarandombox/MultiverseCore/utils/FileUtilsTest.java @@ -1,9 +1,7 @@ package com.onarandombox.MultiverseCore.utils; -import com.onarandombox.MultiverseCore.utils.file.FileUtils; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; import java.io.IOException; import java.nio.file.Files; @@ -12,8 +10,10 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; +import com.onarandombox.MultiverseCore.utils.file.FileUtils; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; public class FileUtilsTest { diff --git a/src/old-test/java/com/onarandombox/MultiverseCore/utils/MockWorldFactory.java b/src/old-test/java/com/onarandombox/MultiverseCore/utils/MockWorldFactory.java index aecf9697..60d6ff76 100644 --- a/src/old-test/java/com/onarandombox/MultiverseCore/utils/MockWorldFactory.java +++ b/src/old-test/java/com/onarandombox/MultiverseCore/utils/MockWorldFactory.java @@ -7,15 +7,11 @@ package com.onarandombox.MultiverseCore.utils; -import org.bukkit.Difficulty; -import org.bukkit.Location; -import org.bukkit.Material; -import org.bukkit.World; -import org.bukkit.WorldType; -import org.bukkit.block.Block; -import org.bukkit.generator.ChunkGenerator; -import org.mockito.invocation.InvocationOnMock; -import org.mockito.stubbing.Answer; +import static org.mockito.Mockito.any; +import static org.mockito.Mockito.anyBoolean; +import static org.mockito.Mockito.doAnswer; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; import java.io.File; import java.io.IOException; @@ -27,11 +23,15 @@ import java.util.Map; import java.util.UUID; import java.util.WeakHashMap; -import static org.mockito.Mockito.any; -import static org.mockito.Mockito.anyBoolean; -import static org.mockito.Mockito.doAnswer; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; +import org.bukkit.Difficulty; +import org.bukkit.Location; +import org.bukkit.Material; +import org.bukkit.World; +import org.bukkit.WorldType; +import org.bukkit.block.Block; +import org.bukkit.generator.ChunkGenerator; +import org.mockito.invocation.InvocationOnMock; +import org.mockito.stubbing.Answer; public class MockWorldFactory { diff --git a/src/old-test/java/com/onarandombox/MultiverseCore/utils/TestInstanceCreator.java b/src/old-test/java/com/onarandombox/MultiverseCore/utils/TestInstanceCreator.java index 55110a51..cd135da1 100644 --- a/src/old-test/java/com/onarandombox/MultiverseCore/utils/TestInstanceCreator.java +++ b/src/old-test/java/com/onarandombox/MultiverseCore/utils/TestInstanceCreator.java @@ -7,6 +7,18 @@ package com.onarandombox.MultiverseCore.utils; +import static org.junit.Assert.assertTrue; +import static org.mockito.Mockito.any; +import static org.mockito.Mockito.anyBoolean; +import static org.mockito.Mockito.anyLong; +import static org.mockito.Mockito.anyString; +import static org.mockito.Mockito.doAnswer; +import static org.mockito.Mockito.doReturn; +import static org.mockito.Mockito.isA; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.spy; +import static org.mockito.Mockito.when; + import java.io.File; import java.lang.reflect.Field; import java.util.ArrayList; @@ -16,12 +28,7 @@ import java.util.logging.Level; import java.util.logging.Logger; import com.onarandombox.MultiverseCore.MultiverseCore; -import com.onarandombox.MultiverseCore.api.MVWorld; -import com.onarandombox.MultiverseCore.listeners.MVEntityListener; -import com.onarandombox.MultiverseCore.listeners.MVPlayerListener; -import com.onarandombox.MultiverseCore.listeners.MVWeatherListener; import com.onarandombox.MultiverseCore.utils.file.FileUtils; -import com.onarandombox.MultiverseCore.world.SimpleMVWorldManager; import junit.framework.Assert; import org.bukkit.Bukkit; import org.bukkit.ChatColor; @@ -40,18 +47,6 @@ import org.mockito.internal.util.reflection.ReflectionMemberAccessor; import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; -import static org.junit.Assert.assertTrue; -import static org.mockito.Mockito.any; -import static org.mockito.Mockito.anyBoolean; -import static org.mockito.Mockito.anyLong; -import static org.mockito.Mockito.anyString; -import static org.mockito.Mockito.doAnswer; -import static org.mockito.Mockito.doReturn; -import static org.mockito.Mockito.isA; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.spy; -import static org.mockito.Mockito.when; - public class TestInstanceCreator { private MultiverseCore core; private Server mockServer; diff --git a/src/old-test/java/com/onarandombox/MultiverseCore/utils/Util.java b/src/old-test/java/com/onarandombox/MultiverseCore/utils/Util.java index 974720d0..dd00e021 100644 --- a/src/old-test/java/com/onarandombox/MultiverseCore/utils/Util.java +++ b/src/old-test/java/com/onarandombox/MultiverseCore/utils/Util.java @@ -10,8 +10,8 @@ package com.onarandombox.MultiverseCore.utils; import java.util.logging.ConsoleHandler; import java.util.logging.Handler; import java.util.logging.Level; -import java.util.logging.Logger; import java.util.logging.LogRecord; +import java.util.logging.Logger; public class Util { private Util() {} diff --git a/src/test/java/org/mvplugins/multiverse/core/commandtools/LocalizationTest.kt b/src/test/java/org/mvplugins/multiverse/core/commandtools/LocalizationTest.kt index f2a38114..f466c14c 100644 --- a/src/test/java/org/mvplugins/multiverse/core/commandtools/LocalizationTest.kt +++ b/src/test/java/org/mvplugins/multiverse/core/commandtools/LocalizationTest.kt @@ -17,11 +17,7 @@ import org.mockito.kotlin.argumentCaptor import org.mockito.kotlin.spy import org.mockito.kotlin.verify import org.mvplugins.multiverse.core.TestWithMockBukkit -import kotlin.test.BeforeTest -import kotlin.test.Test -import kotlin.test.assertEquals -import kotlin.test.assertNotEquals -import kotlin.test.assertNotNull +import kotlin.test.* class LocalizationTest : TestWithMockBukkit() { diff --git a/src/test/java/org/mvplugins/multiverse/core/config/ConfigTest.kt b/src/test/java/org/mvplugins/multiverse/core/config/ConfigTest.kt index 32d0d4b4..55f1f5a8 100644 --- a/src/test/java/org/mvplugins/multiverse/core/config/ConfigTest.kt +++ b/src/test/java/org/mvplugins/multiverse/core/config/ConfigTest.kt @@ -5,13 +5,7 @@ import org.mvplugins.multiverse.core.TestWithMockBukkit import java.io.File import java.nio.file.Path import kotlin.io.path.absolutePathString -import kotlin.test.BeforeTest -import kotlin.test.Test -import kotlin.test.assertEquals -import kotlin.test.assertFalse -import kotlin.test.assertNotNull -import kotlin.test.assertNull -import kotlin.test.assertTrue +import kotlin.test.* class ConfigTest : TestWithMockBukkit() { diff --git a/src/test/java/org/mvplugins/multiverse/core/inject/InjectionTest.kt b/src/test/java/org/mvplugins/multiverse/core/inject/InjectionTest.kt index 303b8ecb..bbe27068 100644 --- a/src/test/java/org/mvplugins/multiverse/core/inject/InjectionTest.kt +++ b/src/test/java/org/mvplugins/multiverse/core/inject/InjectionTest.kt @@ -10,12 +10,7 @@ import com.onarandombox.MultiverseCore.commandtools.MultiverseCommand import com.onarandombox.MultiverseCore.commandtools.PluginLocales import com.onarandombox.MultiverseCore.config.MVCoreConfig import com.onarandombox.MultiverseCore.economy.MVEconomist -import com.onarandombox.MultiverseCore.listeners.MVChatListener -import com.onarandombox.MultiverseCore.listeners.MVEntityListener -import com.onarandombox.MultiverseCore.listeners.MVPlayerListener -import com.onarandombox.MultiverseCore.listeners.MVPortalListener -import com.onarandombox.MultiverseCore.listeners.MVWeatherListener -import com.onarandombox.MultiverseCore.listeners.MVWorldListener +import com.onarandombox.MultiverseCore.listeners.* import com.onarandombox.MultiverseCore.teleportation.SimpleBlockSafety import com.onarandombox.MultiverseCore.teleportation.SimpleLocationManipulation import com.onarandombox.MultiverseCore.teleportation.SimpleSafeTTeleporter @@ -24,11 +19,7 @@ import com.onarandombox.MultiverseCore.utils.UnsafeCallWrapper import com.onarandombox.MultiverseCore.utils.metrics.MetricsConfigurator import com.onarandombox.MultiverseCore.worldnew.WorldManager import org.mvplugins.multiverse.core.TestWithMockBukkit -import kotlin.test.Ignore -import kotlin.test.Test -import kotlin.test.assertEquals -import kotlin.test.assertNotNull -import kotlin.test.assertNull +import kotlin.test.* class InjectionTest : TestWithMockBukkit() { diff --git a/src/test/java/org/mvplugins/multiverse/core/world/WorldConfigTest.kt b/src/test/java/org/mvplugins/multiverse/core/world/WorldConfigTest.kt index 44e41b3b..0cde8102 100644 --- a/src/test/java/org/mvplugins/multiverse/core/world/WorldConfigTest.kt +++ b/src/test/java/org/mvplugins/multiverse/core/world/WorldConfigTest.kt @@ -2,17 +2,11 @@ package org.mvplugins.multiverse.core.world import com.onarandombox.MultiverseCore.worldnew.config.WorldConfig import com.onarandombox.MultiverseCore.worldnew.config.WorldsConfigManager -import org.bukkit.Location -import org.junit.jupiter.api.Assertions import org.mvplugins.multiverse.core.TestWithMockBukkit import java.io.File import java.nio.file.Path import kotlin.io.path.absolutePathString -import kotlin.test.BeforeTest -import kotlin.test.Test -import kotlin.test.assertEquals -import kotlin.test.assertNotNull -import kotlin.test.assertTrue +import kotlin.test.* class WorldConfigTest : TestWithMockBukkit() { diff --git a/src/test/java/org/mvplugins/multiverse/core/world/WorldManagerTest.kt b/src/test/java/org/mvplugins/multiverse/core/world/WorldManagerTest.kt index 19237c50..6ef0d3f7 100644 --- a/src/test/java/org/mvplugins/multiverse/core/world/WorldManagerTest.kt +++ b/src/test/java/org/mvplugins/multiverse/core/world/WorldManagerTest.kt @@ -6,11 +6,7 @@ import com.onarandombox.MultiverseCore.worldnew.options.CreateWorldOptions import org.bukkit.World import org.bukkit.WorldType import org.mvplugins.multiverse.core.TestWithMockBukkit -import kotlin.test.BeforeTest -import kotlin.test.Test -import kotlin.test.assertEquals -import kotlin.test.assertFalse -import kotlin.test.assertNotNull +import kotlin.test.* class WorldManagerTest : TestWithMockBukkit() { From e31ef1428cb59c86ba234520dd39cc51ff321fee Mon Sep 17 00:00:00 2001 From: Ben Woo <30431861+benwoo1110@users.noreply.github.com> Date: Tue, 12 Sep 2023 00:43:46 +0800 Subject: [PATCH 2/2] Fix import order checkstyle and remove comment --- config/mv_checks.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/config/mv_checks.xml b/config/mv_checks.xml index ca3916ba..966d1e49 100644 --- a/config/mv_checks.xml +++ b/config/mv_checks.xml @@ -226,8 +226,7 @@