refactor!: Move queue command manager to command manager class
This commit is contained in:
parent
6fba6715ba
commit
a6ee8a55ca
|
@ -767,15 +767,6 @@ public class MultiverseCore extends JavaPlugin implements MVPlugin, Core {
|
|||
return this.commandManager;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
@Deprecated
|
||||
public CommandQueueManager getCommandQueueManager() {
|
||||
return commandQueueManager;
|
||||
}
|
||||
|
||||
/**
|
||||
* Shows a message that the given world is not a MultiverseWorld.
|
||||
*
|
||||
|
|
|
@ -9,7 +9,6 @@ package com.onarandombox.MultiverseCore.api;
|
|||
|
||||
import buscript.Buscript;
|
||||
import com.onarandombox.MultiverseCore.commandtools.MVCommandManager;
|
||||
import com.onarandombox.MultiverseCore.commandtools.queue.CommandQueueManager;
|
||||
import com.onarandombox.MultiverseCore.destination.DestinationsProvider;
|
||||
import com.onarandombox.MultiverseCore.utils.AnchorManager;
|
||||
import com.onarandombox.MultiverseCore.utils.MVEconomist;
|
||||
|
@ -87,15 +86,6 @@ public interface Core {
|
|||
*/
|
||||
MVCommandManager getCommandManager();
|
||||
|
||||
/**
|
||||
* Manager for command that requires /mv confirm before execution.
|
||||
*
|
||||
* @return A non-null {@link CommandQueueManager}.
|
||||
* @deprecated To be moved to new command manager in 5.0.0
|
||||
*/
|
||||
@Deprecated
|
||||
CommandQueueManager getCommandQueueManager();
|
||||
|
||||
/**
|
||||
* Gets the class responsible for loading many different destinations
|
||||
* on demand.
|
||||
|
|
|
@ -9,6 +9,7 @@ import co.aikar.commands.CommandContexts;
|
|||
import co.aikar.commands.PaperCommandManager;
|
||||
import com.onarandombox.MultiverseCore.MultiverseCore;
|
||||
import com.onarandombox.MultiverseCore.commandtools.flags.CommandFlagsManager;
|
||||
import com.onarandombox.MultiverseCore.commandtools.queue.CommandQueueManager;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
|
@ -18,6 +19,7 @@ public class MVCommandManager extends PaperCommandManager {
|
|||
|
||||
private final MultiverseCore plugin;
|
||||
private CommandFlagsManager flagsManager;
|
||||
private CommandQueueManager commandQueueManager;
|
||||
|
||||
public MVCommandManager(@NotNull MultiverseCore plugin) {
|
||||
super(plugin);
|
||||
|
@ -41,6 +43,18 @@ public class MVCommandManager extends PaperCommandManager {
|
|||
return flagsManager;
|
||||
}
|
||||
|
||||
/**
|
||||
* Manager for command that requires /mv confirm before execution.
|
||||
*
|
||||
* @return A non-null {@link CommandQueueManager}.
|
||||
*/
|
||||
public synchronized @NotNull CommandQueueManager getCommandQueueManager() {
|
||||
if (this.commandQueueManager == null) {
|
||||
this.commandQueueManager = new CommandQueueManager(this.plugin);
|
||||
}
|
||||
return commandQueueManager;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets class responsible for parsing string args into objects.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue