diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServer.java b/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServer.java index 1aba3970..96238c73 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServer.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServer.java @@ -82,16 +82,14 @@ import pro.gravit.launchserver.socket.WebSocketService; import pro.gravit.launchserver.socket.handlers.NettyServerSocketHandler; import pro.gravit.utils.Version; -import pro.gravit.utils.command.CommandHandler; -import pro.gravit.utils.command.JLineCommandHandler; -import pro.gravit.utils.command.StdCommandHandler; +import pro.gravit.utils.command.*; import pro.gravit.utils.helper.CommonHelper; import pro.gravit.utils.helper.IOHelper; import pro.gravit.utils.helper.JVMHelper; import pro.gravit.utils.helper.LogHelper; import pro.gravit.utils.helper.SecurityHelper; -public final class LaunchServer implements Runnable, AutoCloseable { +public final class LaunchServer implements Runnable, AutoCloseable, Reconfigurable { public void reload() throws Exception { config.close(); @@ -102,6 +100,35 @@ public void reload() throws Exception { config.server = this; config.verify(); config.init(); + if (config.components != null) { + LogHelper.debug("Init components"); + config.components.forEach((k, v) -> { + LogHelper.subDebug("Init component %s", k); + registerObject("component.".concat(k), v); + v.init(this); + }); + LogHelper.debug("Init components successful"); + LogHelper.debug("PostInit components"); + config.components.forEach((k, v) -> { + LogHelper.subDebug("PostInit component %s", k); + v.postInit(this); + }); + LogHelper.debug("PostInit components successful"); + } + + } + + @Override + public Map getCommands() { + Map commands = new HashMap<>(); + SubCommand reload = new SubCommand() { + @Override + public void invoke(String... args) throws Exception { + reload(); + } + }; + commands.put("reload", reload); + return commands; } public static final class Config { @@ -209,13 +236,23 @@ public void init() { } permissionsHandler.init(server); hwidHandler.init(); - dao.init(server); + if(dao != null) + dao.init(server); if (protectHandler != null) { protectHandler.checkLaunchServerLicense(); } + if (components != null) { + LogHelper.debug("PreInit components"); + components.forEach((k, v) -> { + LogHelper.subDebug("PreInit component %s", k); + v.preInit(server); + }); + LogHelper.debug("PreInit components successful"); + } server.registerObject("permissionsHandler", permissionsHandler); - server.registerObject("daoProvider", dao); - for (AuthProviderPair pair : auth) { + server.registerObject("hwidHandler", hwidHandler); + for (int i = 0; i < auth.length; ++i) { + AuthProviderPair pair = auth[i]; server.registerObject("auth.".concat(pair.name).concat(".provider"), pair.provider); server.registerObject("auth.".concat(pair.name).concat(".handler"), pair.handler); server.registerObject("auth.".concat(pair.name).concat(".texture"), pair.textureProvider); @@ -227,6 +264,7 @@ public void init() { public void close() { try { server.unregisterObject("permissionsHandler", permissionsHandler); + server.unregisterObject("hwidHandler", hwidHandler); for (AuthProviderPair pair : auth) { server.unregisterObject("auth.".concat(pair.name).concat(".provider"), pair.provider); server.unregisterObject("auth.".concat(pair.name).concat(".handler"), pair.handler); @@ -580,25 +618,6 @@ public LaunchServer(Path dir, boolean testEnv, String[] args) throws IOException } runtime.verify(); config.verify(); - Launcher.applyLauncherEnv(config.env); - for (AuthProviderPair provider : config.auth) { - provider.init(this); - } - config.permissionsHandler.init(this); - config.hwidHandler.init(); - if(config.dao != null) - config.dao.init(this); - if (config.protectHandler != null) { - config.protectHandler.checkLaunchServerLicense(); - } - if (config.components != null) { - LogHelper.debug("PreInit components"); - config.components.forEach((k, v) -> { - LogHelper.subDebug("PreInit component %s", k); - v.preInit(this); - }); - LogHelper.debug("PreInit components successful"); - } // build hooks, anti-brutforce and other buildHookManager = new BuildHookManager(); @@ -646,16 +665,9 @@ public LaunchServer(Path dir, boolean testEnv, String[] args) throws IOException } } } + config.init(); + registerObject("launchServer", this); GarbageManager.registerNeedGC(sessionManager); - registerObject("permissionsHandler", config.permissionsHandler); - for (int i = 0; i < config.auth.length; ++i) { - AuthProviderPair pair = config.auth[i]; - registerObject("auth.".concat(pair.name).concat(".provider"), pair.provider); - registerObject("auth.".concat(pair.name).concat(".handler"), pair.handler); - registerObject("auth.".concat(pair.name).concat(".texture"), pair.textureProvider); - } - - Arrays.stream(config.mirrors).forEach(mirrorManager::addMirror); pro.gravit.launchserver.command.handler.CommandHandler.registerCommands(localCommandHandler, this); diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/Reloadable.java b/LaunchServer/src/main/java/pro/gravit/launchserver/Reloadable.java deleted file mode 100644 index 5d02decc..00000000 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/Reloadable.java +++ /dev/null @@ -1,7 +0,0 @@ -package pro.gravit.launchserver; - -@FunctionalInterface -@Deprecated -public interface Reloadable { - void reload() throws Exception; -} diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/handler/CachedAuthHandler.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/handler/CachedAuthHandler.java index 663d1922..0a63054d 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/handler/CachedAuthHandler.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/handler/CachedAuthHandler.java @@ -1,18 +1,23 @@ package pro.gravit.launchserver.auth.handler; import java.io.IOException; +import java.io.Reader; +import java.io.Writer; +import java.nio.file.Paths; import java.util.HashMap; import java.util.Map; import java.util.Objects; import java.util.UUID; +import pro.gravit.launcher.Launcher; import pro.gravit.launcher.NeedGarbageCollection; +import pro.gravit.launchserver.Reconfigurable; import pro.gravit.launchserver.auth.provider.AuthProviderResult; -import pro.gravit.utils.helper.CommonHelper; -import pro.gravit.utils.helper.SecurityHelper; -import pro.gravit.utils.helper.VerifyHelper; +import pro.gravit.utils.command.Command; +import pro.gravit.utils.command.SubCommand; +import pro.gravit.utils.helper.*; -public abstract class CachedAuthHandler extends AuthHandler implements NeedGarbageCollection { +public abstract class CachedAuthHandler extends AuthHandler implements NeedGarbageCollection, Reconfigurable { public static final class Entry { public final UUID uuid; @@ -29,6 +34,63 @@ public Entry(UUID uuid, String username, String accessToken, String serverID) { } } + protected class EntryAndUsername { + public Map entryCache; + public Map usernameCache; + } + + @Override + public Map getCommands() { + Map commands = new HashMap<>(); + commands.put("clear", new SubCommand() { + @Override + public void invoke(String... args) throws Exception { + long entryCacheSize = entryCache.size(); + long usernamesCacheSize = usernamesCache.size(); + entryCache.clear(); + usernamesCache.clear(); + LogHelper.info("Cleared cache: %d Entry %d Usernames", entryCacheSize, usernamesCacheSize); + } + }); + commands.put("load", new SubCommand() { + @Override + public void invoke(String... args) throws Exception { + verifyArgs(args, 2); + + LogHelper.info("CachedAuthHandler read from %s", args[0]); + int size_entry; + int size_username; + try (Reader reader = IOHelper.newReader(Paths.get(args[1]))) { + EntryAndUsername entryAndUsername = Launcher.gsonManager.configGson.fromJson(reader, EntryAndUsername.class); + size_entry = entryAndUsername.entryCache.size(); + size_username = entryAndUsername.usernameCache.size(); + loadEntryCache(entryAndUsername.entryCache); + loadUsernameCache(entryAndUsername.usernameCache); + + } + LogHelper.subInfo("Readed %d entryCache %d usernameCache", size_entry, size_username); + } + }); + commands.put("unload", new SubCommand() { + @Override + public void invoke(String... args) throws Exception { + verifyArgs(args, 2); + + LogHelper.info("CachedAuthHandler write to %s", args[1]); + Map entryCache = getEntryCache(); + Map usernamesCache = getUsernamesCache(); + EntryAndUsername serializable = new EntryAndUsername(); + serializable.entryCache = entryCache; + serializable.usernameCache = usernamesCache; + try (Writer writer = IOHelper.newWriter(Paths.get(args[1]))) { + Launcher.gsonManager.configGson.toJson(serializable, writer); + } + LogHelper.subInfo("Write %d entryCache, %d usernameCache", entryCache.size(), usernamesCache.size()); + } + }); + return commands; + } + private transient final Map entryCache = new HashMap<>(1024); private transient final Map usernamesCache = new HashMap<>(1024); diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/hwid/HWIDHandler.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/hwid/HWIDHandler.java index eadb4228..ae25e41c 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/hwid/HWIDHandler.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/hwid/HWIDHandler.java @@ -1,11 +1,17 @@ package pro.gravit.launchserver.auth.hwid; +import java.util.HashMap; import java.util.List; +import java.util.Map; import pro.gravit.launcher.hwid.HWID; +import pro.gravit.launchserver.Reconfigurable; import pro.gravit.utils.ProviderMap; +import pro.gravit.utils.command.Command; +import pro.gravit.utils.command.SubCommand; +import pro.gravit.utils.helper.LogHelper; -public abstract class HWIDHandler implements AutoCloseable { +public abstract class HWIDHandler implements AutoCloseable, Reconfigurable { public static ProviderMap providers = new ProviderMap<>("HWIDHandler"); private static boolean registredHandl = false; @@ -21,6 +27,40 @@ public static void registerHandlers() { } } + @Override + public Map getCommands() { + Map commands = new HashMap<>(); + commands.put("ban", new SubCommand() { + @Override + public void invoke(String... args) throws Exception { + List target = getHwid(args[0]); + ban(target); + } + }); + commands.put("unban", new SubCommand() { + @Override + public void invoke(String... args) throws Exception { + List target = getHwid(args[0]); + unban(target); + } + }); + commands.put("gethwid", new SubCommand() { + @Override + public void invoke(String... args) throws Exception { + List target = getHwid(args[0]); + for(HWID hwid : target) + { + if (hwid == null) { + LogHelper.error("[%s] HWID: null", args[0]); + continue; + } + LogHelper.info("[%s] HWID: %s", args[0], hwid.toString()); + } + } + }); + return commands; + } + public abstract void ban(List hwid) throws HWIDException; public void check(HWID hwid, String username) throws HWIDException { diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/permissions/JsonFilePermissionsHandler.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/permissions/JsonFilePermissionsHandler.java index 33d9cfdb..4f2f41fd 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/permissions/JsonFilePermissionsHandler.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/permissions/JsonFilePermissionsHandler.java @@ -14,10 +14,13 @@ import pro.gravit.launcher.ClientPermissions; import pro.gravit.launcher.Launcher; import pro.gravit.launchserver.LaunchServer; +import pro.gravit.launchserver.Reconfigurable; +import pro.gravit.utils.command.Command; +import pro.gravit.utils.command.SubCommand; import pro.gravit.utils.helper.IOHelper; import pro.gravit.utils.helper.LogHelper; -public class JsonFilePermissionsHandler extends PermissionsHandler { +public class JsonFilePermissionsHandler extends PermissionsHandler implements Reconfigurable { public String filename = "permissions.json"; public static Map map; @@ -39,6 +42,19 @@ public void close() { } + @Override + public Map getCommands() { + Map commands = new HashMap<>(); + SubCommand reload = new SubCommand() { + @Override + public void invoke(String... args) throws Exception { + reload(); + } + }; + commands.put("reload", reload); + return commands; + } + public static class Enity { public String username; public ClientPermissions permissions; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/permissions/JsonLongFilePermissionsHandler.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/permissions/JsonLongFilePermissionsHandler.java index f6fc56eb..29848645 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/permissions/JsonLongFilePermissionsHandler.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/permissions/JsonLongFilePermissionsHandler.java @@ -14,10 +14,13 @@ import pro.gravit.launcher.ClientPermissions; import pro.gravit.launcher.Launcher; import pro.gravit.launchserver.LaunchServer; +import pro.gravit.launchserver.Reconfigurable; +import pro.gravit.utils.command.Command; +import pro.gravit.utils.command.SubCommand; import pro.gravit.utils.helper.IOHelper; import pro.gravit.utils.helper.LogHelper; -public class JsonLongFilePermissionsHandler extends PermissionsHandler { +public class JsonLongFilePermissionsHandler extends PermissionsHandler implements Reconfigurable { public String filename = "permissions.json"; public long defaultPerms = 0L; public static Map map; @@ -40,6 +43,19 @@ public void close() { } + @Override + public Map getCommands() { + Map commands = new HashMap<>(); + SubCommand reload = new SubCommand() { + @Override + public void invoke(String... args) throws Exception { + reload(); + } + }; + commands.put("reload", reload); + return commands; + } + public static class Enity { public String username; public ClientPermissions permissions; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/command/auth/BanCommand.java b/LaunchServer/src/main/java/pro/gravit/launchserver/command/auth/BanCommand.java deleted file mode 100644 index 89a5ce9b..00000000 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/command/auth/BanCommand.java +++ /dev/null @@ -1,30 +0,0 @@ -package pro.gravit.launchserver.command.auth; - -import java.util.List; - -import pro.gravit.launcher.hwid.HWID; -import pro.gravit.launchserver.LaunchServer; -import pro.gravit.launchserver.command.Command; - -public class BanCommand extends Command { - public BanCommand(LaunchServer server) { - super(server); - } - - @Override - public String getArgsDescription() { - return "[username]"; - } - - @Override - public String getUsageDescription() { - return "Ban username for HWID"; - } - - @Override - public void invoke(String... args) throws Exception { - verifyArgs(args, 1); - List target = server.config.hwidHandler.getHwid(args[0]); - server.config.hwidHandler.ban(target); - } -} diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/command/auth/GetHWIDCommand.java b/LaunchServer/src/main/java/pro/gravit/launchserver/command/auth/GetHWIDCommand.java deleted file mode 100644 index 3e7805a1..00000000 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/command/auth/GetHWIDCommand.java +++ /dev/null @@ -1,38 +0,0 @@ -package pro.gravit.launchserver.command.auth; - -import java.util.List; - -import pro.gravit.launcher.hwid.HWID; -import pro.gravit.launchserver.LaunchServer; -import pro.gravit.launchserver.command.Command; -import pro.gravit.utils.helper.LogHelper; - -public class GetHWIDCommand extends Command { - public GetHWIDCommand(LaunchServer server) { - super(server); - } - - @Override - public String getArgsDescription() { - return "[username]"; - } - - @Override - public String getUsageDescription() { - return "get HWID from username"; - } - - @Override - public void invoke(String... args) throws Exception { - verifyArgs(args, 1); - List target = server.config.hwidHandler.getHwid(args[0]); - for (HWID hwid : target) { - if (hwid == null) { - LogHelper.error("HWID %s: null", args[0]); - continue; - } - LogHelper.info("HWID %s: %s", args[0], hwid.toString()); - } - LogHelper.info("Found %d HWID", target.size()); - } -} diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/command/auth/UnbanCommand.java b/LaunchServer/src/main/java/pro/gravit/launchserver/command/auth/UnbanCommand.java deleted file mode 100644 index f6897e8e..00000000 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/command/auth/UnbanCommand.java +++ /dev/null @@ -1,30 +0,0 @@ -package pro.gravit.launchserver.command.auth; - -import java.util.List; - -import pro.gravit.launcher.hwid.HWID; -import pro.gravit.launchserver.LaunchServer; -import pro.gravit.launchserver.command.Command; - -public class UnbanCommand extends Command { - public UnbanCommand(LaunchServer server) { - super(server); - } - - @Override - public String getArgsDescription() { - return "[username]"; - } - - @Override - public String getUsageDescription() { - return "Unban username for HWID"; - } - - @Override - public void invoke(String... args) throws Exception { - verifyArgs(args, 1); - List target = server.config.hwidHandler.getHwid(args[0]); - server.config.hwidHandler.unban(target); - } -} diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/command/dump/DumpEntryCacheCommand.java b/LaunchServer/src/main/java/pro/gravit/launchserver/command/dump/DumpEntryCacheCommand.java deleted file mode 100644 index fba4e1ff..00000000 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/command/dump/DumpEntryCacheCommand.java +++ /dev/null @@ -1,88 +0,0 @@ -package pro.gravit.launchserver.command.dump; - -import java.io.Reader; -import java.io.Writer; -import java.nio.file.Paths; -import java.util.Map; -import java.util.UUID; - -import pro.gravit.launcher.Launcher; -import pro.gravit.launchserver.LaunchServer; -import pro.gravit.launchserver.auth.AuthProviderPair; -import pro.gravit.launchserver.auth.handler.CachedAuthHandler; -import pro.gravit.launchserver.command.Command; -import pro.gravit.utils.command.SubCommand; -import pro.gravit.utils.helper.IOHelper; -import pro.gravit.utils.helper.LogHelper; - -public class DumpEntryCacheCommand extends Command { - public DumpEntryCacheCommand(LaunchServer server) { - super(server); - childCommands.put("load", new SubCommand() { - @Override - public void invoke(String... args) throws Exception { - verifyArgs(args, 2); - AuthProviderPair pair = server.config.getAuthProviderPair(args[0]); - if (pair == null) throw new IllegalStateException(String.format("Auth %s not found", args[0])); - if (!(pair.handler instanceof CachedAuthHandler)) - throw new UnsupportedOperationException("This command used only CachedAuthHandler"); - CachedAuthHandler authHandler = (CachedAuthHandler) pair.handler; - - LogHelper.info("CachedAuthHandler read from %s", args[0]); - int size_entry; - int size_username; - try (Reader reader = IOHelper.newReader(Paths.get(args[1]))) { - EntryAndUsername entryAndUsername = Launcher.gsonManager.configGson.fromJson(reader, EntryAndUsername.class); - size_entry = entryAndUsername.entryCache.size(); - size_username = entryAndUsername.usernameCache.size(); - authHandler.loadEntryCache(entryAndUsername.entryCache); - authHandler.loadUsernameCache(entryAndUsername.usernameCache); - - } - LogHelper.subInfo("Readed %d entryCache %d usernameCache", size_entry, size_username); - } - }); - childCommands.put("unload", new SubCommand() { - @Override - public void invoke(String... args) throws Exception { - verifyArgs(args, 2); - AuthProviderPair pair = server.config.getAuthProviderPair(args[0]); - if (pair == null) throw new IllegalStateException(String.format("Auth %s not found", args[0])); - if (!(pair.handler instanceof CachedAuthHandler)) - throw new UnsupportedOperationException("This command used only CachedAuthHandler"); - CachedAuthHandler authHandler = (CachedAuthHandler) pair.handler; - - LogHelper.info("CachedAuthHandler write to %s", args[1]); - Map entryCache = authHandler.getEntryCache(); - Map usernamesCache = authHandler.getUsernamesCache(); - EntryAndUsername serializable = new EntryAndUsername(); - serializable.entryCache = entryCache; - serializable.usernameCache = usernamesCache; - try (Writer writer = IOHelper.newWriter(Paths.get(args[1]))) { - Launcher.gsonManager.configGson.toJson(serializable, writer); - } - LogHelper.subInfo("Write %d entryCache, %d usernameCache", entryCache.size(), usernamesCache.size()); - } - }); - } - - @Override - public String getArgsDescription() { - return "[load/unload] [auth_id] [filename]"; - } - - @Override - public String getUsageDescription() { - return "Load or unload AuthHandler Entry cache"; - } - - @Override - public void invoke(String... args) throws Exception { - invokeSubcommands(args); - } - - public class EntryAndUsername { - public Map entryCache; - public Map usernameCache; - } -} diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/command/handler/CommandHandler.java b/LaunchServer/src/main/java/pro/gravit/launchserver/command/handler/CommandHandler.java index 7a7c849d..98c9ea7b 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/command/handler/CommandHandler.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/command/handler/CommandHandler.java @@ -2,10 +2,7 @@ import pro.gravit.launchserver.LaunchServer; import pro.gravit.launchserver.command.auth.AuthCommand; -import pro.gravit.launchserver.command.auth.BanCommand; -import pro.gravit.launchserver.command.auth.GetHWIDCommand; import pro.gravit.launchserver.command.auth.UUIDToUsernameCommand; -import pro.gravit.launchserver.command.auth.UnbanCommand; import pro.gravit.launchserver.command.auth.UsernameToUUIDCommand; import pro.gravit.launchserver.command.basic.BuildCommand; import pro.gravit.launchserver.command.basic.ProguardCleanCommand; @@ -19,7 +16,6 @@ import pro.gravit.launchserver.command.dao.GetUserCommand; import pro.gravit.launchserver.command.dao.RegisterCommand; import pro.gravit.launchserver.command.dao.SetUserPasswordCommand; -import pro.gravit.launchserver.command.dump.DumpEntryCacheCommand; import pro.gravit.launchserver.command.dump.DumpSessionsCommand; import pro.gravit.launchserver.command.hash.DownloadAssetCommand; import pro.gravit.launchserver.command.hash.DownloadClientCommand; @@ -86,16 +82,12 @@ public static void registerCommands(pro.gravit.utils.command.CommandHandler hand auth.registerCommand("auth", new AuthCommand(server)); auth.registerCommand("usernameToUUID", new UsernameToUUIDCommand(server)); auth.registerCommand("uuidToUsername", new UUIDToUsernameCommand(server)); - auth.registerCommand("ban", new BanCommand(server)); - auth.registerCommand("unban", new UnbanCommand(server)); - auth.registerCommand("getHWID", new GetHWIDCommand(server)); Category authCategory = new Category(auth, "auth", "User Management"); handler.registerCategory(authCategory); //Register dump commands BaseCommandCategory dump = new BaseCommandCategory(); dump.registerCommand("dumpSessions", new DumpSessionsCommand(server)); - dump.registerCommand("dumpEntryCache", new DumpEntryCacheCommand(server)); Category dumpCategory = new Category(dump, "dump", "Dump runtime data"); handler.registerCategory(dumpCategory); diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/ReconfigurableManager.java b/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/ReconfigurableManager.java index 7d1c4b5a..a949847e 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/ReconfigurableManager.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/ReconfigurableManager.java @@ -34,11 +34,11 @@ public void invoke(String... args) throws Exception { public void registerReconfigurable(String name, Reconfigurable reconfigurable) { VerifyHelper.putIfAbsent(RECONFIGURABLE, name.toLowerCase(), new ReconfigurableVirtualCommand(reconfigurable.getCommands()), - String.format("Reloadable has been already registered: '%s'", name)); + String.format("Reconfigurable has been already registered: '%s'", name)); } public void unregisterReconfigurable(String name) { - RECONFIGURABLE.remove(name); + RECONFIGURABLE.remove(name.toLowerCase()); } public void call(String name, String action, String[] args) throws Exception diff --git a/modules b/modules index 4b7ffbbd..95154a36 160000 --- a/modules +++ b/modules @@ -1 +1 @@ -Subproject commit 4b7ffbbdda9f6d0e1a5f68f9568e574b8ba551a7 +Subproject commit 95154a369e166a3aaaf3e06f015eef270b93cd75