Money system

Discussion in 'Plugin Development' started by Spadax, Apr 20, 2017.

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

    Spadax

    Hello, i would like to create a money system without config or data base. Thanks for your replies.
     
  2. Offline

    thechrisanator

    use "Vault" and any economy plugin
     
  3. Offline

    Spadax

    But I would like to create it, in my plugin. It's not possible with HashMap ?
     
    Last edited: Apr 20, 2017
  4. Offline

    Dnyce72799

    It is, but hashmaps only store data temporarily. Every time the server restarted, the data would be gone.


    Sent from my LGLS775 using Tapatalk
     
  5. Offline

    Spadax

    And how to add to interger value in hashmap ?
     
  6. Offline

    Caderape2

    @Spadax hashmap<UUID, Integer> ?

    if you want an economy system just for you plugin, you will not need vault.
     
  7. Offline

    Zombie_Striker

    @Spadax
    I think you are overlooking something:
    For an actual economy ('money system'), you need/want the amounts to be constant. Because of that, you need some way of storing that data, which requires a database or a config.

    And once you do that, why re-invent the wheel? At that point, you should just use vault.
     
  8. Offline

    Spadax

    It's for a mini game so it'is not possible without congfig or database ? @Zombie_Striker
     
  9. Offline

    Caderape2

    @Spadax This isn't hard to save and load an hashmap in a file. And no, it's not possible
     
  10. It's not possible because Java source code doesn't save data permanently

    Tapatalkkal küldve az én MediaPad T1 8.0 Pro eszközömről
     
  11. Offline

    MCMastery

    Why don't you want a config?
     
    Zombie_Striker likes this.
  12. The best and easier way to create a money is using a database.

    Im using xampp and phpmyadmin.

    By events you can add values in your database and you can collect them everywhere
     
Thread Status:
Not open for further replies.

Share This Page