Optimise all imports

This commit is contained in:
Ben Woo 2023-09-12 00:41:17 +08:00
parent 9dbe7e20ad
commit 256ac67cf1
No known key found for this signature in database
GPG Key ID: FB2A3645536E12C8
125 changed files with 493 additions and 546 deletions

View File

@ -226,8 +226,8 @@
<property name="sortImportsInGroupAlphabetically" value="true"/>
<property name="separateLineBetweenGroups" value="true"/>
<property name="customImportOrderRules"
value="THIRD_PARTY_PACKAGE###STANDARD_JAVA_PACKAGE###STATIC"/>
<!-- value="SAME_PACKAGE(3)###THIRD_PARTY_PACKAGE###STANDARD_JAVA_PACKAGE###STATIC"/>-->
value="STANDARD_JAVA###THIRD_PARTY_PACKAGE###STATIC"/>
<!-- value="SAME_PACKAGE(3)###THIRD_PARTY_PACKAGE###STANDARD_JAVA_PACKAGE###STATIC"/>-->
<property name="tokens" value="IMPORT, STATIC_IMPORT, PACKAGE_DEF"/>
</module>
<module name="IllegalImport">

View File

@ -7,6 +7,12 @@
package com.onarandombox.MultiverseCore;
import java.io.File;
import java.lang.annotation.Annotation;
import java.util.List;
import java.util.logging.Logger;
import java.util.stream.Collectors;
import com.dumptruckman.minecraft.util.Logging;
import com.onarandombox.MultiverseCore.anchor.AnchorManager;
import com.onarandombox.MultiverseCore.api.Destination;
@ -41,12 +47,6 @@ import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jvnet.hk2.annotations.Service;
import java.io.File;
import java.lang.annotation.Annotation;
import java.util.List;
import java.util.logging.Logger;
import java.util.stream.Collectors;
/**
* The implementation of the Multiverse-{@link MVCore}.
*/

View File

@ -7,6 +7,14 @@
package com.onarandombox.MultiverseCore.anchor;
import java.io.File;
import java.io.IOException;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import com.dumptruckman.minecraft.util.Logging;
import com.onarandombox.MultiverseCore.MultiverseCore;
import com.onarandombox.MultiverseCore.api.LocationManipulation;
@ -20,14 +28,6 @@ import org.bukkit.entity.Player;
import org.bukkit.plugin.Plugin;
import org.jvnet.hk2.annotations.Service;
import java.io.File;
import java.io.IOException;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
/**
* Manages anchors.
*/

View File

