mirror of
https://e.coding.net/circlecloud/MiaoBoard.git
synced 2024-11-22 01:49:05 +00:00
feat: 修复命令失效问题 修复首行丢失问题
Signed-off-by: 502647092 <admin@yumc.pw>
This commit is contained in:
parent
73c39d110a
commit
00f4fa540a
2
pom.xml
2
pom.xml
@ -81,7 +81,7 @@
|
||||
<properties>
|
||||
<update.description></update.description>
|
||||
<update.changes></update.changes>
|
||||
<env.GIT_COMMIT>DEBUG</env.GIT_COMMIT>
|
||||
<env.GIT_COMMIT>DEV</env.GIT_COMMIT>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
<repositories>
|
||||
|
@ -16,9 +16,6 @@
|
||||
# -----保留所有属性
|
||||
-keepattributes **
|
||||
|
||||
# -----公共数据不混淆-----
|
||||
-keep class cn.citycraft.CommonData.** {*;}
|
||||
|
||||
# -----保护所有实体中的字段名称-----
|
||||
-keepclassmembers class * implements java.io.Serializable { <fields>; }
|
||||
|
||||
@ -37,13 +34,13 @@
|
||||
}
|
||||
|
||||
# -----保护配置注入不被清理-----
|
||||
-keepclassmembers class * extends **.config**Inject** {
|
||||
-keepclassmembers class * extends **.config.inject.Inject** {
|
||||
<fields>;
|
||||
}
|
||||
|
||||
# -----保护注解命令方法不被清理-----
|
||||
-keepclassmembers class **.commands.annotation.** {<methods>;}
|
||||
-keepclassmembers class * implements **.commands**CommandExecutor { <methods>; }
|
||||
-keepclassmembers class * implements **.commands.interfaces.Executor {<methods>;}
|
||||
|
||||
# -----保护注解NotProguard标记-----
|
||||
-keep class **.NotProguard
|
||||
|
@ -51,7 +51,7 @@ public class MiaoBoard extends JavaPlugin implements Executor {
|
||||
@Override
|
||||
public void onEnable() {
|
||||
scoreBoardManager.start();
|
||||
new CommandSub("mb").register(this);
|
||||
new CommandSub("mb", this);
|
||||
new PlayerListener();
|
||||
}
|
||||
|
||||
|
@ -22,6 +22,7 @@ public class SiderbarBoardPage extends BoardPage {
|
||||
|
||||
private static final List<ChatColor> colors = Arrays.asList(ChatColor.values()); //所有颜色
|
||||
private final List<BoardLine> boardLines = new ArrayList<>();// "行"
|
||||
private int maxLine;//用于标注最大行数
|
||||
|
||||
public SiderbarBoardPage() {
|
||||
super();
|
||||
@ -63,13 +64,16 @@ public class SiderbarBoardPage extends BoardPage {
|
||||
if (suffix != null) {
|
||||
boardLine.getTeam().setSuffix(suffix);//"设置后16个字符"
|
||||
}
|
||||
maxLine = line + 1;
|
||||
}
|
||||
|
||||
//all 5 [0 1 2 3 4] maxLine = 5 all 3 [0 1 2] maxLine=4
|
||||
public void clear(int size) {
|
||||
if (size < boardLines.size()) {
|
||||
for (int i = size; i < boardLines.size(); i++) {
|
||||
if (maxLine > size) {
|
||||
for (int i = size; i < maxLine; i++) {
|
||||
removeLine(i);
|
||||
}
|
||||
maxLine = size;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user