3.0latestFile UpdateNov 21, 2019 Player Coins are now saved under the UUID! Have Fun!2.0Try/Catch fixNov 14, 2019 Code (Text): public Integer getMoney(String name) { File file = new File("plugins//Money//" + name + ".yml"); FileConfiguration cfg = YamlConfiguration.loadConfiguration(file); int money = cfg.getInt(name + ".money"); return money; } public Integer getBank(String name) { File file = new File("plugins//Money//" + name + ".yml"); FileConfiguration cfg = YamlConfiguration.loadConfiguration(file); int bank = cfg.getInt(name + ".bank"); return bank; } public void addMoney(String name,int amount) { File file = new File("plugins//Money//" + name + ".yml"); FileConfiguration cfg = YamlConfiguration.loadConfiguration(file); int money = cfg.getInt(name + ".money"); money = money + amount; cfg.set(name + ".money", money); try { cfg.save(file); }catch (IOException e) { e.printStackTrace(); } } public void removeMoney(String name,int amount) { File file = new File("plugins//Money//" + name + ".yml"); FileConfiguration cfg = YamlConfiguration.loadConfiguration(file); int money = cfg.getInt(name + ".money"); money = money - amount; cfg.set(name + ".money", money); try { cfg.save(file); }catch (IOException e) { e.printStackTrace(); } } public void setMoney(String name,int amount) { File file = new File("plugins//Money//" + name + ".yml"); FileConfiguration cfg = YamlConfiguration.loadConfiguration(file); int money = cfg.getInt(name + ".money"); cfg.set(name + ".money", amount); try { cfg.save(file); }catch (IOException e) { e.printStackTrace(); } }1.0Nov 13, 2019
Similar projects
Plugin →Let Me Despawn
Improves performance by tweaking mob despawn rules. Say bye to pesky unintentional persistent mobs.
25MSueta
JourneyMap
Real-time map used for mapping in-game or your browser as you explore.
14.7MSueta
Emotecraft
Create your own emotes in Minecraft.
7.5MSueta
Simple Tpa
A simple tpa plugin which sends requests
5.4MSueta
Common Network
Forge and Fabric Unified Networking Solution
3.9MSueta
Set Home
A lightweight plugin for players to set their homes.
3.8MSueta