Solved Storing

Discussion in 'Plugin Development' started by TheDiamond06, Apr 18, 2015.

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

    TheDiamond06

    So I have found out that the only way to store a player's balance in config is to save the config which removes the #notes. I have also heard there is a way you can store this inside of the plugin itself, but where, and how?

    How exactly would you do this.
     
  2. @TheDiamond06
    I am not sure what you want to do, but storing data in the plugin is definetly not possible, since yeah the plugin is only some lines of code. But you can use it to store something in a variable. But if you really want to store something which should survive a server restart, you need to use configs.
     
  3. Offline

    TheDiamond06

    @DoppelRR Yes, this is for server restarts so I cannot using a variable. Using the config.yml would require saving it, and since it removes the #notes, I need another method of doing this. Would I create another config and just not create it when the server starts?
     
  4. @TheDiamond06
    I actually never used Bukkits provided config, since the name already is not fitting when I want to store for example player stats, so yes I would create a customconfig and use it to store things.
     
  5. Offline

    TheDiamond06

    @DoppelRR How exactly would I get the new config I would be making. I already have the bukkit config.yml for the user to edit and stuff, but this config will be for storing things. How would I get these variables out of this config?
     
  6. @TheDiamond06
    just google "bukkit custom config" with a bit of search i found an API which supports multiple configs.
     
  7. Offline

    TheDiamond06

Thread Status:
Not open for further replies.

Share This Page