Hello!
I'm extremely stuck, I've been testing and trying for 8 hours but I'm going no where.
I need my mod to read a json file which contains information about players. I need it to be able to do this....
JSON
"Player1": [
"status": "offline",
"mode": "null",
"server": "null"
]
"Player2": [
"status": "online",
"mode": "single",
"server": "null"
]
"Player3": [
"status": "online",
"mode": "mp",
"server": "mc.Example.net"
]
JSON json = new JSON(new FileReader("file.json"));
List<String> names = new ArrayList<String>();
String line = json.getTitles(); <-- Get Player1, Player2, Player3
while(line !=null)
results.add(line);
}
--- AND ---
JSON json = new JSON(new FileReader("file.json"));
List<String> names = new ArrayList<String>();
String line = json.getOptions("status"); <-- Get Offline, Online, online (Stay in order like above)
while(line !=null)
results.add(line);
}
is this possible?