1
0
mirror of https://e.coding.net/circlecloud/MiaoBoard.git synced 2024-12-22 06:49:02 +00:00

fix: 修复title为null的错误 修复显示问题

Signed-off-by: 502647092 <admin@yumc.pw>
This commit is contained in:
502647092 2016-09-07 22:54:32 +08:00
parent 6cc671eb89
commit 57c1c75685
3 changed files with 8 additions and 5 deletions

View File

@ -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>

View File

@ -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) {

View File

@ -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;
}