Esempio n. 1
0
 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();
 }
Esempio n. 2
0
  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);
  }
Esempio n. 3
0
  @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();
  }
Esempio n. 4
0
 public String formatEconomy(double amt) {
   if (!Base.useEconomy()) return "\\\\\\\\\\\\$" + amt;
   String formatted = this.getEconomy().format(amt);
   formatted = formatted.replaceAll("\\$", "\\\\\\$");
   return formatted;
 }