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:
Code (Text):
%coinsystem_balance% -Alias for %coinsystem_coins%
%coinsystem_balance_formatted% - Shows your balance with thousands separator. Example: 1,234
%coinsystem_rank% - Shows your rank by coins. Example: 5
%coinsystem_top_balance% - Highest balance on the server. Example: 10000
%coinsystem_top_balance_formatted% - Formatted. Example: 10,000
%coinsystem_top_1_name% - Name of the richest player. Example: Pentrax
%coinsystem_server_balance_total% - Total coins on the server. Example: 123456
%coinsystem_server_balance_total_formatted% - Formatted. Example: 123,456
%coinsystem_default_balance% - Default starting balance for new players. Example: 1000
%coinsystem_default_balance_formatted% - Formatted. Example: 1,000
%coinsystem_next_rank_balance% - Coins needed for the next higher rank. Example: 2500
%coinsystem_next_rank_balance_formatted% - Formatted. Example: 2,500
%coinsystem_pay_limit% - Max coins you can pay at once (from config). Example: 5000
%coinsystem_pay_limit_formatted% - Formatted. Example: 5,000
%coinsystem_total_players% - Number of players with a coin account. Example: 42
Cheap MC Server:
Click
![[IMG]](//proxy.spigotmc.org/9d3f39b9bc27346c6fd73272b653d9fe5d34ff94/687474703a2f2f3133342e3235352e3231382e33372f65787465726e2f737069676f746d632f636f696e5f73797374656d2f7370616365725f6170692e706e67)
Don't forget to depend my plugin in your plugin.yml, if you want to use my api.
Vault support:
CoinSystem automatically hooks into Vault if present and registers as an Economy provider. Vault is fully optional – CoinSystem works perfectly fine without it. If you use Vault-based plugins (like shops or jobs), they will work out of the box with CoinSystem as soon as Vault is installed.
This Plugin + Vault works perfectly with my ClanSystem!
To use the CoinSystem API in your own plugin, add this to your plugin.yml:
Code (Text):
depend: [CoinSystem]
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.spigotmc.org/0480a74b127fb0b391dcb1d4f9a753d4b62c5db2/687474703a2f2f3133342e3235352e3231382e33372f65787465726e2f737069676f746d632f636f696e5f73797374656d2f7370616365725f636f6d6d616e64732e706e67)
- /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
- 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
- SQLite, Mysql, ( Fallback SQLite )
![[IMG]](//proxy.spigotmc.org/658f30fb2cc5a8888e33d764d344130a5c1235ae/687474703a2f2f3133342e3235352e3231382e33372f65787465726e2f737069676f746d632f636f696e5f73797374656d2f7370616365725f6578616d706c65732e706e67)
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.spigotmc.org/31d10e9fd34f1b93ef9773ac11e0e62b36dbac5f/68747470733a2f2f6a73706e67732e64652f696d616765732f734c6d512e706e67)