public Village() { this.bank = new Bank(this); this.plots = new ArrayList<Plot>(); this.regions = new ArrayList<Region>(); this.residents = new ArrayList<Resident>(); this.taxData = new ArrayList<TaxData>(); this.createdDate = Base.getNow(); }
public void broadcast(Player[] ignoredPlayers, Object... o) { List<Player> players = this.getOnlineResidents(); for (Player p : ignoredPlayers) { if (players.contains(p)) players.remove(p); } Base.sendAll(players, o); }
@Override public void onHook() { super.onHook(); this.setupEconomy(); if (Base.useEconomy()) { if (Base.getConfig().getBoolean("features.banks.money", true)) { bankDeposit = new VillageBankDeposit(); bankWithdraw = new VillageBankWithdraw(); } } else if (this.isHooked()) { Base.log("Hooked into Vault, but can't find any Economy!"); } // Hook Into VaultPermissions this.setupPermission(); // Hook Into VaultChat this.setupChat(); }
public String formatEconomy(double amt) { if (!Base.useEconomy()) return "\\\\\\\\\\\\$" + amt; String formatted = this.getEconomy().format(amt); formatted = formatted.replaceAll("\\$", "\\\\\\$"); return formatted; }