Skip to content

Commit d468305

Browse files
committed
use false instead of null as null is interpreted as 0
1 parent b3eea10 commit d468305

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/main/java/pro/cloudnode/smp/bankaccounts/BankConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public boolean integrationsVaultEnabled() {
132132

133133
// starting-balance
134134
public @NotNull Optional<@NotNull BigDecimal> startingBalance() {
135-
if (Objects.requireNonNull(config.getString("starting-balance")).equalsIgnoreCase("null"))
135+
if (Objects.requireNonNull(config.getString("starting-balance")).equalsIgnoreCase("false"))
136136
return Optional.empty();
137137
else return Optional.of(new BigDecimal(Objects.requireNonNull(config.getString("starting-balance"))));
138138
}

src/main/resources/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ currency:
5252
format: "#,##0.00"
5353

5454
# Starting balance
55-
# Min value is 0. Set to `null` to disable creating an account on join.
55+
# Min value is 0. Set to false to disable creating an account on join.
5656
# If the Vault integration is enabled and this is set to `null`, an account with 0 balance will be created regardless.
57-
starting-balance: 0
57+
starting-balance: false
5858

5959
# Server account
6060
server-account:

0 commit comments

Comments
 (0)