Accessing text files outside of the jar?

Discussion in 'Plugin Development' started by mjmr89, Jan 18, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    mjmr89

    I want to make my own simple warp command plugin, and I was wondering how I'd make/access/edit something like a warp.txt from the plugin, if thats even possible yet?
     
  2. Offline

    ScottieD

    File fileName = new File("file.txt");
    Scanner file;
    try {
    file = new Scanner(fileName);
    } catch (FileNotFoundException e) {
    //do something else.
    }

    I think this will work.
     
  3. Offline

    mjmr89

    Oh, I feel like an idiot. I forgot that the path would be that simple, and not anything about going back a level or two like I thought it would at first.
     
  4. Offline

    Plague

    Well you really should use the "folder" argument of your initializastion function, becouse writing into the root of server is a bad habit.
     
Thread Status:
Not open for further replies.

Share This Page