Guest User

Untitled

a guest
Mar 3rd, 2017
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. package costela.roleplay.Economy;
  2.  
  3. import costela.roleplay.Main;
  4.  
  5. public class SLAPI {
  6.  
  7. private static Main plugin = EconManager.getPlugin();
  8.  
  9. public static void saveBalance() {
  10. for(String p : EconManager.getBalanceMap().keySet()) {
  11. plugin.getConfig().set("balances."+p, EconManager.getBalanceMap().get(p));
  12. }
  13. plugin.saveConfig();
  14. }
  15.  
  16. public static void loadBalance() {
  17. if(!plugin.getConfig().contains("balance")) return;
  18. for(String s : plugin.getConfig().getConfigurationSection("balance").getKeys(false)){
  19. EconManager.setBalance(s, plugin.getConfig().getDouble("balance."+s));
  20. }
  21. }
  22.  
  23. }
Add Comment
Please, Sign In to add comment