Creating a currency

Discussion in 'Plugin Development' started by ThatGuyWhoDied13, Dec 3, 2013.

Thread Status:
Not open for further replies.
  1. Hey guys, I have searched google and other places but I can't find how to create my own currency in bukkit. I want a command to add and remove certain amounts of coins and a way to display how many coins you have in a scoreboard. I have already made the commands and the scoreboard I just need to know how to make a currency.
    Thankyou
     
  2. Offline

    1Rogue Retired Staff

    Code:java
    1. Map<String, Integer> money = new HashMap<>();
     
    KevyPorter likes this.
  3. 1Rogue ah a hashmap didn't think of that. Thankyou
     
  4. Offline

    RainoBoy97

    You could also save it to a file, load onEnable and save onDisable. And cache the data in a hashmap like 1Rogue showed.
     
Thread Status:
Not open for further replies.

Share This Page