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