/** * Get a map with all the registered flags. * * <p>The flag names do not have the '-' in front of it. * * <p>If this command is a sub command this will include all the flags from the parent. * * @return Map with registered flags. */ public Map<String, Flag> getAllFlags() { if (isBase()) { return new HashMap<>(flags); } Map<String, Flag> flags = new LinkedHashMap<>(getBaseCmd().getFlags()); flags.putAll(this.flags); return flags; }
/** * Get a map with all the registered modifiers. * * <p>If this command is a sub command this will include all the modifiers from the parent. * * @return Map with registered modifiers. */ public Map<String, Modifier> getAllModifiers() { if (isBase()) { return new HashMap<>(modifiers); } Map<String, Modifier> modifiers = new LinkedHashMap<>(getBaseCmd().getModifiers()); modifiers.putAll(this.modifiers); return modifiers; }