mirror of
https://e.coding.net/circlecloud/MiaoBoard.git
synced 2024-11-22 01:49:05 +00:00
fix: 修复title为null的错误 修复显示问题
Signed-off-by: 502647092 <admin@yumc.pw>
This commit is contained in:
parent
6cc671eb89
commit
57c1c75685
2
pom.xml
2
pom.xml
@ -3,7 +3,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>pw.yumc</groupId>
|
||||
<artifactId>MiaoBoard</artifactId>
|
||||
<version>2.0</version>
|
||||
<version>2.1</version>
|
||||
<name>MiaoBoard</name>
|
||||
<description>喵式记分板</description>
|
||||
<build>
|
||||
|
@ -4,6 +4,7 @@ import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
@ -18,10 +19,11 @@ import pw.yumc.YumCore.bukkit.compatible.C;
|
||||
|
||||
public class Replace {
|
||||
public static List<String> $(final Player p, final List<String> text) {
|
||||
for (int i = 0; i < text.size(); i++) {
|
||||
text.set(i, $(p, text.get(i)));
|
||||
final List<String> temp = new LinkedList<>();
|
||||
for (final String i : text) {
|
||||
temp.add($(p, i));
|
||||
}
|
||||
return text;
|
||||
return temp;
|
||||
}
|
||||
|
||||
public static String $(final Player p, final String text) {
|
||||
|
@ -47,7 +47,8 @@ public class SidebarBoard extends Board {
|
||||
String title = null;
|
||||
if (this.getUpdateFunction().getTitleFunction() != null) {
|
||||
title = this.getUpdateFunction().getTitleFunction().run(player);
|
||||
} else {
|
||||
}
|
||||
if (title == null) {
|
||||
this.removeTarget(player);
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user