Skip to content

Commit dd95ec9

Browse files
committed
fix Pattern for prefix
1 parent e74443d commit dd95ec9

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

core/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>topper</artifactId>
77
<groupId>me.hsgamer</groupId>
8-
<version>1.2.4</version>
8+
<version>1.2.5</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<groupId>me.hsgamer</groupId>
88
<artifactId>topper</artifactId>
99
<packaging>pom</packaging>
10-
<version>1.2.4</version>
10+
<version>1.2.5</version>
1111
<modules>
1212
<module>core</module>
1313
<module>spigot</module>

spigot/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>topper</artifactId>
77
<groupId>me.hsgamer</groupId>
8-
<version>1.2.4</version>
8+
<version>1.2.5</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

spigot/src/main/java/me/hsgamer/topper/spigot/holder/PlaceholderTopHolder.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import me.hsgamer.topper.spigot.config.MainConfig;
77
import org.bukkit.OfflinePlayer;
88

9-
import java.util.Locale;
109
import java.util.Optional;
1110
import java.util.UUID;
1211
import java.util.concurrent.CompletableFuture;
@@ -23,8 +22,8 @@ public PlaceholderTopHolder(TopperPlugin instance, TopStorage topStorage, String
2322
super(instance, topStorage, name);
2423
Matcher matcher = PATTERN.matcher(placeholder);
2524
if (matcher.matches()) {
26-
this.placeholder = matcher.group(2);
27-
String prefix = matcher.group(1).toLowerCase(Locale.ROOT);
25+
this.placeholder = Optional.ofNullable(matcher.group(2)).orElse("");
26+
String prefix = Optional.ofNullable(matcher.group(1)).map(String::toLowerCase).orElse("");
2827
isOnlineOnly = prefix.contains("[online]");
2928
isAsync = prefix.contains("[async]");
3029
} else {

0 commit comments

Comments
 (0)