Archived
0

optimize code

This commit is contained in:
2019-02-26 19:28:26 +03:00
parent 07e8e0c366
commit a5bdedbc19

View File

@@ -139,17 +139,11 @@ public class Manager {
}
public List<String> getAllTerrs() {
List<String> terrs = new ArrayList<>();
for(String t : fileConfiguration.getConfigurationSection("TERRITORIES").getKeys(false))
terrs.add(t);
return terrs;
return new ArrayList<>(fileConfiguration.getConfigurationSection("TERRITORIES").getKeys(false));
}
public List<String> getCages() {
List<String> cages = new ArrayList<>();
for(String c : fileConfiguration.getConfigurationSection("CAGES").getKeys(false))
cages.add(c);
return cages;
return new ArrayList<>(fileConfiguration.getConfigurationSection("CAGES").getKeys(false));
}
public List<Integer> getPointCage(String cage) {