Add queue object to main class.

This commit is contained in:
benwoo1110 2020-12-15 14:28:08 +08:00
parent 15810c9404
commit 1cda2a18a5
2 changed files with 8 additions and 2 deletions

View File

@ -37,6 +37,7 @@ import com.onarandombox.MultiverseCore.commands_acf.ConfigCommand;
import com.onarandombox.MultiverseCore.commands_acf.DebugCommand;
import com.onarandombox.MultiverseCore.commands_acf.InfoCommand;
import com.onarandombox.MultiverseCore.commands_acf.LoadCommand;
import com.onarandombox.MultiverseCore.commands_acf.QueueManager;
import com.onarandombox.MultiverseCore.commands_acf.UnloadCommand;
import com.onarandombox.MultiverseCore.destination.AnchorDestination;
import com.onarandombox.MultiverseCore.destination.BedDestination;
@ -171,6 +172,7 @@ public class MultiverseCore extends JavaPlugin implements MVPlugin, Core {
// Setup our Map for our Commands using the CommandHandler.
private PaperCommandManager commandHandler;
private QueueManager queueManager;
private static final String LOG_TAG = "[Multiverse-Core]";
@ -712,7 +714,7 @@ public class MultiverseCore extends JavaPlugin implements MVPlugin, Core {
commandHandler.enableUnstableAPI("help");
CommandTools tools = new CommandTools(this);
tools.registerCommandContext();
tools.registerCommandContexts();
tools.registerCommandCompletions();
commandHandler.registerCommand(new UnloadCommand(this));
@ -826,6 +828,10 @@ public class MultiverseCore extends JavaPlugin implements MVPlugin, Core {
return commandHandler;
}
public QueueManager getQueueManager() {
return queueManager;
}
/**
* Gets the log-tag.
*

View File

@ -61,7 +61,7 @@ public class CommandTools {
//TODO: world types
}
public void registerCommandContext() {
public void registerCommandContexts() {
commandHandler.getCommandContexts().registerIssuerAwareContext(
MultiverseWorld.class,
context -> {