コード例 #1
0
ファイル: VaultHook.java プロジェクト: TobiDev/Villages
  @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();
  }
コード例 #2
0
ファイル: VaultHook.java プロジェクト: TobiDev/Villages
 public String formatEconomy(double amt) {
   if (!Base.useEconomy()) return "\\\\\\\\\\\\$" + amt;
   String formatted = this.getEconomy().format(amt);
   formatted = formatted.replaceAll("\\$", "\\\\\\$");
   return formatted;
 }