CoinAPI
This CoinsAPI is
not a normal CoinAPI.
It has many Features that other CoinsAPIs don't have.
Features:
MySQL => All of the players Coins are stored in the Database.
This means that they can be called up on any Server provided the same Database is entered.
UUID Support => The players saved in the Database by
their UUID. So it isn't a problem if a player changes his name.
You want more Features? Then write it in the Comments...
API:
CoindAPI.dataContainsUserCoins(UUID UUID)
returns Boolean
CoindAPI.getCoins(UUID UUID) returns Double
CoindAPI.serCoins(UUID UUID, Double coins)
returns void
CoindAPI.addCoins(UUID UUID, Double coins)
returns void
CoindAPI.hasCoins(UUID UUID, Double coins)
returns Boolean
CoindAPI.removeCoins(UUID UUID, Double coins)
returns void
CoindAPI.insertCoins(UUID UUID, Double coins)
returns void
Plugins with this API:
- If your Plugin use this API write it in the comments i will add that as soon as possible
Usage Example:
Code (Java):
@EventHandler
public
void joinevent
(PlayerJoinEvent event
)
{
Player player
= event.
getPlayer
(
)
;
//If player is in databank
if
(
!coinAPI.
dataContainsUserCoins
(player.
getUniqueId
(
)
)
)
{
//Insert Player in databank with 1000.00 Coins
coinAPI.
insertCoins
(player.
getUniqueId
(
),
1000.00
)
;
}
}