handle no json error
This commit is contained in:
parent
b9a5edab1a
commit
8565d6e5ea
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user