mirror of
https://github.com/tanyaofei/minecraft-fakeplayer.git
synced 2025-09-14 03:06:46 +08:00
optimize code
This commit is contained in:
parent
6a3d880f17
commit
07340d3218
@ -64,7 +64,7 @@ public class FakeplayerConfig extends PluginConfig {
|
||||
/**
|
||||
* 名称样式, 格式
|
||||
*/
|
||||
private List<TextDecoration> nameStyleDecoration;
|
||||
private List<TextDecoration> nameStyleDecorations;
|
||||
|
||||
/**
|
||||
* 创建者玩家下线时是否跟随下线
|
||||
@ -215,7 +215,7 @@ public class FakeplayerConfig extends PluginConfig {
|
||||
this.invseeImplement = ConfigUtils.getEnum(file, "invsee-implement", InvseeImplement.class, InvseeImplement.AUTO);
|
||||
this.debug = file.getBoolean("debug", false);
|
||||
this.nameStyleColor = this.getNameStyleColor(file);
|
||||
this.nameStyleDecoration = this.getNameStyleDecorations(file);
|
||||
this.nameStyleDecorations = this.getNameStyleDecorations(file);
|
||||
|
||||
if (this.isConfigFileOutOfDate()) {
|
||||
Bukkit.getScheduler().runTaskLater(Main.getInstance(), () -> {
|
||||
|
@ -252,7 +252,7 @@ public class Fakeplayer {
|
||||
}
|
||||
|
||||
private void setupName() {
|
||||
var displayName = text(player.getName(), config.getNameStyleColor(), config.getNameStyleDecoration().toArray(new TextDecoration[0]));
|
||||
var displayName = text(player.getName(), config.getNameStyleColor(), config.getNameStyleDecorations().toArray(new TextDecoration[0]));
|
||||
player.playerListName(displayName);
|
||||
player.displayName(displayName);
|
||||
player.customName(displayName);
|
||||
|
Loading…
Reference in New Issue
Block a user