Skip to content

Commit e74443d

Browse files
committed
fix pattern
1 parent 32f9248 commit e74443d

File tree

4 files changed

+13
-7
lines changed

4 files changed

+13
-7
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.3</version>
8+
<version>1.2.4</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.3</version>
10+
<version>1.2.4</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.3</version>
8+
<version>1.2.4</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

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

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,16 @@ public class PlaceholderTopHolder extends AutoUpdateTopHolder {
2222
public PlaceholderTopHolder(TopperPlugin instance, TopStorage topStorage, String name, String placeholder) {
2323
super(instance, topStorage, name);
2424
Matcher matcher = PATTERN.matcher(placeholder);
25-
this.placeholder = matcher.group(2);
26-
String prefix = matcher.group(1).toLowerCase(Locale.ROOT);
27-
isOnlineOnly = prefix.contains("[online]");
28-
isAsync = prefix.contains("[async]");
25+
if (matcher.matches()) {
26+
this.placeholder = matcher.group(2);
27+
String prefix = matcher.group(1).toLowerCase(Locale.ROOT);
28+
isOnlineOnly = prefix.contains("[online]");
29+
isAsync = prefix.contains("[async]");
30+
} else {
31+
this.placeholder = placeholder;
32+
isOnlineOnly = false;
33+
isAsync = false;
34+
}
2935
}
3036

3137
@Override

0 commit comments

Comments
 (0)