Inside config

Discussion in 'Plugin Development' started by GijsCo, Feb 20, 2017.

Thread Status:
Not open for further replies.
  1. I was wondering if there was a way to create a file inside a plugin. So you can store data in it. So like a normal .yml file but that inside the plugin so the user will not see this file.
     
  2. Offline

    Zombie_Striker

    @GijsCo
    Nope. You cannot edit files inside of jars. You can read them, but not write to them.

    Also, why would it have to be invisible to the player? What are you trying to hide in there? There is most likely a better way then that.
     
  3. Offline

    timtower Administrator Administrator Moderator

    @GijsCo Don't do that please, then he also won't be able to clear all data without knowing how
     
  4. @Zombie_Striker Maybe when you save password for each player? It can also been that the player maybe use his normal mc password and that the owner that can't see.
     
  5. Offline

    timtower Administrator Administrator Moderator

    Then you hash it, then nobody knows what it says without having spend hours and hours trying to crack it.
     
  6. That is a option but if you close your server than you lose all your data or you save it in a file but the can read that.
     
  7. Offline

    timtower Administrator Administrator Moderator

    Code:
    85f899c7ad8f988c52703c031b53ff9e
    That is a hash, feel free to try and crack what it says.
    Hashing means encrypting without being able to decrypt by other means but brute force.

    I don't mind having a config full off those lines, do want to improve the hashing to a different method though, md5 is not good.
     
    MrGeneralQ likes this.
  8. It was more to store a hashmap or something like that when you reload the plugin. But maybe there is an other way for that?? Because i just want to save a interger and a hashmap with players and integers.

    If there is no other way i will just create a yml file when you reload and put the hashmaps and integers in there. When the plugin will enable i will just delete that yml file! But if there is onother way. I would really approcatre it.
     
  9. Offline

    timtower Administrator Administrator Moderator

    @GijsCo Integer is a regular set method.
    Hashmap will require a loop over the map for saving and one over all the keys in the config for loading.
     
  10. I know that ^^. But inwas wondering to save it in other way than an yml file
     
  11. Offline

    timtower Administrator Administrator Moderator

    @GijsCo SQL, JSON, XML, loads of things to use.
     
  12. Oh ...... Completly forgot that...... Long time ago that I did plugins ^^ thanks btw!
     
Thread Status:
Not open for further replies.

Share This Page