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++) {
|
for (int i = 0; i < array.size(); i++) {
|
||||||
JSONObject childObject = (JSONObject)array.get(i);
|
JSONObject childObject = (JSONObject)array.get(i);
|
||||||
commandObjects.add(childObject);
|
commandObjects.add(childObject);
|
||||||
System.out.println(i);
|
|
||||||
if (i >= 19) break;
|
if (i >= 19) break;
|
||||||
}
|
}
|
||||||
return commandObjects;
|
return commandObjects;
|
||||||
} catch (IOException e) {
|
} catch (IOException | ParseException e) {
|
||||||
e.printStackTrace();
|
System.out.println("Commands.json not yet initialized!");
|
||||||
} catch (ParseException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user