9
0
mirror of https://github.com/Xiao-MoMi/Custom-Nameplates.git synced 2026-01-03 14:12:24 +00:00
修复旧版颜色相关问题
This commit is contained in:
XiaoMoMi
2024-04-07 01:27:11 +08:00
parent e68a333527
commit 8fb4b8317d
7 changed files with 19 additions and 19 deletions

View File

@@ -195,7 +195,7 @@ public class AdventureManagerImpl implements AdventureManager {
case 'd' -> stringBuilder.append("<light_purple>");
case 'e' -> stringBuilder.append("<yellow>");
case 'f' -> stringBuilder.append("<white>");
case 'r' -> stringBuilder.append("<r><!i>");
case 'r' -> stringBuilder.append("<reset>");
case 'l' -> stringBuilder.append("<b>");
case 'm' -> stringBuilder.append("<st>");
case 'o' -> stringBuilder.append("<i>");

View File

@@ -365,11 +365,11 @@ public class BubbleManagerImpl implements BubbleManager, Listener {
})
.verticalOffset(yOffset)
.defaultText(text)
.plugin("bubble")
.id("bubble")
.build());
for (StaticTextEntity bubble : tagEntity.getStaticTags()) {
if (bubble.getPlugin().equals("bubble")) {
if (bubble.getID().equals("bubble")) {
bubble.setOffset(bubble.getOffset() + lineSpace);
}
}

View File

@@ -49,7 +49,7 @@ public class StaticTextEntityImpl implements StaticTextEntity {
private final NearbyRule comeRule;
private final NearbyRule leaveRule;
private String defaultText;
private final String plugin;
private final String id;
private final PacketContainer destroyPacket;
public StaticTextEntityImpl (
@@ -58,7 +58,7 @@ public class StaticTextEntityImpl implements StaticTextEntity {
NearbyRule comeRule,
NearbyRule leaveRule,
String defaultText,
String plugin
String id
) {
this.entityId = FakeEntityUtils.getAndIncrease();
this.owner = owner;
@@ -68,15 +68,15 @@ public class StaticTextEntityImpl implements StaticTextEntity {
this.comeRule = comeRule;
this.leaveRule = leaveRule;
this.defaultText = defaultText;
this.plugin = plugin;
this.id = id;
this.destroyPacket = new PacketContainer(PacketType.Play.Server.ENTITY_DESTROY);
this.destroyPacket.getIntLists().write(0, List.of(entityId));
this.viewersToArray();
}
@Override
public String getPlugin() {
return plugin;
public String getID() {
return id;
}
@Override

View File

@@ -118,7 +118,7 @@ public class UnlimitedTagManagerImpl implements UnlimitedTagManager {
setting.getComeRule(),
setting.getLeaveRule(),
setting.getDefaultText(),
setting.getPlugin()
setting.getID()
);
}