From 6775b9230c41c66c28e37218312be57edd9e5d7c Mon Sep 17 00:00:00 2001 From: Thinkofdeath Date: Wed, 16 Apr 2014 14:43:36 +0100 Subject: [PATCH] Update Team packet's field names. unknown -> nameTagVisibility, unknown2 -> color --- .../main/java/net/md_5/bungee/api/score/Team.java | 4 ++-- .../java/net/md_5/bungee/protocol/packet/Team.java | 12 ++++++------ .../net/md_5/bungee/connection/DownstreamBridge.java | 5 ++--- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/api/src/main/java/net/md_5/bungee/api/score/Team.java b/api/src/main/java/net/md_5/bungee/api/score/Team.java index c60ed320..dbb27aea 100644 --- a/api/src/main/java/net/md_5/bungee/api/score/Team.java +++ b/api/src/main/java/net/md_5/bungee/api/score/Team.java @@ -17,8 +17,8 @@ public class Team private String prefix; private String suffix; private byte friendlyFire; - private String unknown; - private byte unknown2; + private String nameTagVisibility; + private byte color; private Set players = new HashSet<>(); public Collection getPlayers() diff --git a/protocol/src/main/java/net/md_5/bungee/protocol/packet/Team.java b/protocol/src/main/java/net/md_5/bungee/protocol/packet/Team.java index f355419b..34dbaa46 100644 --- a/protocol/src/main/java/net/md_5/bungee/protocol/packet/Team.java +++ b/protocol/src/main/java/net/md_5/bungee/protocol/packet/Team.java @@ -24,8 +24,8 @@ public class Team extends DefinedPacket private String displayName; private String prefix; private String suffix; - private String unknown; - private byte unknown2; + private String nameTagVisibility; + private byte color; private byte friendlyFire; private String[] players; @@ -54,8 +54,8 @@ public class Team extends DefinedPacket friendlyFire = buf.readByte(); if ( protocolVersion >= ProtocolConstants.MINECRAFT_14_11_a ) { - unknown = readString( buf ); - unknown2 = buf.readByte(); + nameTagVisibility = readString( buf ); + color = buf.readByte(); } } if ( mode == 0 || mode == 3 || mode == 4 ) @@ -82,8 +82,8 @@ public class Team extends DefinedPacket buf.writeByte( friendlyFire ); if ( protocolVersion >= ProtocolConstants.MINECRAFT_14_11_a ) { - writeString( unknown, buf ); - buf.writeByte( unknown2 ); + writeString( nameTagVisibility, buf ); + buf.writeByte( color ); } } if ( mode == 0 || mode == 3 || mode == 4 ) diff --git a/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java b/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java index 180e62bd..b5c3c5ab 100644 --- a/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java +++ b/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java @@ -23,7 +23,6 @@ import net.md_5.bungee.chat.ComponentSerializer; import net.md_5.bungee.netty.ChannelWrapper; import net.md_5.bungee.netty.PacketHandler; import net.md_5.bungee.protocol.PacketWrapper; -import net.md_5.bungee.protocol.ProtocolConstants; import net.md_5.bungee.protocol.packet.KeepAlive; import net.md_5.bungee.protocol.packet.PlayerListItem; import net.md_5.bungee.protocol.packet.ScoreboardObjective; @@ -177,8 +176,8 @@ public class DownstreamBridge extends PacketHandler t.setPrefix( team.getPrefix() ); t.setSuffix( team.getSuffix() ); t.setFriendlyFire( team.getFriendlyFire() ); - t.setUnknown( team.getUnknown() ); - t.setUnknown2( team.getUnknown2() ); + t.setNameTagVisibility( team.getNameTagVisibility() ); + t.setColor( team.getColor() ); } if ( team.getPlayers() != null ) {