This plugin allows you to integrate an efficient currency system into your system.
Discord:
https://discord.com/invite/FaHcQnunFp
To display coins in scoreboards etc use this placeholder with PlaceholderAPI:
%coinsystem_balance%
Cheap MC Server:
Click
![[IMG]](/proxy/image?url=http%3A%2F%2F134.255.218.37%2Fextern%2Fspigotmc%2Fcoin_system%2Fspacer_api.png)
Don't forget to depend my plugin in your plugin.yml, if you want to use my api.
Code (Text):
name: YourPlugin
main: path
version: 1.0
description: Info
depend: [CoinSystem]
Code (Text):
CoinApi.isCacheActive()
CoinApi.getForcedLivePlayerBalance(uuid); //Database coins
CoinApi.getPlayerBalance(uuid); //Cache if active otherwise Database coins
CoinApi.getUUID(playerName);
CoinApi.updatePlayerBalance(uuid, TransactionType.ADD/REMOVE, 5);
CoinPlayer coinPlayer = new CoinPlayer(uuid);
//Get Stats
coinPlayer.getCoinPlayerBalance();
coinPlayer.getForcedLiveBalance();
coinPlayer.getPlayer();
coinPlayer.getDatabaseId();
coinPlayer.getName();
coinPlayer.getUuid();
coinPlayer.isOnline();
//Update Stats
coinPlayer.setCoinPlayerBalance(new_balance);
coinPlayer.updateCoinPlayerBalance(TransactionType.ADD/REMOVE, value);
//Save
coinPlayer.exportPlayerDataToDatabase();
![[IMG]](/proxy/image?url=http%3A%2F%2F134.255.218.37%2Fextern%2Fspigotmc%2Fcoin_system%2Fspacer_commands.png)
- /updatecoins <name,uuid> <amount> | system.commands.coins.update
- /pay <name,uuid> <amount> | system.commands.coins.pay
- /coins [name,uuid] |
system.commands.coins.display &&
system.commands.coins.display.others
- /coinlog [payments,update_coins] [name or uuid] |
system.commands.coinlog |
system.commands.coinlog.cache |
system.commands.coinlog.payments |
system.commands.coinlog.update_coins
- /topcoins |
system.commands.coins.top
Pros:
- MySQL
- JSON Files
- 1 own Event
- - PlayerPayPlayerEvent
- All Commands editable
- No command registered in the PluginYML
- Files update automatically when an update is installed by you, if we should change something in the configs.
- Pay limit ( Permissions )
- Default Balance editable for newbies
- Cache
![[IMG]](/proxy/image?url=http%3A%2F%2F134.255.218.37%2Fextern%2Fspigotmc%2Fcoin_system%2Fspacer_examples.png)
Code (Text):
@EventHandler
public void onPlayerPayPlayerEvent(PlayerPayPlayerEvent event)
{
Bukkit.getConsoleSender().sendMessage("PlayerPayPlayerEvent");
CoinPlayer coinPlayer = event.getCoinPlayer();
CoinPlayer coinTargetPlayer = event.getCoinTargetPlayer();
int payedCoins = event.getPayedCoins();
Bukkit.getConsoleSender().sendMessage("[LOG] " + coinPlayer.getName() + " has payed " + payedCoins + " coins to " + coinTargetPlayer.getName() + ".");
Bukkit.getConsoleSender().sendMessage("");
Bukkit.getConsoleSender().sendMessage("Account comparisons:");
Bukkit.getConsoleSender().sendMessage("Payer old: " + event.getOldCoinBalance());
Bukkit.getConsoleSender().sendMessage("Payer new: " + event.getNewCoinBalance());
Bukkit.getConsoleSender().sendMessage("");
Bukkit.getConsoleSender().sendMessage("Receiver old: " + event.getTargetOldCoinBalance());
Bukkit.getConsoleSender().sendMessage("Receiver new: " + event.getTargetNewCoinBalance());
}
Terms of Service:
You are not allowed to publish my code in any other form.
Errors are not written in a review but can be posted via private message or discussion.
You are not permitted to sell, give or redistribute this plugin
You can't claim this plugin as your own
![[IMG]](/proxy/image?url=https%3A%2F%2Fjspngs.de%2Fimages%2FsLmQ.png)