diff --git a/src/main/java/com/onarandombox/MultiverseCore/MultiverseCore.java b/src/main/java/com/onarandombox/MultiverseCore/MultiverseCore.java index a9a17d29..b48729b9 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/MultiverseCore.java +++ b/src/main/java/com/onarandombox/MultiverseCore/MultiverseCore.java @@ -19,7 +19,7 @@ import com.onarandombox.MultiverseCore.api.MultiverseCoreConfig; import com.onarandombox.MultiverseCore.api.MultiverseMessaging; import com.onarandombox.MultiverseCore.api.SafeTTeleporter; import com.onarandombox.MultiverseCore.commandtools.MVCommandManager; -import com.onarandombox.MultiverseCore.commandtools.flags.MVFlags; +import com.onarandombox.MultiverseCore.commandtools.flags.CoreFlags; import com.onarandombox.MultiverseCore.destination.AnchorDestination; import com.onarandombox.MultiverseCore.destination.BedDestination; import com.onarandombox.MultiverseCore.destination.CannonDestination; @@ -220,7 +220,7 @@ public class MultiverseCore extends JavaPlugin implements MVPlugin, Core { this.unsafeCallWrapper = new UnsafeCallWrapper(this); // Setup our static classes CompatibilityLayer.init(); - MVFlags.setCoreInstance(this); + CoreFlags.setCoreInstance(this); } diff --git a/src/main/java/com/onarandombox/MultiverseCore/commands/CreateCommand.java b/src/main/java/com/onarandombox/MultiverseCore/commands/CreateCommand.java index 28aa6eca..953ebca1 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/commands/CreateCommand.java +++ b/src/main/java/com/onarandombox/MultiverseCore/commands/CreateCommand.java @@ -15,11 +15,10 @@ import co.aikar.commands.annotation.Description; import co.aikar.commands.annotation.Flags; import co.aikar.commands.annotation.Subcommand; import co.aikar.commands.annotation.Syntax; -import com.dumptruckman.minecraft.util.Logging; import com.onarandombox.MultiverseCore.MultiverseCore; import com.onarandombox.MultiverseCore.commandtools.flags.FlagGroup; import com.onarandombox.MultiverseCore.commandtools.flags.FlagResult; -import com.onarandombox.MultiverseCore.commandtools.flags.MVFlags; +import com.onarandombox.MultiverseCore.commandtools.flags.CoreFlags; import org.bukkit.ChatColor; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; @@ -34,11 +33,11 @@ public class CreateCommand extends MultiverseCoreCommand { public CreateCommand(MultiverseCore plugin) { super(plugin); this.setFlagGroup(FlagGroup.of( - MVFlags.WORLD_TYPE, - MVFlags.SEED, - MVFlags.GENERATOR, - MVFlags.GENERATE_STRUCTURES, - MVFlags.SPAWN_ADJUST + CoreFlags.WORLD_TYPE, + CoreFlags.SEED, + CoreFlags.GENERATOR, + CoreFlags.GENERATE_STRUCTURES, + CoreFlags.SPAWN_ADJUST )); } @@ -72,11 +71,11 @@ public class CreateCommand extends MultiverseCoreCommand { worldName, environment, // TODO API: Should Allow FlagResult object to be passed directly - flags.getValue(MVFlags.SEED), - flags.getValue(MVFlags.WORLD_TYPE), - flags.getValue(MVFlags.GENERATE_STRUCTURES), - flags.getValue(MVFlags.GENERATOR), - flags.getValue(MVFlags.SPAWN_ADJUST)) + flags.getValue(CoreFlags.SEED), + flags.getValue(CoreFlags.WORLD_TYPE), + flags.getValue(CoreFlags.GENERATE_STRUCTURES), + flags.getValue(CoreFlags.GENERATOR), + flags.getValue(CoreFlags.SPAWN_ADJUST)) ) ? String.format("%sComplete!", ChatColor.GREEN) : String.format("%sFailed! See console for errors.", ChatColor.RED)); diff --git a/src/main/java/com/onarandombox/MultiverseCore/commands/GeneratorCommand.java b/src/main/java/com/onarandombox/MultiverseCore/commands/GeneratorCommand.java index 6db5c074..19df3fb9 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/commands/GeneratorCommand.java +++ b/src/main/java/com/onarandombox/MultiverseCore/commands/GeneratorCommand.java @@ -15,7 +15,7 @@ import com.onarandombox.MultiverseCore.MultiverseCore; import com.onarandombox.MultiverseCore.commandtools.display.ColorAlternator; import com.onarandombox.MultiverseCore.commandtools.display.ContentCreator; import com.onarandombox.MultiverseCore.commandtools.display.inline.ListDisplay; -import com.onarandombox.MultiverseCore.commandtools.flags.MVFlags; +import com.onarandombox.MultiverseCore.commandtools.flags.CoreFlags; import org.bukkit.ChatColor; import org.bukkit.command.CommandSender; import org.jetbrains.annotations.NotNull; @@ -49,6 +49,6 @@ public class GeneratorCommand extends MultiverseCoreCommand { } private static ContentCreator> getGeneratorContent() { - return () -> (List) MVFlags.GENERATOR.suggestValue(); + return () -> (List) CoreFlags.GENERATOR.suggestValue(); } } diff --git a/src/main/java/com/onarandombox/MultiverseCore/commands/ImportCommand.java b/src/main/java/com/onarandombox/MultiverseCore/commands/ImportCommand.java index 7d4ce542..041dbb61 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/commands/ImportCommand.java +++ b/src/main/java/com/onarandombox/MultiverseCore/commands/ImportCommand.java @@ -17,7 +17,7 @@ import co.aikar.commands.annotation.Syntax; import com.onarandombox.MultiverseCore.MultiverseCore; import com.onarandombox.MultiverseCore.commandtools.flags.FlagGroup; import com.onarandombox.MultiverseCore.commandtools.flags.FlagResult; -import com.onarandombox.MultiverseCore.commandtools.flags.MVFlags; +import com.onarandombox.MultiverseCore.commandtools.flags.CoreFlags; import org.bukkit.ChatColor; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; @@ -31,7 +31,7 @@ public class ImportCommand extends MultiverseCoreCommand { public ImportCommand(MultiverseCore plugin) { super(plugin); - this.setFlagGroup(FlagGroup.of(MVFlags.GENERATOR, MVFlags.SPAWN_ADJUST)); + this.setFlagGroup(FlagGroup.of(CoreFlags.GENERATOR, CoreFlags.SPAWN_ADJUST)); } @Subcommand("import") @@ -63,8 +63,8 @@ public class ImportCommand extends MultiverseCoreCommand { null, null, null, - flags.getValue(MVFlags.GENERATOR), - flags.getValue(MVFlags.SPAWN_ADJUST)) + flags.getValue(CoreFlags.GENERATOR), + flags.getValue(CoreFlags.SPAWN_ADJUST)) ) ? String.format("%sComplete!", ChatColor.GREEN) : String.format("%sFailed! See console for more details.", ChatColor.RED)); diff --git a/src/main/java/com/onarandombox/MultiverseCore/commands/RegenCommand.java b/src/main/java/com/onarandombox/MultiverseCore/commands/RegenCommand.java index 8cf7d0df..2abd25af 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/commands/RegenCommand.java +++ b/src/main/java/com/onarandombox/MultiverseCore/commands/RegenCommand.java @@ -18,7 +18,7 @@ import com.onarandombox.MultiverseCore.MultiverseCore; import com.onarandombox.MultiverseCore.api.MultiverseWorld; import com.onarandombox.MultiverseCore.commandtools.flags.FlagGroup; import com.onarandombox.MultiverseCore.commandtools.flags.FlagResult; -import com.onarandombox.MultiverseCore.commandtools.flags.MVFlags; +import com.onarandombox.MultiverseCore.commandtools.flags.CoreFlags; import com.onarandombox.MultiverseCore.commandtools.queue.QueuedCommand; import org.bukkit.ChatColor; import org.bukkit.command.CommandSender; @@ -30,7 +30,7 @@ public class RegenCommand extends MultiverseCoreCommand { public RegenCommand(MultiverseCore plugin) { super(plugin); - this.setFlagGroup(FlagGroup.of(MVFlags.RANDOM_SEED)); + this.setFlagGroup(FlagGroup.of(CoreFlags.RANDOM_SEED)); } @Subcommand("regen") @@ -70,9 +70,9 @@ public class RegenCommand extends MultiverseCoreCommand { //TODO: API should allow regen of unloaded worlds. sender.sendMessage((this.plugin.getMVWorldManager().regenWorld( world.getName(), - !flags.isDefaulted(MVFlags.RANDOM_SEED), - !flags.isByUserInput(MVFlags.RANDOM_SEED), - flags.getValue(MVFlags.RANDOM_SEED)) + !flags.isDefaulted(CoreFlags.RANDOM_SEED), + !flags.isByUserInput(CoreFlags.RANDOM_SEED), + flags.getValue(CoreFlags.RANDOM_SEED)) ) ? String.format("%sWorld Regenerated!", ChatColor.GREEN) : String.format("%sWorld could not be regenerated!", ChatColor.RED)); diff --git a/src/main/java/com/onarandombox/MultiverseCore/commands/VersionCommand.java b/src/main/java/com/onarandombox/MultiverseCore/commands/VersionCommand.java index d4a63808..1b9c8b45 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/commands/VersionCommand.java +++ b/src/main/java/com/onarandombox/MultiverseCore/commands/VersionCommand.java @@ -16,7 +16,7 @@ import co.aikar.commands.annotation.Syntax; import com.onarandombox.MultiverseCore.MultiverseCore; import com.onarandombox.MultiverseCore.commandtools.flags.FlagGroup; import com.onarandombox.MultiverseCore.commandtools.flags.FlagResult; -import com.onarandombox.MultiverseCore.commandtools.flags.MVFlags; +import com.onarandombox.MultiverseCore.commandtools.flags.CoreFlags; import com.onarandombox.MultiverseCore.event.MVVersionEvent; import com.onarandombox.MultiverseCore.utils.webpaste.PasteFailedException; import com.onarandombox.MultiverseCore.utils.webpaste.PasteService; @@ -31,7 +31,6 @@ import org.bukkit.command.CommandSender; import org.bukkit.command.ConsoleCommandSender; import org.bukkit.scheduler.BukkitRunnable; import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; import java.io.File; import java.util.Arrays; @@ -45,8 +44,8 @@ public class VersionCommand extends MultiverseCoreCommand { public VersionCommand(MultiverseCore plugin) { super(plugin); this.setFlagGroup(FlagGroup.of( - MVFlags.PASTE_SERVICE_TYPE, - MVFlags.INCLUDE_PLUGIN_LIST + CoreFlags.PASTE_SERVICE_TYPE, + CoreFlags.INCLUDE_PLUGIN_LIST )); } @@ -68,7 +67,7 @@ public class VersionCommand extends MultiverseCoreCommand { this.addVersionInfoToEvent(versionEvent); this.plugin.getServer().getPluginManager().callEvent(versionEvent); - if (flags.getValue(MVFlags.INCLUDE_PLUGIN_LIST)) { + if (flags.getValue(CoreFlags.INCLUDE_PLUGIN_LIST)) { versionEvent.appendVersionInfo('\n' + "Plugins: " + getPluginList()); versionEvent.putDetailedVersionInfo("plugins.txt", "Plugins: " + getPluginList()); } @@ -80,7 +79,7 @@ public class VersionCommand extends MultiverseCoreCommand { logToConsole(versionInfo); - PasteServiceType pasteType = flags.getValue(MVFlags.PASTE_SERVICE_TYPE); + PasteServiceType pasteType = flags.getValue(CoreFlags.PASTE_SERVICE_TYPE); if (pasteType == PasteServiceType.NONE && !(sender instanceof ConsoleCommandSender)) { sender.sendMessage("Version info dumped to console! Please check your server logs."); return; diff --git a/src/main/java/com/onarandombox/MultiverseCore/commandTools/flags/MVFlags.java b/src/main/java/com/onarandombox/MultiverseCore/commandtools/flags/CoreFlags.java similarity index 99% rename from src/main/java/com/onarandombox/MultiverseCore/commandTools/flags/MVFlags.java rename to src/main/java/com/onarandombox/MultiverseCore/commandtools/flags/CoreFlags.java index a55d26fc..0e28dd5f 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/commandTools/flags/MVFlags.java +++ b/src/main/java/com/onarandombox/MultiverseCore/commandtools/flags/CoreFlags.java @@ -17,7 +17,7 @@ import java.util.Map; import java.util.Random; import java.util.stream.Collectors; -public class MVFlags { +public class CoreFlags { private static MultiverseCore multiverse;