From 45e7db7abd61ed80cbcae883313f561048c9b59b Mon Sep 17 00:00:00 2001 From: benwoo1110 <30431861+benwoo1110@users.noreply.github.com> Date: Sun, 20 Dec 2020 12:20:45 +0800 Subject: [PATCH] Remove unneeded code from old queue command handling. --- .../MultiverseCore/MultiverseCore.java | 49 ------------------- .../onarandombox/MultiverseCore/api/Core.java | 15 ------ 2 files changed, 64 deletions(-) diff --git a/src/main/java/com/onarandombox/MultiverseCore/MultiverseCore.java b/src/main/java/com/onarandombox/MultiverseCore/MultiverseCore.java index 1bbc6f57..1440f220 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/MultiverseCore.java +++ b/src/main/java/com/onarandombox/MultiverseCore/MultiverseCore.java @@ -18,7 +18,6 @@ import com.onarandombox.MultiverseCore.api.MVWorldManager; import com.onarandombox.MultiverseCore.api.MultiverseCoreConfig; import com.onarandombox.MultiverseCore.api.MultiverseMessaging; import com.onarandombox.MultiverseCore.api.SafeTTeleporter; -import com.onarandombox.MultiverseCore.commands_helper.CommandQueueManager; import com.onarandombox.MultiverseCore.commands_helper.MVCommandManager; import com.onarandombox.MultiverseCore.destination.AnchorDestination; import com.onarandombox.MultiverseCore.destination.BedDestination; @@ -166,7 +165,6 @@ public class MultiverseCore extends JavaPlugin implements MVPlugin, Core { // Setup our Map for our Commands using the CommandHandler. private MVCommandManager commandManager; - private CommandQueueManager commandQueueManager; private static final String LOG_TAG = "[Multiverse-Core]"; @@ -250,7 +248,6 @@ public class MultiverseCore extends JavaPlugin implements MVPlugin, Core { // Setup commands //TODO: Should init commands after config this.commandManager = new MVCommandManager(this); - this.commandQueueManager = new CommandQueueManager(this); // Initialize the Destination factor AFTER the commands this.initializeDestinationFactory(); @@ -871,18 +868,6 @@ public class MultiverseCore extends JavaPlugin implements MVPlugin, Core { return this.destFactory; } - /** - * This is a convenience method to allow the QueuedCommand system to call it. You should NEVER call this directly. - * - * @param teleporter The Person requesting that the teleport should happen. - * @param p Player The Person being teleported. - * @param l The potentially unsafe location. - */ - public void teleportPlayer(CommandSender teleporter, Player p, Location l) { - // This command is the override, and MUST NOT TELEPORT SAFELY - this.getSafeTTeleporter().safelyTeleport(teleporter, p, l, false); - } - /** * Gets the server's root-folder as {@link File}. * @@ -981,40 +966,6 @@ public class MultiverseCore extends JavaPlugin implements MVPlugin, Core { return this.saveMVConfig() && this.saveWorldConfig(); } - /** - * NOT deprecated for the time as queued commands use this. - * However, this is not in the API and other plugins should therefore not use it. - * - * @param name World to delete - * @return True if success, false if fail. - */ - public Boolean deleteWorld(String name) { - return this.worldManager.deleteWorld(name); - } - - /** - * NOT deprecated for the time as queued commands use this. - * However, this is not in the API and other plugins should therefore not use it. - * - * @param oldName World to copy - * @param newName World to create - * @param generator The Custom generator plugin to use. - * @return True if success, false if fail. - */ - public Boolean cloneWorld(String oldName, String newName, String generator) { - return this.worldManager.cloneWorld(oldName, newName, generator); - } - - /** - * {@inheritDoc} - * @deprecated This is deprecated! - */ - @Override - @Deprecated - public Boolean regenWorld(String name, Boolean useNewSeed, Boolean randomSeed, String seed) { - return this.worldManager.regenWorld(name, useNewSeed, randomSeed, seed); - } - /** * {@inheritDoc} */ diff --git a/src/main/java/com/onarandombox/MultiverseCore/api/Core.java b/src/main/java/com/onarandombox/MultiverseCore/api/Core.java index e2cb7eb3..d9894333 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/api/Core.java +++ b/src/main/java/com/onarandombox/MultiverseCore/api/Core.java @@ -116,21 +116,6 @@ public interface Core { */ AnchorManager getAnchorManager(); - /** - * Used by queued commands to regenerate a world on a delay. - * - * @param name Name of the world to regenerate - * @param useNewSeed If a new seed should be used - * @param randomSeed IF the new seed should be random - * @param seed The seed of the world. - * - * @return True if success, false if fail. - * - * @deprecated Use {@link MVWorldManager#regenWorld(String, boolean, boolean, String)} instead. - */ - @Deprecated - Boolean regenWorld(String name, Boolean useNewSeed, Boolean randomSeed, String seed); - /** * Decrements the number of plugins that have specifically hooked into core. */