diff --git a/src/main/java/net/pingex/dcf/commands/CommandRegistry.java b/src/main/java/net/pingex/dcf/commands/CommandRegistry.java index a54f19e..112830b 100644 --- a/src/main/java/net/pingex/dcf/commands/CommandRegistry.java +++ b/src/main/java/net/pingex/dcf/commands/CommandRegistry.java @@ -36,13 +36,6 @@ public class CommandRegistry LOGGER.info("Registering command {}.", toRegister.getName()); commandSet.add(toRegister); - - // Check for conflicting aliases - toRegister.getAliases().stream().filter(CommandRegistry::aliasExists).forEach(i -> - { - LOGGER.warn("Conflicting alias {} for command {}, removing. (original command: {})", i, toRegister.getName(), getAliasByName(i).get().getName()); - toRegister.getAliases().remove(i); - }); } /** @@ -76,6 +69,15 @@ public class CommandRegistry LOGGER.info("Removed command {}.", toUnregister.getName()); } + /** + * Get the current state of the registry. + * @return RO set of the bank. + */ + public static Set getRegistry() + { + return Collections.unmodifiableSet(commandSet); + } + /** * Tells if the command is registered (excluding aliases). * @param commandName Target command