Hello, Please someone can tell me how to make coin system in minigame, when you kill player to your coins adds 10 coins. Coins you can see with command /pp coins and you can spend your coins in shop.
On player join, do this (on my phone so go easy on me) getConfig().set(event.getPlayer().getName().toLowerCase() + "coins", 0); If you don't want it in the config, then just make a settings manager etc. Next you want to add 10 coins when event (x) happens. So do this: int i = getConfig().getInt(event.getPlayer().getName().toLowerCase() + "coins"); getConfig().set(event.getPlayer().getName().toLowerCase() + "coins", i + 10); And finally to check a players balance you just do player.sendMessage("balance: " + i); Making an actual shop will be quite hard though. What kind of shop will it be?
Then it shouldnt be that hard. Go ahead and get started on the economy then when you get to the shop part go ahead and make another thread or send me a pm
krists23 Use a database to store an int, and subtract or add the players int whenever an event is ran.
A better idea is to make a hashmap with the playername and the amount of coins which will be increased by killing a player and when the minigame is over store it into the database, much faster