Skip to content

Commit 2957753

Browse files
committed
fix: handle empty params using isBlank and release 0.2.1
1 parent f0d2446 commit 2957753

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ plugins {
77
}
88

99
group = "org.allaymc"
10-
version = "0.2.1-SNAPSHOT"
10+
version = "0.2.1"
1111
description = "EconomyAPI is a plugin that unifies all economy plugins under one single API"
1212

1313
allay {
@@ -23,7 +23,7 @@ allay {
2323

2424
dependencies {
2525
compileOnly(group = "org.projectlombok", name = "lombok", version = "1.18.34")
26-
compileOnly(group = "org.allaymc", name = "papi", version = "0.1.1")
26+
compileOnly(group = "org.allaymc", name = "papi", version = "0.1.2")
2727
annotationProcessor(group = "org.projectlombok", name = "lombok", version = "1.18.34")
2828
}
2929

src/main/java/org/allaymc/economyapi/Entrance.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ protected void registerPlaceholders() {
3939
var api = EconomyAPI.getAPI();
4040
var account = api.getOrCreateAccount(player.getUniqueId());
4141
Currency currency;
42-
if (params == null) {
42+
if (params.isBlank()) {
4343
currency = api.getDefaultCurrency();
4444
} else {
4545
currency = api.getCurrency(params);
@@ -57,7 +57,7 @@ protected void registerPlaceholders() {
5757
});
5858
papi.registerPlaceholder(this, "currency_plural_name", (player, params) -> {
5959
var api = EconomyAPI.getAPI();
60-
if (params == null) {
60+
if (params.isBlank()) {
6161
return api.getDefaultCurrency().getPluralName();
6262
} else {
6363
var currency = api.getCurrency(params);
@@ -70,7 +70,7 @@ protected void registerPlaceholders() {
7070
});
7171
papi.registerPlaceholder(this, "currency_symbol", (player, params) -> {
7272
var api = EconomyAPI.getAPI();
73-
if (params == null) {
73+
if (params.isBlank()) {
7474
return api.getDefaultCurrency().getSymbol();
7575
} else {
7676
var currency = api.getCurrency(params);

0 commit comments

Comments
 (0)