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>
|
<properties>
|
||||||
<update.description></update.description>
|
<update.description></update.description>
|
||||||
<update.changes></update.changes>
|
<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>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
</properties>
|
</properties>
|
||||||
<repositories>
|
<repositories>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
-dontnote
|
-dontnote
|
||||||
|
|
||||||
# -----混淆时应用侵入式重载-----
|
# -----混淆时应用侵入式重载-----
|
||||||
-overloadaggressively
|
-overloadaggressively
|
||||||
|
|
||||||
# -----启用混淆字典-----
|
# -----启用混淆字典-----
|
||||||
-obfuscationdictionary obf.dict
|
-obfuscationdictionary obf.dict
|
||||||
@ -16,39 +16,36 @@
|
|||||||
# -----保留所有属性
|
# -----保留所有属性
|
||||||
-keepattributes **
|
-keepattributes **
|
||||||
|
|
||||||
# -----公共数据不混淆-----
|
|
||||||
-keep class cn.citycraft.CommonData.** {*;}
|
|
||||||
|
|
||||||
# -----保护所有实体中的字段名称-----
|
# -----保护所有实体中的字段名称-----
|
||||||
-keepclassmembers class * implements java.io.Serializable { <fields>; }
|
-keepclassmembers class * implements java.io.Serializable { <fields>; }
|
||||||
|
|
||||||
# -----保护监听方法不被清理-----
|
# -----保护监听方法不被清理-----
|
||||||
-keepclassmembers class * implements org.bukkit.event.Listener {
|
-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 {
|
-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 * {
|
-keepclassmembers enum * {
|
||||||
public static **[] values();
|
public static **[] values();
|
||||||
public static ** valueOf(java.lang.String);
|
public static ** valueOf(java.lang.String);
|
||||||
}
|
}
|
||||||
|
|
||||||
# -----保护配置注入不被清理-----
|
# -----保护配置注入不被清理-----
|
||||||
-keepclassmembers class * extends **.config**Inject** {
|
-keepclassmembers class * extends **.config.inject.Inject** {
|
||||||
<fields>;
|
<fields>;
|
||||||
}
|
}
|
||||||
|
|
||||||
# -----保护注解命令方法不被清理-----
|
# -----保护注解命令方法不被清理-----
|
||||||
-keepclassmembers class **.commands.annotation.** { <methods>; }
|
-keepclassmembers class **.commands.annotation.** {<methods>;}
|
||||||
-keepclassmembers class * implements **.commands**CommandExecutor { <methods>; }
|
-keepclassmembers class * implements **.commands.interfaces.Executor {<methods>;}
|
||||||
|
|
||||||
# -----保护注解NotProguard标记-----
|
# -----保护注解NotProguard标记-----
|
||||||
-keep class **.NotProguard
|
-keep class **.NotProguard
|
||||||
-keep @**.NotProguard class * {*;}
|
-keep @**.NotProguard class * {*;}
|
||||||
-keepclassmembers class * {
|
-keepclassmembers class * {
|
||||||
@**.NotProguard <fields>;
|
@**.NotProguard <fields>;
|
||||||
@**.NotProguard <methods>;
|
@**.NotProguard <methods>;
|
||||||
}
|
}
|
@ -51,7 +51,7 @@ public class MiaoBoard extends JavaPlugin implements Executor {
|
|||||||
@Override
|
@Override
|
||||||
public void onEnable() {
|
public void onEnable() {
|
||||||
scoreBoardManager.start();
|
scoreBoardManager.start();
|
||||||
new CommandSub("mb").register(this);
|
new CommandSub("mb", this);
|
||||||
new PlayerListener();
|
new PlayerListener();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,6 +22,7 @@ public class SiderbarBoardPage extends BoardPage {
|
|||||||
|
|
||||||
private static final List<ChatColor> colors = Arrays.asList(ChatColor.values()); //所有颜色
|
private static final List<ChatColor> colors = Arrays.asList(ChatColor.values()); //所有颜色
|
||||||
private final List<BoardLine> boardLines = new ArrayList<>();// "行"
|
private final List<BoardLine> boardLines = new ArrayList<>();// "行"
|
||||||
|
private int maxLine;//用于标注最大行数
|
||||||
|
|
||||||
public SiderbarBoardPage() {
|
public SiderbarBoardPage() {
|
||||||
super();
|
super();
|
||||||
@ -63,13 +64,16 @@ public class SiderbarBoardPage extends BoardPage {
|
|||||||
if (suffix != null) {
|
if (suffix != null) {
|
||||||
boardLine.getTeam().setSuffix(suffix);//"设置后16个字符"
|
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) {
|
public void clear(int size) {
|
||||||
if (size < boardLines.size()) {
|
if (maxLine > size) {
|
||||||
for (int i = size; i < boardLines.size(); i++) {
|
for (int i = size; i < maxLine; i++) {
|
||||||
removeLine(i);
|
removeLine(i);
|
||||||
}
|
}
|
||||||
|
maxLine = size;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user