Added CommandHandler instance

This commit is contained in:
Tim Visée 2015-11-01 16:13:34 +01:00
parent 59d8ced86d
commit 690c7d9532

View File

@ -11,6 +11,7 @@ import java.util.List;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Logger;
import fr.xephi.authme.command.CommandHandler;
import org.apache.logging.log4j.LogManager;
import org.bukkit.Bukkit;
import org.bukkit.Location;
@ -77,6 +78,9 @@ public class AuthMe extends JavaPlugin {
private static Server server;
private Logger authmeLogger;
// TODO: Move this to a better place! -- timvisee
private CommandHandler commandHandler = null;
public Management management;
public NewAPI api;
public SendMailSSL mail;
@ -140,6 +144,10 @@ public class AuthMe extends JavaPlugin {
authmeLogger = Logger.getLogger("AuthMe");
authme = this;
// Set up and initialize the command handler
this.commandHandler = new CommandHandler(false);
this.commandHandler.init();
// TODO: split the plugin in more modules
moduleManager = new ModuleManager(this);
@SuppressWarnings("unused")
@ -808,4 +816,13 @@ public class AuthMe extends JavaPlugin {
public String getCountryName(String ip) {
return Utils.getCountryName(ip);
}
/**
* Get the command handler instance.
*
* @return Command handler.
*/
public CommandHandler getCommandHandler() {
return this.commandHandler;
}
}