hello! I have an question, im stuck. I have list witch chunks: http://pastebin.com/n3477P8f And how i can get how mutch chunks Owning_Kingdom : arror Any ideas?
Code: /** * Gets all chunks belonging to kingdom from config * @param kingdom Kingdom name to search ownership * @return Set of chunks belonging to kingdom */ Set<String> getChunksByKingdom(String kingdom) { Set<String> list = new HashSet<String>(); for(Object key : getConfig().getConfigurationSection("chunks").getKeys(false).toArray()) { String chunk = key.toString(); if(getConfig().getString("chunks." + chunk + ".owning_kingdom").equalsIgnoreCase(kingdom)) list.add(chunk); } return list; } Set<String> arrows = getChunksByKingdom("arrow");