Your cart is empty
Looks like the spiders padded through here. Pick a plugin and it will show up here. Continue shoppingBoth are ordinary Bukkit events in com.phoenixplugins.phoenixcurrencies.api.events, fired on the main thread. Neither can be cancelled.
| Event | Fired when | Carries |
|---|---|---|
BalanceChangeEvent |
A balance changed, for any reason |
getPlayer() (a UUID), getCurrency(), getPrevious(), getBalance(), getReason()
|
LeaderboardRefreshEvent |
The leaderboards were worked out again |
getCurrencies(), the ids that were refreshed |
getReason() is the kind of change as a short key, such as pay, give, exchange or vault, the same kinds the translation file names under reasons. The player can be offline, so look them up with Bukkit.getPlayer(uuid) before treating them as online.
@EventHandler
public void onBalanceChange(BalanceChangeEvent event) {
if (!event.getCurrency().getId().equals("gems")) {
return;
}
Player player = Bukkit.getPlayer(event.getPlayer());
if (player != null && event.getBalance() >= 1000 && event.getPrevious() < 1000) {
player.sendMessage("You reached 1,000 gems!");
}
}
Your guide to the docs
Ask me anything about our plugins. I know these docs inside out, check the latest versions and changelogs, and can read your server logs.
Try asking
Your cart is empty
Looks like the spiders padded through here. Pick a plugin and it will show up here. Continue shopping