Update Team packet's field names. unknown -> nameTagVisibility, unknown2 -> color

This commit is contained in:
Thinkofdeath 2014-04-16 14:43:36 +01:00
parent c8e6b6fd7a
commit 6775b9230c
3 changed files with 10 additions and 11 deletions

View File

@ -17,8 +17,8 @@ public class Team
private String prefix; private String prefix;
private String suffix; private String suffix;
private byte friendlyFire; private byte friendlyFire;
private String unknown; private String nameTagVisibility;
private byte unknown2; private byte color;
private Set<String> players = new HashSet<>(); private Set<String> players = new HashSet<>();
public Collection<String> getPlayers() public Collection<String> getPlayers()

View File

@ -24,8 +24,8 @@ public class Team extends DefinedPacket
private String displayName; private String displayName;
private String prefix; private String prefix;
private String suffix; private String suffix;
private String unknown; private String nameTagVisibility;
private byte unknown2; private byte color;
private byte friendlyFire; private byte friendlyFire;
private String[] players; private String[] players;
@ -54,8 +54,8 @@ public class Team extends DefinedPacket
friendlyFire = buf.readByte(); friendlyFire = buf.readByte();
if ( protocolVersion >= ProtocolConstants.MINECRAFT_14_11_a ) if ( protocolVersion >= ProtocolConstants.MINECRAFT_14_11_a )
{ {
unknown = readString( buf ); nameTagVisibility = readString( buf );
unknown2 = buf.readByte(); color = buf.readByte();
} }
} }
if ( mode == 0 || mode == 3 || mode == 4 ) if ( mode == 0 || mode == 3 || mode == 4 )
@ -82,8 +82,8 @@ public class Team extends DefinedPacket
buf.writeByte( friendlyFire ); buf.writeByte( friendlyFire );
if ( protocolVersion >= ProtocolConstants.MINECRAFT_14_11_a ) if ( protocolVersion >= ProtocolConstants.MINECRAFT_14_11_a )
{ {
writeString( unknown, buf ); writeString( nameTagVisibility, buf );
buf.writeByte( unknown2 ); buf.writeByte( color );
} }
} }
if ( mode == 0 || mode == 3 || mode == 4 ) if ( mode == 0 || mode == 3 || mode == 4 )

View File

@ -23,7 +23,6 @@ import net.md_5.bungee.chat.ComponentSerializer;
import net.md_5.bungee.netty.ChannelWrapper; import net.md_5.bungee.netty.ChannelWrapper;
import net.md_5.bungee.netty.PacketHandler; import net.md_5.bungee.netty.PacketHandler;
import net.md_5.bungee.protocol.PacketWrapper; 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.KeepAlive;
import net.md_5.bungee.protocol.packet.PlayerListItem; import net.md_5.bungee.protocol.packet.PlayerListItem;
import net.md_5.bungee.protocol.packet.ScoreboardObjective; import net.md_5.bungee.protocol.packet.ScoreboardObjective;
@ -177,8 +176,8 @@ public class DownstreamBridge extends PacketHandler
t.setPrefix( team.getPrefix() ); t.setPrefix( team.getPrefix() );
t.setSuffix( team.getSuffix() ); t.setSuffix( team.getSuffix() );
t.setFriendlyFire( team.getFriendlyFire() ); t.setFriendlyFire( team.getFriendlyFire() );
t.setUnknown( team.getUnknown() ); t.setNameTagVisibility( team.getNameTagVisibility() );
t.setUnknown2( team.getUnknown2() ); t.setColor( team.getColor() );
} }
if ( team.getPlayers() != null ) if ( team.getPlayers() != null )
{ {