mirror of
https://github.com/Xiao-MoMi/Custom-Nameplates.git
synced 2025-12-19 15:09:23 +00:00
2.3.3.7
修复旧版颜色相关问题
This commit is contained in:
@@ -24,7 +24,7 @@ import java.util.UUID;
|
|||||||
|
|
||||||
public interface StaticTextEntity {
|
public interface StaticTextEntity {
|
||||||
|
|
||||||
String getPlugin();
|
String getID();
|
||||||
|
|
||||||
boolean isShownTo(Player viewer);
|
boolean isShownTo(Player viewer);
|
||||||
|
|
||||||
|
|||||||
@@ -24,14 +24,14 @@ public class StaticTextTagSetting {
|
|||||||
private NearbyRule comeRule;
|
private NearbyRule comeRule;
|
||||||
private NearbyRule leaveRule;
|
private NearbyRule leaveRule;
|
||||||
private String defaultText;
|
private String defaultText;
|
||||||
private String plugin;
|
private String id;
|
||||||
|
|
||||||
public StaticTextTagSetting(double verticalOffset, NearbyRule comeRule, NearbyRule leaveRule, String defaultText, String plugin) {
|
public StaticTextTagSetting(double verticalOffset, NearbyRule comeRule, NearbyRule leaveRule, String defaultText, String id) {
|
||||||
this.verticalOffset = verticalOffset;
|
this.verticalOffset = verticalOffset;
|
||||||
this.comeRule = comeRule;
|
this.comeRule = comeRule;
|
||||||
this.leaveRule = leaveRule;
|
this.leaveRule = leaveRule;
|
||||||
this.defaultText = defaultText;
|
this.defaultText = defaultText;
|
||||||
this.plugin = plugin;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
private StaticTextTagSetting() {
|
private StaticTextTagSetting() {
|
||||||
@@ -39,7 +39,7 @@ public class StaticTextTagSetting {
|
|||||||
comeRule = (player, entity) -> true;
|
comeRule = (player, entity) -> true;
|
||||||
leaveRule = (player, entity) -> true;
|
leaveRule = (player, entity) -> true;
|
||||||
defaultText = "";
|
defaultText = "";
|
||||||
plugin = "";
|
id = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Builder builder() {
|
public static Builder builder() {
|
||||||
@@ -78,8 +78,8 @@ public class StaticTextTagSetting {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Builder plugin(String type) {
|
public Builder id(String id) {
|
||||||
this.setting.plugin = type;
|
this.setting.id = id;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -100,8 +100,8 @@ public class StaticTextTagSetting {
|
|||||||
return defaultText;
|
return defaultText;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getPlugin() {
|
public String getID() {
|
||||||
return plugin;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public NearbyRule getLeaveRule() {
|
public NearbyRule getLeaveRule() {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ plugins {
|
|||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
|
|
||||||
version = "2.3.3.6"
|
version = "2.3.3.7"
|
||||||
|
|
||||||
apply<JavaPlugin>()
|
apply<JavaPlugin>()
|
||||||
apply(plugin = "java")
|
apply(plugin = "java")
|
||||||
|
|||||||
@@ -195,7 +195,7 @@ public class AdventureManagerImpl implements AdventureManager {
|
|||||||
case 'd' -> stringBuilder.append("<light_purple>");
|
case 'd' -> stringBuilder.append("<light_purple>");
|
||||||
case 'e' -> stringBuilder.append("<yellow>");
|
case 'e' -> stringBuilder.append("<yellow>");
|
||||||
case 'f' -> stringBuilder.append("<white>");
|
case 'f' -> stringBuilder.append("<white>");
|
||||||
case 'r' -> stringBuilder.append("<r><!i>");
|
case 'r' -> stringBuilder.append("<reset>");
|
||||||
case 'l' -> stringBuilder.append("<b>");
|
case 'l' -> stringBuilder.append("<b>");
|
||||||
case 'm' -> stringBuilder.append("<st>");
|
case 'm' -> stringBuilder.append("<st>");
|
||||||
case 'o' -> stringBuilder.append("<i>");
|
case 'o' -> stringBuilder.append("<i>");
|
||||||
|
|||||||
@@ -365,11 +365,11 @@ public class BubbleManagerImpl implements BubbleManager, Listener {
|
|||||||
})
|
})
|
||||||
.verticalOffset(yOffset)
|
.verticalOffset(yOffset)
|
||||||
.defaultText(text)
|
.defaultText(text)
|
||||||
.plugin("bubble")
|
.id("bubble")
|
||||||
.build());
|
.build());
|
||||||
|
|
||||||
for (StaticTextEntity bubble : tagEntity.getStaticTags()) {
|
for (StaticTextEntity bubble : tagEntity.getStaticTags()) {
|
||||||
if (bubble.getPlugin().equals("bubble")) {
|
if (bubble.getID().equals("bubble")) {
|
||||||
bubble.setOffset(bubble.getOffset() + lineSpace);
|
bubble.setOffset(bubble.getOffset() + lineSpace);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ public class StaticTextEntityImpl implements StaticTextEntity {
|
|||||||
private final NearbyRule comeRule;
|
private final NearbyRule comeRule;
|
||||||
private final NearbyRule leaveRule;
|
private final NearbyRule leaveRule;
|
||||||
private String defaultText;
|
private String defaultText;
|
||||||
private final String plugin;
|
private final String id;
|
||||||
private final PacketContainer destroyPacket;
|
private final PacketContainer destroyPacket;
|
||||||
|
|
||||||
public StaticTextEntityImpl (
|
public StaticTextEntityImpl (
|
||||||
@@ -58,7 +58,7 @@ public class StaticTextEntityImpl implements StaticTextEntity {
|
|||||||
NearbyRule comeRule,
|
NearbyRule comeRule,
|
||||||
NearbyRule leaveRule,
|
NearbyRule leaveRule,
|
||||||
String defaultText,
|
String defaultText,
|
||||||
String plugin
|
String id
|
||||||
) {
|
) {
|
||||||
this.entityId = FakeEntityUtils.getAndIncrease();
|
this.entityId = FakeEntityUtils.getAndIncrease();
|
||||||
this.owner = owner;
|
this.owner = owner;
|
||||||
@@ -68,15 +68,15 @@ public class StaticTextEntityImpl implements StaticTextEntity {
|
|||||||
this.comeRule = comeRule;
|
this.comeRule = comeRule;
|
||||||
this.leaveRule = leaveRule;
|
this.leaveRule = leaveRule;
|
||||||
this.defaultText = defaultText;
|
this.defaultText = defaultText;
|
||||||
this.plugin = plugin;
|
this.id = id;
|
||||||
this.destroyPacket = new PacketContainer(PacketType.Play.Server.ENTITY_DESTROY);
|
this.destroyPacket = new PacketContainer(PacketType.Play.Server.ENTITY_DESTROY);
|
||||||
this.destroyPacket.getIntLists().write(0, List.of(entityId));
|
this.destroyPacket.getIntLists().write(0, List.of(entityId));
|
||||||
this.viewersToArray();
|
this.viewersToArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getPlugin() {
|
public String getID() {
|
||||||
return plugin;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ public class UnlimitedTagManagerImpl implements UnlimitedTagManager {
|
|||||||
setting.getComeRule(),
|
setting.getComeRule(),
|
||||||
setting.getLeaveRule(),
|
setting.getLeaveRule(),
|
||||||
setting.getDefaultText(),
|
setting.getDefaultText(),
|
||||||
setting.getPlugin()
|
setting.getID()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user