Beispiel #1
0
  @Override
  public void onUnhook() {
    super.onUnhook();
    economy = null;
    permission = null;
    chat = null;

    if (bankDeposit != null) {
      bankDeposit.deRegister();
      bankDeposit = null;
    }

    if (bankWithdraw != null) {
      bankWithdraw.deRegister();
      bankWithdraw = null;
    }
  }
Beispiel #2
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();
  }