Economy Plugin - Not saving

Discussion in 'Plugin Development' started by mrdude123, Nov 28, 2015.

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

    mrdude123

    Hello. I'm working on a big plugin that involves its own Economy and the like. When I'm on the server, I'm able to add/subtract currency from a player's balance. However, when the server restarts, the balances are all set back to their default. Any ideas? Thanks.
     
  2. Offline

    mcdorli

    Geez, it would be nice to see that code...
     
    Zombie_Striker likes this.
  3. Offline

    Evonoucono

    All variables will be deleted when the server is disabled or reloaded. Try saving your (Hashset I assume) to a config on disable, and load them back in onEnable. There are tutorials everywhere.
     
  4. Offline

    mrdude123

    That's exactly what I did, and I still get this issue.
     
  5. Offline

    Evonoucono

    show us your code where you save the Hashset (still assuming) to the config and where you load it back up in the onEnable. I don't know if it's the best way, but sometimes I won't even make a hashset and i'll just do everything from the config and save it when I make any changes.
     
  6. Offline

    mrdude123

    @Evonoucono I'll try to put it on github, it's about 6 classes
     
  7. Offline

    mythbusterma

    @mrdude123

    6 classes just for saving and loading some numbers from your configuration? That's probably not good.
     
  8. Offline

    Evonoucono

    Are you sure you are saving the config after making any changes?
    Code:
    saveConfig();
     
  9. Offline

    Xerox262

    Are you sure that it's not saving and it's not that you're not actually loading it? Hard to tell without code.
     
Thread Status:
Not open for further replies.

Share This Page