Ejemplo n.º 1
0
 public static String[] getMapNames(FileConfiguration fileConfiguration) {
   String[] names = new String[getConfigMapsCount(fileConfiguration)];
   if (ConfigFactory.getKeysUnderPath("settings.maps", false, fileConfiguration) != null) {
     ConfigFactory.getKeysUnderPath("settings.maps", false, fileConfiguration).toArray(names);
   }
   return names;
 }
Ejemplo n.º 2
0
 public static int getConfigMapsCount(FileConfiguration fileConfiguration) {
   int n = 0;
   if (ConfigFactory.getKeysUnderPath("settings.maps", false, fileConfiguration) == null) {
     return 0;
   }
   n = ConfigFactory.getKeysUnderPath("settings.maps", false, fileConfiguration).size();
   return n;
 }