Reading from a separate config file
I am trying to create a bukkit plugin. I need to be able to read from a separate config file but do not know how.
I am trying to use a JSON parser to read from a file but I only need a specific line of the file. Would this work?:
JSONParser parser = new JSONParser();
Object obj = parser.parse(new FileReader("/plugins/easyRace/config.yml"));
JSONObject jsonObject = (JSONObject) obj;
String Races = jsonObject.get(var "Races:");
Re: Reading from a separate config file
That's no question to ask in a forum. Create a simple command line Java application, add that code into it, try it out. If it blows up, read the error, research the error, fix it. Then when you have it working, transfer the code to your bukkit plugin.