@ -1,12 +1,12 @@
package com.onarandombox.MultiverseCore.api;
import java.util.Collection;
import co.aikar.commands.BukkitCommandIssuer;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jvnet.hk2.annotations.Contract;
import java.util.Collection;
@Contract
public interface Destination<T extends DestinationInstance> {
/**

View File

@ -7,6 +7,8 @@
package com.onarandombox.MultiverseCore.api;
import java.util.List;
import com.onarandombox.MultiverseCore.exceptions.PropertyDoesNotExistException;
import com.onarandombox.MultiverseCore.world.configuration.AddProperties;
import com.onarandombox.MultiverseCore.world.configuration.AllowedPortalType;
@ -21,8 +23,6 @@ import org.bukkit.WorldType;
import org.bukkit.permissions.Permission;
import org.jetbrains.annotations.Nullable;
import java.util.List;
/**
* The API for a Multiverse Handled World.
*/

View File

@ -7,6 +7,9 @@
package com.onarandombox.MultiverseCore.api;
import java.util.Collection;
import java.util.List;
import org.bukkit.World;
import org.bukkit.World.Environment;
import org.bukkit.WorldType;
@ -14,9 +17,6 @@ import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.generator.ChunkGenerator;
import org.jvnet.hk2.annotations.Contract;
import java.util.Collection;
import java.util.List;
/**
* Multiverse 2 World Manager API
* <p>

View File

@ -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.
*/

View File

@ -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 {
/**

View File

@ -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.
*/

View File

@ -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 {

View File

@ -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 {

View File

@ -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.
*/

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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.
*/

View File

@ -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.
*/

View File

@ -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.
*/

View File

@ -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.
*/

View File

@ -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.
*

View File

@ -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.
*/

View File

@ -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;
/**
* <p>Manages the queuing of dangerous commands that require {@code /mv confirm} before executing.</p>
*

View File

@ -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.
*/

View File

@ -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";

View File

@ -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.
*/

View File

@ -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.
*/

View File

@ -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.
* @param <C> The configuration type.

View File

@ -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.ConfigNodeNotFoundException;
import com.onarandombox.MultiverseCore.configuration.node.NodeGroup;
@ -10,8 +12,6 @@ import org.bukkit.plugin.Plugin;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.logging.Logger;
/**
* Generic configuration handle for all ConfigurationSection types.
*/

View File

@ -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.onarandombox.MultiverseCore.configuration.migration.ConfigMigrator;
import com.onarandombox.MultiverseCore.configuration.node.NodeGroup;
import io.vavr.control.Try;
@ -8,10 +12,6 @@ import org.bukkit.configuration.file.YamlConfiguration;
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 YAML files.
*/

View File

@ -1,12 +1,12 @@
package com.onarandombox.MultiverseCore.configuration.migration;
import java.util.ArrayList;
import java.util.List;
import com.dumptruckman.minecraft.util.Logging;
import com.onarandombox.MultiverseCore.configuration.node.ValueNode;
import org.bukkit.configuration.ConfigurationSection;
import java.util.ArrayList;
import java.util.List;
/**
* Helper class for migrating configs to the latest config version.
*/

View File

@ -1,10 +1,10 @@
package com.onarandombox.MultiverseCore.configuration.migration;
import java.util.Optional;
import com.dumptruckman.minecraft.util.Logging;
import org.bukkit.configuration.ConfigurationSection;
import java.util.Optional;
/**
* Single migrator action that moves a value from one path to another.
*/

View File

@ -1,10 +1,10 @@
package com.onarandombox.MultiverseCore.configuration.migration;
import org.bukkit.configuration.ConfigurationSection;
import java.util.ArrayList;
import java.util.List;
import org.bukkit.configuration.ConfigurationSection;
/**
* A version migrator is a collection of migrator actions that are performed when migrating a config to a specific version.
*/

View File

@ -1,11 +1,11 @@
package com.onarandombox.MultiverseCore.configuration.node;
import com.google.common.base.Strings;
import org.jetbrains.annotations.NotNull;
import java.util.ArrayList;
import java.util.List;
import com.google.common.base.Strings;
import org.jetbrains.annotations.NotNull;
/**
* A node that represents a header without any value.
*/

View File

@ -1,13 +1,13 @@
package com.onarandombox.MultiverseCore.configuration.node;
import java.util.function.BiConsumer;
import java.util.function.Function;
import io.vavr.control.Option;
import io.vavr.control.Try;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.function.BiConsumer;
import java.util.function.Function;
/**
* A node that contains a value.
* @param <T> The type of the value.

View File

@ -1,11 +1,11 @@
package com.onarandombox.MultiverseCore.configuration.node;
import com.onarandombox.MultiverseCore.exceptions.MultiverseException;
import org.jetbrains.annotations.Nullable;
import static com.onarandombox.MultiverseCore.utils.MVCorei18n.CONFIG_NODE_NOTFOUND;
import static com.onarandombox.MultiverseCore.utils.message.MessageReplacement.replace;
import com.onarandombox.MultiverseCore.exceptions.MultiverseException;
import org.jetbrains.annotations.Nullable;
public class ConfigNodeNotFoundException extends MultiverseException {
public ConfigNodeNotFoundException(@Nullable String nodeName) {

View File

@ -1,15 +1,15 @@
package com.onarandombox.MultiverseCore.configuration.node;
import io.github.townyadvanced.commentedconfiguration.setting.CommentedNode;
import io.vavr.control.Option;
import org.jetbrains.annotations.NotNull;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import io.github.townyadvanced.commentedconfiguration.setting.CommentedNode;
import io.vavr.control.Option;
import org.jetbrains.annotations.NotNull;
/**
* A collection of {@link CommentedNode}s, with mappings to nodes by name.
*/

View File

@ -1,5 +1,11 @@
package com.onarandombox.MultiverseCore.destination;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.CompletableFuture;
import java.util.stream.Collectors;
import co.aikar.commands.BukkitCommandIssuer;
import co.aikar.commands.CommandIssuer;
import com.onarandombox.MultiverseCore.api.Destination;
@ -16,12 +22,6 @@ import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jvnet.hk2.annotations.Service;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.CompletableFuture;
import java.util.stream.Collectors;
/**
* Provides destinations for teleportation.
*/

View File

@ -1,5 +1,7 @@
package com.onarandombox.MultiverseCore.destination.core;
import java.util.Collection;
import co.aikar.commands.BukkitCommandIssuer;
import com.onarandombox.MultiverseCore.anchor.AnchorManager;
import com.onarandombox.MultiverseCore.api.Destination;
@ -10,8 +12,6 @@ import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jvnet.hk2.annotations.Service;
import java.util.Collection;
/**
* {@link Destination} implementation for anchors.
*/

View File

@ -1,5 +1,9 @@
package com.onarandombox.MultiverseCore.destination.core;
import java.util.Collection;
import java.util.List;
import java.util.stream.Collectors;
import co.aikar.commands.BukkitCommandIssuer;
import com.onarandombox.MultiverseCore.api.Destination;
import com.onarandombox.MultiverseCore.api.Teleporter;
@ -10,10 +14,6 @@ import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jvnet.hk2.annotations.Service;
import java.util.Collection;
import java.util.List;
import java.util.stream.Collectors;
/**
* {@link Destination} implementation for beds.
*/

View File

@ -1,5 +1,8 @@
package com.onarandombox.MultiverseCore.destination.core;
import java.util.Collection;
import java.util.Collections;
import co.aikar.commands.BukkitCommandIssuer;
import com.onarandombox.MultiverseCore.api.Destination;
import com.onarandombox.MultiverseCore.api.Teleporter;
@ -12,9 +15,6 @@ import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jvnet.hk2.annotations.Service;
import java.util.Collection;
import java.util.Collections;
/**
* {@link Destination} implementation for cannons.
*/

View File

@ -1,5 +1,8 @@
package com.onarandombox.MultiverseCore.destination.core;
import java.util.Collection;
import java.util.Collections;
import co.aikar.commands.BukkitCommandIssuer;
import com.onarandombox.MultiverseCore.api.Destination;
import com.onarandombox.MultiverseCore.api.Teleporter;
@ -12,9 +15,6 @@ import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jvnet.hk2.annotations.Service;
import java.util.Collection;
import java.util.Collections;
/**
* {@link Destination} implementation for exact locations.
*/

View File

@ -1,5 +1,8 @@
package com.onarandombox.MultiverseCore.destination.core;
import java.util.Collection;
import java.util.stream.Collectors;
import co.aikar.commands.BukkitCommandIssuer;
import com.onarandombox.MultiverseCore.api.Destination;
import com.onarandombox.MultiverseCore.api.Teleporter;
@ -10,9 +13,6 @@ import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jvnet.hk2.annotations.Service;
import java.util.Collection;
import java.util.stream.Collectors;
/**
* {@link Destination} implementation for players.s
*/

View File

@ -1,5 +1,8 @@
package com.onarandombox.MultiverseCore.destination.core;
import java.util.Collection;
import java.util.Collections;
import co.aikar.commands.BukkitCommandIssuer;
import com.onarandombox.MultiverseCore.api.Destination;
import com.onarandombox.MultiverseCore.api.LocationManipulation;
@ -11,9 +14,6 @@ import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jvnet.hk2.annotations.Service;
import java.util.Collection;
import java.util.Collections;
/**
* {@link Destination} implementation for exact locations.
*/

View File

@ -1,15 +1,15 @@
package com.onarandombox.MultiverseCore.display;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import co.aikar.commands.BukkitCommandIssuer;
import com.onarandombox.MultiverseCore.display.handlers.DefaultSendHandler;
import com.onarandombox.MultiverseCore.display.handlers.SendHandler;
import com.onarandombox.MultiverseCore.display.parsers.ContentProvider;
import org.jetbrains.annotations.NotNull;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
/**
* Helps to display contents such as list and maps in a nicely formatted fashion.
*/

View File

@ -1,14 +1,14 @@
package com.onarandombox.MultiverseCore.display.filters;
import java.util.regex.Pattern;
import java.util.regex.PatternSyntaxException;
import com.dumptruckman.minecraft.util.Logging;
import com.google.common.base.Strings;
import org.bukkit.ChatColor;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.regex.Pattern;
import java.util.regex.PatternSyntaxException;
/**
* Filter content and text based on regex matching.
*/

View File

@ -1,5 +1,8 @@
package com.onarandombox.MultiverseCore.display.handlers;
import java.util.List;
import java.util.stream.Collectors;
import co.aikar.commands.BukkitCommandIssuer;
import com.google.common.base.Strings;
import com.onarandombox.MultiverseCore.display.filters.ContentFilter;
@ -8,9 +11,6 @@ import org.bukkit.ChatColor;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.List;
import java.util.stream.Collectors;
/**
* Base implementation of {@link SendHandler} with some common parameters.
*

View File

@ -1,10 +1,10 @@
package com.onarandombox.MultiverseCore.display.handlers;
import java.util.List;
import co.aikar.commands.BukkitCommandIssuer;
import org.jetbrains.annotations.NotNull;
import java.util.List;
/**
* Most basic implementation of {@link SendHandler} that just sends content with no formatting.
*/

View File

@ -1,11 +1,11 @@
package com.onarandombox.MultiverseCore.display.handlers;
import java.util.List;
import co.aikar.commands.BukkitCommandIssuer;
import org.bukkit.ChatColor;
import org.jetbrains.annotations.NotNull;
import java.util.List;
/**
* Display the contents in a single line.
*/

View File

@ -1,12 +1,12 @@
package com.onarandombox.MultiverseCore.display.handlers;
import java.util.List;
import co.aikar.commands.BukkitCommandIssuer;
import org.bukkit.ChatColor;
import org.bukkit.command.ConsoleCommandSender;
import org.jetbrains.annotations.NotNull;
import java.util.List;
/**
* Display content as a list with optional pagination.
*/

View File

@ -1,10 +1,10 @@
package com.onarandombox.MultiverseCore.display.handlers;
import java.util.List;
import co.aikar.commands.BukkitCommandIssuer;
import org.jetbrains.annotations.NotNull;
import java.util.List;
/**
* Handles the sending of all content to the command sender.
*/

View File

@ -1,10 +1,10 @@
package com.onarandombox.MultiverseCore.display.parsers;
import java.util.Collection;
import co.aikar.commands.BukkitCommandIssuer;
import org.jetbrains.annotations.NotNull;
import java.util.Collection;
/**
* Parse objects into string or list of strings.
*/

View File

@ -1,12 +1,12 @@
package com.onarandombox.MultiverseCore.display.parsers;
import co.aikar.commands.BukkitCommandIssuer;
import org.jetbrains.annotations.NotNull;
import java.util.Collection;
import java.util.List;
import java.util.stream.Collectors;
import co.aikar.commands.BukkitCommandIssuer;
import org.jetbrains.annotations.NotNull;
/**
* Simple parser for list object.
*

View File

@ -1,13 +1,13 @@
package com.onarandombox.MultiverseCore.display.parsers;
import co.aikar.commands.BukkitCommandIssuer;
import org.bukkit.ChatColor;
import org.jetbrains.annotations.NotNull;
import java.util.Collection;
import java.util.Map;
import java.util.stream.Collectors;
import co.aikar.commands.BukkitCommandIssuer;
import org.bukkit.ChatColor;
import org.jetbrains.annotations.NotNull;
/**
* Simple parser for map object.
*

View File

@ -1,12 +1,12 @@
package com.onarandombox.MultiverseCore.economy;
import java.util.HashMap;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import java.util.HashMap;
// TODO: Make thsi no static
class ItemEconomy {

View File

@ -7,11 +7,11 @@
package com.onarandombox.MultiverseCore.event;
import java.util.List;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
import java.util.List;
/**
* Called when the Multiverse-config should be reloaded.
*/

View File

@ -1,9 +1,5 @@
package com.onarandombox.MultiverseCore.event;
import com.dumptruckman.minecraft.util.Logging;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
@ -13,6 +9,10 @@ import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import com.dumptruckman.minecraft.util.Logging;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
/**
* Called when somebody requests version information about Multiverse.
*/

View File

@ -1,12 +1,12 @@
package com.onarandombox.MultiverseCore.inject.binder;
import java.util.logging.Logger;
import org.bukkit.plugin.Plugin;
import org.glassfish.hk2.utilities.binding.AbstractBinder;
import org.glassfish.hk2.utilities.binding.ScopedBindingBuilder;
import org.jetbrains.annotations.NotNull;
import java.util.logging.Logger;
/**
* The base class for all plugin binders. Initiates the binding of the plugin instance and initially binds it to the
* {@link Plugin} interface.

View File

@ -7,6 +7,10 @@
package com.onarandombox.MultiverseCore.listeners;
import java.util.Map;
import java.util.Optional;
import java.util.concurrent.ConcurrentHashMap;
import com.dumptruckman.minecraft.util.Logging;
import com.onarandombox.MultiverseCore.MultiverseCore;
import com.onarandombox.MultiverseCore.api.SafeTTeleporter;
@ -44,10 +48,6 @@ import org.bukkit.event.player.PlayerTeleportEvent;
import org.bukkit.plugin.Plugin;
import org.jvnet.hk2.annotations.Service;
import java.util.Map;
import java.util.Optional;
import java.util.concurrent.ConcurrentHashMap;
/**
* Multiverse's Listener for players.
*/

View File

@ -7,6 +7,10 @@
package com.onarandombox.MultiverseCore.teleportation;
import java.util.EnumSet;
import java.util.Iterator;
import java.util.Set;
import com.dumptruckman.minecraft.util.Logging;
import com.onarandombox.MultiverseCore.api.BlockSafety;
import com.onarandombox.MultiverseCore.api.LocationManipulation;
@ -21,10 +25,6 @@ import org.bukkit.entity.Minecart;
import org.bukkit.entity.Vehicle;
import org.jvnet.hk2.annotations.Service;
import java.util.EnumSet;
import java.util.Iterator;
import java.util.Set;
/**
* The default-implementation of {@link BlockSafety}.
*/

View File

@ -7,6 +7,12 @@
package com.onarandombox.MultiverseCore.teleportation;
import java.text.DecimalFormat;
import java.util.Collections;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import com.onarandombox.MultiverseCore.api.LocationManipulation;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
@ -16,12 +22,6 @@ import org.bukkit.entity.Vehicle;
import org.bukkit.util.Vector;
import org.jvnet.hk2.annotations.Service;
import java.text.DecimalFormat;
import java.util.Collections;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
/**
* The default-implementation of {@link LocationManipulation}.
*/

View File

@ -7,6 +7,8 @@
package com.onarandombox.MultiverseCore.teleportation;
import java.util.concurrent.CompletableFuture;
import co.aikar.commands.BukkitCommandIssuer;
import com.dumptruckman.minecraft.util.Logging;
import com.onarandombox.MultiverseCore.MultiverseCore;
@ -30,8 +32,6 @@ import org.bukkit.entity.Vehicle;
import org.bukkit.util.Vector;
import org.jvnet.hk2.annotations.Service;
import java.util.concurrent.CompletableFuture;
/**
* The default-implementation of {@link SafeTTeleporter}.
*/

View File

@ -1,12 +1,12 @@
package com.onarandombox.MultiverseCore.teleportation;
import com.dumptruckman.minecraft.util.Logging;
import org.jvnet.hk2.annotations.Service;
import java.util.HashMap;
import java.util.Map;
import java.util.Optional;
import com.dumptruckman.minecraft.util.Logging;
import org.jvnet.hk2.annotations.Service;
@Service
public class TeleportQueue {

View File

@ -1,5 +1,11 @@
package com.onarandombox.MultiverseCore.utils;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
import com.dumptruckman.minecraft.util.Logging;
import com.google.common.base.Strings;
import org.bukkit.Bukkit;
@ -8,12 +14,6 @@ import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
/**
* Helper class to get {@link Player} from name, UUID or Selectors.
*/

View File

@ -1,10 +1,10 @@
package com.onarandombox.MultiverseCore.utils;
import org.jetbrains.annotations.Nullable;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import org.jetbrains.annotations.Nullable;
/**
* Utility class used to help in doing various reflection actions.
*/

View File

@ -1,12 +1,12 @@
package com.onarandombox.MultiverseCore.utils;
import java.util.concurrent.Callable;
import com.dumptruckman.minecraft.util.Logging;
import com.onarandombox.MultiverseCore.config.MVCoreConfig;
import jakarta.inject.Inject;
import org.jvnet.hk2.annotations.Service;
import java.util.concurrent.Callable;
/**
* Wraps calls that could result in exceptions that are not Multiverse's fault.
*/

View File

@ -1,7 +1,5 @@
package com.onarandombox.MultiverseCore.utils.file;
import org.bukkit.plugin.Plugin;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
@ -9,6 +7,8 @@ import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import org.bukkit.plugin.Plugin;
/**
* A class loader that loads resources from the plugin's locales folder.
*/

View File

@ -7,8 +7,8 @@
package com.onarandombox.MultiverseCore.utils.file;
import com.dumptruckman.minecraft.util.Logging;
import org.jetbrains.annotations.Nullable;
import static java.nio.file.StandardCopyOption.COPY_ATTRIBUTES;
import static org.bukkit.Bukkit.getServer;
import java.io.File;
import java.io.IOException;
@ -21,8 +21,8 @@ import java.util.Comparator;
import java.util.List;
import java.util.stream.Stream;
import static java.nio.file.StandardCopyOption.COPY_ATTRIBUTES;
import static org.bukkit.Bukkit.getServer;
import com.dumptruckman.minecraft.util.Logging;
import org.jetbrains.annotations.Nullable;
/**
* File-utilities.

View File

@ -1,5 +1,7 @@
package com.onarandombox.MultiverseCore.utils.message;
import java.util.Objects;
import co.aikar.commands.ACFUtil;
import co.aikar.commands.CommandIssuer;
import co.aikar.locales.MessageKey;
@ -8,8 +10,6 @@ import com.onarandombox.MultiverseCore.commandtools.PluginLocales;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.Objects;
final class LocalizedMessage extends Message implements MessageKeyProvider {
private final @NotNull MessageKeyProvider messageKeyProvider;

View File

@ -1,5 +1,7 @@
package com.onarandombox.MultiverseCore.utils.message;
import java.util.Objects;
import co.aikar.commands.ACFUtil;
import co.aikar.commands.CommandIssuer;
import co.aikar.locales.MessageKeyProvider;
@ -8,8 +10,6 @@ import org.jetbrains.annotations.Contract;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.Objects;
/**
* A message that can be formatted with replacements and localized.
*/

View File

@ -1,5 +1,8 @@
package com.onarandombox.MultiverseCore.utils.metrics;
import java.util.Map;
import java.util.function.Consumer;
import com.dumptruckman.minecraft.util.Logging;
import com.onarandombox.MultiverseCore.MultiverseCore;
import com.onarandombox.MultiverseCore.worldnew.LoadedMultiverseWorld;
@ -11,9 +14,6 @@ import org.bstats.bukkit.Metrics;
import org.bukkit.World;
import org.jvnet.hk2.annotations.Service;
import java.util.Map;
import java.util.function.Consumer;
@Service
public class MetricsConfigurator {

View File

@ -1,12 +1,12 @@
package com.onarandombox.MultiverseCore.utils.metrics;
import org.bstats.charts.AdvancedPie;
import org.bstats.charts.MultiLineChart;
import java.util.HashMap;
import java.util.Map;
import java.util.function.Consumer;
import org.bstats.charts.AdvancedPie;
import org.bstats.charts.MultiLineChart;
enum MetricsHelper {
;

View File

@ -1,12 +1,12 @@
package com.onarandombox.MultiverseCore.utils.result;
import com.onarandombox.MultiverseCore.utils.message.Message;
import com.onarandombox.MultiverseCore.utils.message.MessageReplacement;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.function.Supplier;
import com.onarandombox.MultiverseCore.utils.message.Message;
import com.onarandombox.MultiverseCore.utils.message.MessageReplacement;
/**
* Represents an attempt to process a value that can fail with a reason that has a localized message.
*

View File

@ -1,12 +1,12 @@
package com.onarandombox.MultiverseCore.utils.result;
import java.util.function.Consumer;
import java.util.function.Function;
import com.onarandombox.MultiverseCore.utils.message.Message;
import com.onarandombox.MultiverseCore.utils.message.MessageReplacement;
import org.jetbrains.annotations.NotNull;
import java.util.function.Consumer;
import java.util.function.Function;
/**
* Represents result of an operation with a reason for success or failure that has localized messages.
*

View File

@ -1,9 +1,5 @@
package com.onarandombox.MultiverseCore.utils.result;
import com.google.common.collect.Iterables;
import com.onarandombox.MultiverseCore.utils.message.Message;
import io.vavr.control.Option;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
@ -11,6 +7,10 @@ import java.util.function.Consumer;
import java.util.function.Supplier;
import java.util.stream.Collectors;
import com.google.common.collect.Iterables;
import com.onarandombox.MultiverseCore.utils.message.Message;
import io.vavr.control.Option;
public class ResultChain {
public static Builder builder() {
return new Builder(true);

View File

@ -1,12 +1,12 @@
package com.onarandombox.MultiverseCore.utils.webpaste;
import java.io.IOException;
import java.util.Map;
import net.minidev.json.JSONObject;
import net.minidev.json.parser.JSONParser;
import net.minidev.json.parser.ParseException;
import java.io.IOException;
import java.util.Map;
/**
* A {@link URLShortener} using {@code bit.ly}. Requires an access token.
*/

View File

@ -1,13 +1,13 @@
package com.onarandombox.MultiverseCore.utils.webpaste;
import net.minidev.json.JSONObject;
import net.minidev.json.parser.JSONParser;
import net.minidev.json.parser.ParseException;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import net.minidev.json.JSONObject;
import net.minidev.json.parser.JSONParser;
import net.minidev.json.parser.ParseException;
/**
* Pastes to {@code gist.github.com}. Requires an access token with the {@code gist} scope.
*/

View File

@ -1,12 +1,12 @@
package com.onarandombox.MultiverseCore.utils.webpaste;
import java.io.IOException;
import java.util.Map;
import net.minidev.json.JSONObject;
import net.minidev.json.parser.JSONParser;
import net.minidev.json.parser.ParseException;
import java.io.IOException;
import java.util.Map;
public class McloGsPasteService extends PasteService {
private static final String MCLOGS_POST_REQUEST = "https://api.mclo.gs/1/log";

View File

@ -1,14 +1,14 @@
package com.onarandombox.MultiverseCore.utils.webpaste;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import net.minidev.json.JSONArray;
import net.minidev.json.JSONObject;
import net.minidev.json.parser.JSONParser;
import net.minidev.json.parser.ParseException;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
/**
* Pastes to {@code paste.gg}.
*/

View File

@ -1,12 +1,12 @@
package com.onarandombox.MultiverseCore.utils.webpaste;
import java.io.IOException;
import java.util.Map;
import net.minidev.json.JSONObject;
import net.minidev.json.parser.JSONParser;
import net.minidev.json.parser.ParseException;
import java.io.IOException;
import java.util.Map;
/**
* Pastes to {@code hastebin.com}.
*/

View File

@ -7,6 +7,11 @@
package com.onarandombox.MultiverseCore.world;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import com.dumptruckman.minecraft.util.Logging;
import com.onarandombox.MultiverseCore.api.BlockSafety;
import com.onarandombox.MultiverseCore.api.LocationManipulation;
@ -42,11 +47,6 @@ import org.bukkit.permissions.PermissionDefault;
import org.bukkit.util.Vector;
import org.jetbrains.annotations.Nullable;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.UUID;
/**
* The implementation of a Multiverse handled world.
*/

View File

@ -7,6 +7,24 @@
package com.onarandombox.MultiverseCore.world;
import static com.onarandombox.MultiverseCore.utils.file.FileUtils.getBukkitConfig;
import java.io.File;
import java.io.IOException;
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.Random;
import java.util.Set;
import java.util.Stack;
import java.util.concurrent.Callable;
import java.util.concurrent.ConcurrentHashMap;
import java.util.stream.Collectors;
import com.dumptruckman.minecraft.util.Logging;
import com.onarandombox.MultiverseCore.MultiverseCore;
import com.onarandombox.MultiverseCore.api.BlockSafety;
@ -39,24 +57,6 @@ import org.bukkit.permissions.PermissionDefault;
import org.bukkit.plugin.Plugin;
import org.jvnet.hk2.annotations.Service;
import java.io.File;
import java.io.IOException;
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.Random;
import java.util.Set;
import java.util.Stack;
import java.util.concurrent.Callable;
import java.util.concurrent.ConcurrentHashMap;
import java.util.stream.Collectors;
import static com.onarandombox.MultiverseCore.utils.file.FileUtils.getBukkitConfig;
/**
* Public facing API to add/remove Multiverse worlds.
*/

View File

@ -7,6 +7,10 @@
package com.onarandombox.MultiverseCore.world;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import com.dumptruckman.minecraft.util.Logging;
import com.onarandombox.MultiverseCore.api.MVWorld;
import com.onarandombox.MultiverseCore.api.WorldPurger;
@ -25,10 +29,6 @@ import org.bukkit.entity.Slime;
import org.bukkit.entity.Squid;
import org.jvnet.hk2.annotations.Service;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
/**
* Utility class that removes animals from worlds that don't belong there.
*/

View File

@ -1,15 +1,15 @@
package com.onarandombox.MultiverseCore.world;
import org.bukkit.Bukkit;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.io.File;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
import java.util.regex.Pattern;
import org.bukkit.Bukkit;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
* <p>Utility class in helping to check the status of a world name and it's associated world folder.</p>
*

View File

@ -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

View File

@ -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.
*/

View File

@ -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.
*/

View File

@ -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.
*/

View File

@ -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.
*/

View File

@ -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.
*/

View File

@ -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.
*/

View File

@ -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;
/**
* <p>Utility class in helping to check the status of a world name and it's associated world folder.</p>
*

View File

@ -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.

View File

@ -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) {

View File

@ -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.
*/

View File

@ -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}.

View File

@ -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.
*/

View File

@ -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.
*/

Some files were not shown because too many files have changed in this diff Show More