mirror of
https://e.coding.net/circlecloud/MiaoBoard.git
synced 2024-11-22 01:49:05 +00:00
fix: 修复getScore()方法参数不得大于40字符的错误
Signed-off-by: 502647092 <admin@yumc.pw>
This commit is contained in:
parent
a5a581ec75
commit
840dd57056
@ -8,6 +8,7 @@ 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;
|
||||
@ -28,7 +29,7 @@ public class BodyUpdater extends CallBackReturn.One<Player, List<String>> {
|
||||
if (param.hasPermission(bmodel.permission)) {
|
||||
final List<String> 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;
|
||||
}
|
||||
|
@ -5,6 +5,7 @@ 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;
|
||||
@ -23,7 +24,7 @@ public class TitleUpdater extends CallBackReturn.One<Player, String> {
|
||||
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 "";
|
||||
|
Loading…
Reference in New Issue
Block a user