handle no json error

This commit is contained in:
Joseph Garcia 2021-01-28 09:17:18 -06:00
parent b9a5edab1a
commit 8565d6e5ea

View File

@ -74,14 +74,11 @@ public class ConfigFile {
for (int i = 0; i < array.size(); i++) {
JSONObject childObject = (JSONObject)array.get(i);
commandObjects.add(childObject);
System.out.println(i);
if (i >= 19) break;
}
return commandObjects;
} catch (IOException e) {
e.printStackTrace();
} catch (ParseException e) {
e.printStackTrace();
} catch (IOException | ParseException e) {
System.out.println("Commands.json not yet initialized!");
}
return null;
}