Fix town creation cost in economy mode. Fixes #289

This commit is contained in:
bloodshot 2020-10-11 15:16:37 -04:00
parent ba722f7e52
commit ff974c216d
2 changed files with 2 additions and 2 deletions

View File

@ -2916,7 +2916,7 @@ public ClaimResult build() {
} }
} }
if (!GriefDefenderPlugin.getInstance().isEconomyModeEnabled() && claim.isTown() && player != null) { if (claim.isTown() && player != null) {
final double townCost = GriefDefenderPlugin.getGlobalConfig().getConfig().town.cost; final double townCost = GriefDefenderPlugin.getGlobalConfig().getConfig().town.cost;
if (townCost > 0) { if (townCost > 0) {
final Economy economy = GriefDefenderPlugin.getInstance().getVaultProvider().getApi(); final Economy economy = GriefDefenderPlugin.getInstance().getVaultProvider().getApi();

View File

@ -2962,7 +2962,7 @@ public ClaimResult build() {
} }
} }
if (!GriefDefenderPlugin.getInstance().isEconomyModeEnabled() && claim.isTown() && player != null) { if (claim.isTown() && player != null) {
final double townCost = GriefDefenderPlugin.getGlobalConfig().getConfig().town.cost; final double townCost = GriefDefenderPlugin.getGlobalConfig().getConfig().town.cost;
if (townCost > 0) { if (townCost > 0) {
Account playerAccount = GriefDefenderPlugin.getInstance().economyService.get().getOrCreateAccount(player.getUniqueId()).orElse(null); Account playerAccount = GriefDefenderPlugin.getInstance().economyService.get().getOrCreateAccount(player.getUniqueId()).orElse(null);