public Map<String, Object> getConfigMap(String node) { if (config.isConfigurationSection("info." + node)) { return config.getConfigurationSection("info." + node).getValues(true); } return new HashMap<String, Object>(); }
public Set<String> getConfigKeys() { if (config.isConfigurationSection("info")) { return config.getConfigurationSection("info").getKeys(true); } return new HashSet<String>(); }
private Map<String, Object> _getPowertools() { if (config.isConfigurationSection("powertools")) { return config.getConfigurationSection("powertools").getValues(false); } return new HashMap<String, Object>(); }
private Map<String, Long> _getKitTimestamps() { if (config.isConfigurationSection("timestamps.kits")) { final ConfigurationSection section = config.getConfigurationSection("timestamps.kits"); final Map<String, Long> timestamps = new HashMap<String, Long>(); for (String command : section.getKeys(false)) { if (section.isLong(command)) { timestamps.put(command.toLowerCase(Locale.ENGLISH), section.getLong(command)); } else if (section.isInt(command)) { timestamps.put(command.toLowerCase(Locale.ENGLISH), (long)section.getInt(command)); } } return timestamps; } return new HashMap<String, Long>(); }