Solved Simple question

Discussion in 'Plugin Development' started by JRL1004, Jul 13, 2014.

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

    JRL1004

    So, I'm working on a plugin and I was wondering if the YamlConfiguration class used by Bukkit can load a file that does not end specifically in .yml as a YamlConfiguration file. I have a rather slow computer and taking the time to boot up a server and load a plugin in to test would take way too long on my part so I am hoping that someone here know if the file would load properly or has the spare time required to quickly test for me.
     
  2. Offline

    xTigerRebornx

    JRL1004 It loads and saves fine.
    I tested it with a file extension of .storage, it works fine.
     
  3. Offline

    JRL1004

    xTigerRebornx That's awesome! I honestly didn't expect it to work without the .yml ending. Can you quickly test if it works with .txts and standard files (ones without a .<type>)? I know that standard ones would be a lot harder if you have no way of getting them which is why I asked about .txts (since they are very similar).
     
  4. Offline

    JasonDL13

  5. Offline

    JRL1004

    JasonDL13 Maybe but it's always better to test. I'd like to know that what I'm doing will work rather than to base some of my work on something untested only to have it fail.
     
  6. Offline

    JasonDL13

    JRL1004 Well the extension is a part of a file name, so that's like saying test it with every possible file namecombinations to make sure it works. It doesn't matter.
     
  7. Offline

    xTigerRebornx

    JRL1004 txt works, but spacing seems to break when opened with text editors that don't preserve spacing (Windows 7's default text editor), which is probably a problem with the text editor.
    So yes, txts work, any extension (should) work.
     
    JRL1004 likes this.
  8. Offline

    JRL1004

    Alright. That makes things a lot easier. Many thanks to you, xTigerRebornx and thanks for reinforcing the idea JasonDL13. You guys helped me out a fair amount. I'll just make sure to make a point of not trying to open any of the files (Their not meant to be opened anyway which is why I wanted to avoid the .yml ending (since some people thing you should touch those))

    Edit: Some .yml files are okay to edit but these ones I don't want edited do to how I am storing the data.
     
Thread Status:
Not open for further replies.

Share This Page