Java Properties class

Discussion in 'Plugin Development' started by Skionz, Nov 9, 2014.

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

    Skionz

    Alright so last night I discovered the built in Properties class https://docs.oracle.com/javase/7/docs/api/java/util/Properties.html and I have to say it is very simple to use and is pretty much like the bukkit config api. Is there any reason not to save data using ".properties" files? Just need to make sure its a good idea to use it.
     
  2. Offline

    Dudemister1999

    Skionz I suppose it just comes down to preference. Personally, I like the configuration API that Bukkit comes with. Lots of built-in functions I can rely on. But I might check out Properties.
     
  3. Offline

    teej107

    Skionz It's good to use what the API provides. In the end, I would find it very annoying dealing with a mix of both yml files and property files from plugins.
     
  4. Offline

    Skionz

    teej107 Dudemister1999 Yea Ill probably stick to the FileConfiguration api but it will be really useful for project unrelated to bukkit. I already wrote an api to make Property files easier to use but the only thing I don't like is the timestamp comment whenever you edit it
     
  5. Offline

    _Filip

    Thanks for this :) Also where can I find your api?
     
  6. Offline

    Skionz

    _Filip Its not completely finished but I have all the main stuff. I'm fixing the annoying timestamps right now
     
  7. Offline

    _Filip

    Skionz Could I help possibly?
     
  8. Offline

    Skionz

    _Filip There isn't much to do I just hate using try and catch because it just makes it harder to read in my opinion
     
  9. Offline

    teej107

    Skionz Just throw. Then you don't need to try and catch.
     
  10. Offline

    Skionz

    teej107 Good point xD I guess I've just been bored. Nothing better to do
     
  11. Offline

    ChipDev

    Bukkit has its own YAML FileConfiguration for a reason, its an easier way to do it,
    On the other hand, .properties is good for non-bukkit projects!
     
  12. ChipDev
    Isn't this exactly what the OP said?
     
  13. Offline

    ChipDev

    Yes, but making sure
     
  14. Offline

    Skionz

  15. Offline

    _Filip

    Skionz Holy crap dude cache your values...
     
  16. Offline

    teej107

    Skionz DataList could have been an actual ArrayList rather than an object that contains an ArrayList. Just sayin'
     
  17. Offline

    Skionz

    teej107 likes this.
Thread Status:
Not open for further replies.

Share This Page