5
5
import cn .handyplus .lib .constants .BaseConstants ;
6
6
import cn .handyplus .lib .constants .VersionCheckEnum ;
7
7
import cn .handyplus .lib .core .StrUtil ;
8
- import cn .handyplus .lib .util .BaseUtil ;
9
8
import cn .handyplus .lib .util .BcUtil ;
10
9
import cn .handyplus .lib .util .BossBarUtil ;
11
10
import cn .handyplus .lib .util .HandyConfigUtil ;
@@ -46,7 +45,7 @@ public static void sendMsg(Player player, BcUtil.BcMessageParam bcMessageParam)
46
45
// 解析内部变量
47
46
rgb = rgb .replace ("${player}" , bcMessageParam .getPlayerName ());
48
47
// 加载rgb颜色
49
- String msgRgb = BaseUtil . replaceChatColor ( rgb + msg ) ;
48
+ String msgRgb = rgb + msg ;
50
49
if (message ) {
51
50
List <String > messageFormatList = ConfigUtil .LB_CONFIG .getStringList ("lb." + type + ".message.format" );
52
51
for (String messageFormat : messageFormatList ) {
@@ -56,10 +55,8 @@ public static void sendMsg(Player player, BcUtil.BcMessageParam bcMessageParam)
56
55
}
57
56
// 1.9+ 才可使用
58
57
if (actionbar && BaseConstants .VERSION_ID > VersionCheckEnum .V_1_8 .getVersionId ()) {
59
- String actionbarRgb = ConfigUtil .LB_CONFIG .getString ("lb." + type + ".actionbar.rgb" );
60
- String actionbarRgbMsg = BaseUtil .replaceChatColor (actionbarRgb + msg );
61
58
String actionbarFormat = ConfigUtil .LB_CONFIG .getString ("lb." + type + ".actionbar.format" , "${message}" );
62
- actionbarFormat = actionbarFormat .replace ("${message}" , actionbarRgbMsg );
59
+ actionbarFormat = actionbarFormat .replace ("${message}" , msgRgb );
63
60
MessageUtil .sendAllActionbar (PlaceholderApiUtil .set (player , actionbarFormat ));
64
61
}
65
62
// 1.9+ 才可使用
@@ -72,8 +69,7 @@ public static void sendMsg(Player player, BcUtil.BcMessageParam bcMessageParam)
72
69
if (boss && BaseConstants .VERSION_ID > VersionCheckEnum .V_1_12 .getVersionId ()) {
73
70
String bossFormat = ConfigUtil .LB_CONFIG .getString ("lb." + type + ".boss.format" , "${message}" );
74
71
String bossFormatStr = bossFormat .replace ("${message}" , msgRgb );
75
- bossFormatStr = PlaceholderApiUtil .set (player , bossFormatStr );
76
- KeyedBossBar bossBar = BossBarUtil .createBossBar (ConfigUtil .LB_CONFIG , "lb." + type + ".boss" , bossFormatStr );
72
+ KeyedBossBar bossBar = BossBarUtil .createBossBar (ConfigUtil .LB_CONFIG , "lb." + type + ".boss" , PlaceholderApiUtil .set (player , bossFormatStr ));
77
73
BossBarUtil .addAllPlayer (bossBar );
78
74
int time = ConfigUtil .LB_CONFIG .getInt ("lb." + type + ".boss.time" , 3 );
79
75
BossBarUtil .setProgress (bossBar .getKey (), time );
0 commit comments