mirror of
https://e.coding.net/circlecloud/MiaoBoard.git
synced 2024-11-21 01:39: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>
|
||||
|
@ -6,7 +6,7 @@
|
||||
-dontnote
|
||||
|
||||
# -----混淆时应用侵入式重载-----
|
||||
-overloadaggressively
|
||||
-overloadaggressively
|
||||
|
||||
# -----启用混淆字典-----
|
||||
-obfuscationdictionary obf.dict
|
||||
@ -16,39 +16,36 @@
|
||||
# -----保留所有属性
|
||||
-keepattributes **
|
||||
|
||||
# -----公共数据不混淆-----
|
||||
-keep class cn.citycraft.CommonData.** {*;}
|
||||
|
||||
# -----保护所有实体中的字段名称-----
|
||||
-keepclassmembers class * implements java.io.Serializable { <fields>; }
|
||||
|
||||
# -----保护监听方法不被清理-----
|
||||
-keepclassmembers class * implements org.bukkit.event.Listener {
|
||||
@org.bukkit.event.EventHandler <methods>;
|
||||
@org.bukkit.event.EventHandler <methods>;
|
||||
}
|
||||
-keepclassmembers class * implements net.md_5.bungee.api.plugin.Listener {
|
||||
@net.md_5.bungee.event.EventHandler <methods>;
|
||||
@net.md_5.bungee.event.EventHandler <methods>;
|
||||
}
|
||||
|
||||
# -----保护枚举方法的完整性-----
|
||||
-keepclassmembers enum * {
|
||||
public static **[] values();
|
||||
public static ** valueOf(java.lang.String);
|
||||
public static **[] values();
|
||||
public static ** valueOf(java.lang.String);
|
||||
}
|
||||
|
||||
# -----保护配置注入不被清理-----
|
||||
-keepclassmembers class * extends **.config**Inject** {
|
||||
<fields>;
|
||||
-keepclassmembers class * extends **.config.inject.Inject** {
|
||||
<fields>;
|
||||
}
|
||||
|
||||
# -----保护注解命令方法不被清理-----
|
||||
-keepclassmembers class **.commands.annotation.** { <methods>; }
|
||||
-keepclassmembers class * implements **.commands**CommandExecutor { <methods>; }
|
||||
-keepclassmembers class **.commands.annotation.** {<methods>;}
|
||||
-keepclassmembers class * implements **.commands.interfaces.Executor {<methods>;}
|
||||
|
||||
# -----保护注解NotProguard标记-----
|
||||
-keep class **.NotProguard
|
||||
-keep @**.NotProguard class * {*;}
|
||||
-keepclassmembers class * {
|
||||
@**.NotProguard <fields>;
|
||||
@**.NotProguard <methods>;
|
||||
@**.NotProguard <fields>;
|
||||
@**.NotProguard <methods>;
|
||||
}
|
@ -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