From 1f412a97ff87550e539b694ec072f4a4bf60784b Mon Sep 17 00:00:00 2001 From: Pepich Date: Fri, 5 May 2017 09:48:35 +0200 Subject: [PATCH] Updated to APIv3.2 Note: Requires! v3.2 or higher as it relies on finding modules. It will partially work on lower versions, however it WILL produce errors. --- src/com/redstoner/modules/check/Check.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/com/redstoner/modules/check/Check.java b/src/com/redstoner/modules/check/Check.java index 3659fb9..08d1bb4 100644 --- a/src/com/redstoner/modules/check/Check.java +++ b/src/com/redstoner/modules/check/Check.java @@ -21,8 +21,10 @@ import org.json.simple.parser.ParseException; import com.nemez.cmdmgr.Command; import com.nemez.cmdmgr.Command.AsyncType; +import com.nemez.cmdmgr.CommandManager; import com.redstoner.annotations.Version; import com.redstoner.coremods.moduleLoader.ModuleLoader; +import com.redstoner.misc.Main; import com.redstoner.misc.Utils; import com.redstoner.misc.mysql.JSONManager; import com.redstoner.misc.mysql.MysqlHandler; @@ -32,7 +34,7 @@ import com.redstoner.misc.mysql.elements.MysqlDatabase; import com.redstoner.misc.mysql.elements.MysqlTable; import com.redstoner.modules.Module; -@Version(major = 2, minor = 0, revision = 2, compatible = 2) +@Version(major = 3, minor = 0, revision = 0, compatible = 3) public class Check implements Module, Listener { MysqlTable table; @@ -60,6 +62,12 @@ public class Check implements Module, Listener return true; } + @Override + public void postEnable() + { + CommandManager.registerCommand(getCommandString(), this, Main.plugin); + } + @SuppressWarnings("deprecation") @Command(hook = "checkCommand", async = AsyncType.ALWAYS) public void checkCommand(final CommandSender sender, final String player)