public void createGlobalShopAccount() { HyperConomy hc = HyperConomy.hc; Log l = hc.getLog(); String globalaccount = hc.gYH().gFC("config").getString("config.global-shop-account"); if (hc.useExternalEconomy()) { if (!hc.getEconomy().hasAccount(globalaccount)) { getHyperPlayer(globalaccount) .setBalance(hc.gYH().gFC("config").getDouble("config.initialshopbalance")); l.writeAuditLog( globalaccount, "setbalance", hc.gYH().gFC("config").getDouble("config.initialshopbalance"), hc.getEconomy().getName()); } } else { if (!hasAccount(globalaccount)) { createPlayerAccount(globalaccount); getHyperPlayer(globalaccount) .setBalance(hc.gYH().gFC("config").getDouble("config.initialshopbalance")); l.writeAuditLog( globalaccount, "setbalance", hc.gYH().gFC("config").getDouble("config.initialshopbalance"), "HyperConomy"); } } }
public boolean hasAccount(String name) { if (hc.useExternalEconomy()) { if (hc.getEconomy().hasAccount(name)) { if (!hyperPlayers.containsKey(fixpN(name))) { addPlayer(name); } return true; } else { return false; } } else { return hyperPlayers.containsKey(fixpN(name)); } }