currency
Currency
Example
public class Dollar implements Currency { @Override public int getId() { return 1; } @Override public String getName() { return "Dollar"; } @Override public void onLoad() { setCurrencySymbol("$"); } }
How to create a Currency
Setup
you need to make a class thats implements Currency.
than you need to make the methodes:
- getId()
- getName()
- onLoad()
Load
The onLoad is for setting the maxMoney, minMoney and Symbol if you don't do the maxMoney, minMoney or Symbol it will get the default value in the MoneyConfig.yml
Register
to register a Currency you need to do:
CurrencyManager.registerCurrency(new Dollar()); // I prefer to do this in the onEnable
Comments