/** * Read string list from config and call feedCommands(tree, list). * * @param tree * @param config * @param configPath * @param clear If to clear the tree before inserting anything. */ public static void feedCommands(SimpleCharPrefixTree tree, ConfigFile config, String configPath, boolean clear) { final List<String> prefixes = config.getStringList(configPath); if (prefixes != null) { feedCommands(tree, prefixes, clear); } }
public MetaDataListCheck(final ConfigFile config, final String pathActive, final String pathKeys) { this(config.getBoolean(pathActive) ? config.getStringList(pathKeys) : null); }
private void setupCommandProtection() { // TODO: Might re-check with plugins enabling during runtime (!). // Read lists and messages from config. final ConfigFile config = ConfigManager.getConfigFile(); // (Might add options to invert selection.) // "No permission". // TODO: Could/should set permission message to null here (server default), might use keyword "default". final List<String> noPerm = config.getStringList(ConfPaths.PROTECT_PLUGINS_HIDE_NOPERMISSION_CMDS); if (noPerm != null && !noPerm.isEmpty()) { final String noPermMsg = ColorUtil.replaceColors(ConfigManager.getConfigFile().getString(ConfPaths.PROTECT_PLUGINS_HIDE_NOPERMISSION_MSG)); // Setup and add changes to history for undoing. changedCommands.addAll(PermissionUtil.protectCommands( Permissions.FILTER_COMMAND.getLowerCaseStringRepresentation(), noPerm, true, false, noPermMsg)); } // "Unknown command", override the other option. final List<String> noCommand = config.getStringList(ConfPaths.PROTECT_PLUGINS_HIDE_NOCOMMAND_CMDS); if (noCommand != null && !noCommand.isEmpty()) { final String noCommandMsg = ColorUtil.replaceColors(ConfigManager.getConfigFile().getString(ConfPaths.PROTECT_PLUGINS_HIDE_NOCOMMAND_MSG)); // Setup and add changes to history for undoing. changedCommands.addAll(PermissionUtil.protectCommands( Permissions.FILTER_COMMAND.getLowerCaseStringRepresentation(), noCommand, true, false, noCommandMsg)); } }
boolean error = false; for (final String input : config.getStringList(ConfPaths.COMBINED_INVULNERABLE_IGNORE)){ final String normInput = input.trim().toUpperCase(); try{
types = config.getStringList(ConfPaths.MOVING_VEHICLE_IGNOREDVEHICLES);