diff --git a/src/main/java/pw/yumc/MiaoBoard/scoreboard/updater/BodyUpdater.java b/src/main/java/pw/yumc/MiaoBoard/scoreboard/updater/BodyUpdater.java index f65f6dd..2d9e3d5 100644 --- a/src/main/java/pw/yumc/MiaoBoard/scoreboard/updater/BodyUpdater.java +++ b/src/main/java/pw/yumc/MiaoBoard/scoreboard/updater/BodyUpdater.java @@ -8,13 +8,14 @@ import java.util.List; import org.bukkit.entity.Player; import cn.citycraft.PluginHelper.callback.CallBackReturn; +import cn.citycraft.PluginHelper.kit.StrKit; import cn.citycraft.PluginHelper.pluginapi.PluginAPI; import pw.yumc.MiaoBoard.model.BoardModel; import pw.yumc.MiaoBoard.scoreboard.ScoreBoardManager; /** * 记分板行更新类 - * + * * @since 2016年7月4日 下午4:47:17 * @author 喵♂呜 */ @@ -28,7 +29,7 @@ public class BodyUpdater extends CallBackReturn.One> { if (param.hasPermission(bmodel.permission)) { final List temp = new LinkedList<>(); for (final String line : bmodel.lines) { - temp.add(PluginAPI.PlaceholderAPI(param, line)); + temp.add(StrKit.substring(PluginAPI.PlaceholderAPI(param, line), 0, 40)); } return temp; } diff --git a/src/main/java/pw/yumc/MiaoBoard/scoreboard/updater/TitleUpdater.java b/src/main/java/pw/yumc/MiaoBoard/scoreboard/updater/TitleUpdater.java index dbcf268..4b87d91 100644 --- a/src/main/java/pw/yumc/MiaoBoard/scoreboard/updater/TitleUpdater.java +++ b/src/main/java/pw/yumc/MiaoBoard/scoreboard/updater/TitleUpdater.java @@ -5,13 +5,14 @@ import java.util.Iterator; import org.bukkit.entity.Player; import cn.citycraft.PluginHelper.callback.CallBackReturn; +import cn.citycraft.PluginHelper.kit.StrKit; import cn.citycraft.PluginHelper.pluginapi.PluginAPI; import pw.yumc.MiaoBoard.model.BoardModel; import pw.yumc.MiaoBoard.scoreboard.ScoreBoardManager; /** * 记分板标题更新类 - * + * * @since 2016年7月4日 下午4:47:17 * @author 喵♂呜 */ @@ -23,7 +24,7 @@ public class TitleUpdater extends CallBackReturn.One { while (iterator.hasNext()) { final BoardModel bmodel = iterator.next(); if (param.hasPermission(bmodel.permission)) { - return PluginAPI.PlaceholderAPI(param, bmodel.title); + return StrKit.substring(PluginAPI.PlaceholderAPI(param, bmodel.title), 0, 40); } } return "";