🟢UserCoins

This class represents the user's coins.

In the class, the coins are saved in double type.

How to create a new instance of the user?

UserCoinsFactory userCoinsFactory = MiniGame.getUserCoinsFactory();

UserCoins userCoins = userCoinsFactory.createUserCoins(player.getUniqueId());
//or with default coins
UserCoins userCoins = userCoinsFactory.createUserCoins(player.getUniqueId(), 100.0);

UserCoins methods:

double getCoins();  //Gets coins
void setCoins(double coins); //Sets coins
void addCoins(double coins); //Adds coins
void removeCoins(double coins); //Removes coins
boolean hasCoins(double coins); //Chceks when player has coins