Use the correct config value for cost-to-open
This commit changes payToOpen to use the correct value from the config as well as the default value listed in the config instead of the default value for payToCreate.
This commit is contained in:
@@ -49,7 +49,7 @@ public class EconomyOperations {
|
|||||||
if (UUIDVaultManager.getInstance().vaultExists(player.getUniqueId(), number)) {
|
if (UUIDVaultManager.getInstance().vaultExists(player.getUniqueId(), number)) {
|
||||||
return payToCreate(player);
|
return payToCreate(player);
|
||||||
} else {
|
} else {
|
||||||
double cost = BUKKIT_CONFIG.getDouble("economy.cost-to-create", 100);
|
double cost = BUKKIT_CONFIG.getDouble("economy.cost-to-open", 10);
|
||||||
EconomyResponse resp = PlayerVaults.getInstance().getEconomy().withdrawPlayer(player.getName(), cost);
|
EconomyResponse resp = PlayerVaults.getInstance().getEconomy().withdrawPlayer(player.getName(), cost);
|
||||||
if (resp.transactionSuccess()) {
|
if (resp.transactionSuccess()) {
|
||||||
player.sendMessage(Lang.TITLE.toString() + Lang.COST_TO_OPEN.toString().replaceAll("%price", "" + cost));
|
player.sendMessage(Lang.TITLE.toString() + Lang.COST_TO_OPEN.toString().replaceAll("%price", "" + cost));
|
||||||
|
|||||||
Reference in New Issue
Block a user