From 690c7d95327e75997eace615dac1061cff5bcb3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Vis=C3=A9e?= Date: Sun, 1 Nov 2015 16:13:34 +0100 Subject: [PATCH] Added CommandHandler instance --- src/main/java/fr/xephi/authme/AuthMe.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/main/java/fr/xephi/authme/AuthMe.java b/src/main/java/fr/xephi/authme/AuthMe.java index aae74c27..8bfe1169 100644 --- a/src/main/java/fr/xephi/authme/AuthMe.java +++ b/src/main/java/fr/xephi/authme/AuthMe.java @@ -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; + } }