fixed color being always overwritten on proxies

This commit is contained in:
NEZNAMY committed 2020-11-26 23:29:58 +01:00
1 parent 29e8c0fb3c
commit 5960acaef1
2 files changed
+2 -2

No files matched your search

@@ -115,7 +115,7 @@ public class BungeePacketBuilder implements PacketBuilder {
String prefix = jsonOrCut(packet.playerPrefix, clientVersion, 16);
String suffix = jsonOrCut(packet.playerSuffix, clientVersion, 16);
if (clientVersion.getMinorVersion() >= 13) {
color = EnumChatFormat.lastColorsOf(packet.playerPrefix).getNetworkId();
color = (packet.color != null ? packet.color : EnumChatFormat.lastColorsOf(packet.playerPrefix)).getNetworkId();
}
return new Team(packet.name, (byte)packet.method, teamDisplay, prefix, suffix, packet.nametagVisibility, packet.collisionRule, color, (byte)packet.options, packet.players.toArray(new String[0]));
}
@@ -112,7 +112,7 @@ public class VelocityPacketBuilder implements PacketBuilder {
String prefix = jsonOrCut(packet.playerPrefix, clientVersion, 16);
String suffix = jsonOrCut(packet.playerSuffix, clientVersion, 16);
if (clientVersion.getMinorVersion() >= 13) {
color = EnumChatFormat.lastColorsOf(packet.playerPrefix).getNetworkId();
color = (packet.color != null ? packet.color : EnumChatFormat.lastColorsOf(packet.playerPrefix)).getNetworkId();
}
return new Team(packet.name, (byte)packet.method, teamDisplay, prefix, suffix, packet.nametagVisibility, packet.collisionRule, color, (byte)packet.options, packet.players.toArray(new String[0]));
}