diff --git a/protocol/pom.xml b/protocol/pom.xml
index 545508d5b..0e820c4b8 100644
--- a/protocol/pom.xml
+++ b/protocol/pom.xml
@@ -19,6 +19,12 @@
Minimal implementation of the Minecraft protocol for use in BungeeCord
+
+ net.md-5
+ bungeecord-chat
+ ${project.version}
+ compile
+
io.netty
netty-codec
diff --git a/protocol/src/main/java/net/md_5/bungee/protocol/packet/PlayerListItem.java b/protocol/src/main/java/net/md_5/bungee/protocol/packet/PlayerListItem.java
index ea12d6e14..ff5976861 100644
--- a/protocol/src/main/java/net/md_5/bungee/protocol/packet/PlayerListItem.java
+++ b/protocol/src/main/java/net/md_5/bungee/protocol/packet/PlayerListItem.java
@@ -9,6 +9,8 @@ import net.md_5.bungee.protocol.AbstractPacketHandler;
import net.md_5.bungee.protocol.ProtocolConstants;
import java.util.UUID;
+import net.md_5.bungee.api.chat.TextComponent;
+import net.md_5.bungee.chat.ComponentSerializer;
@Data
@NoArgsConstructor
@@ -89,7 +91,7 @@ public class PlayerListItem extends DefinedPacket
if ( protocolVersion < ProtocolConstants.MINECRAFT_SNAPSHOT )
{
Item item = items[0]; // Only one at a time
- writeString( item.displayName, buf );
+ writeString( TextComponent.toLegacyText( ComponentSerializer.parse( item.displayName ) ), buf );
buf.writeBoolean( action != Action.REMOVE_PLAYER );
buf.writeShort( item.ping );
} else
diff --git a/proxy/src/main/java/net/md_5/bungee/tab/Global.java b/proxy/src/main/java/net/md_5/bungee/tab/Global.java
index 30b7cbe57..ecd8ff042 100644
--- a/proxy/src/main/java/net/md_5/bungee/tab/Global.java
+++ b/proxy/src/main/java/net/md_5/bungee/tab/Global.java
@@ -100,9 +100,11 @@ public class Global extends TabList
{
PlayerListItem packet = new PlayerListItem();
packet.setAction( playerListItem.getAction() );
- PlayerListItem.Item[] it = new PlayerListItem.Item[ 1 ];
- it[0] = item;
- packet.setItems( it );
+
+ packet.setItems( new PlayerListItem.Item[]
+ {
+ item
+ } );
player.unsafe().sendPacket( packet );
}
}
diff --git a/proxy/src/main/java/net/md_5/bungee/tab/ServerUnique.java b/proxy/src/main/java/net/md_5/bungee/tab/ServerUnique.java
index 9e31b3f7a..60e591434 100644
--- a/proxy/src/main/java/net/md_5/bungee/tab/ServerUnique.java
+++ b/proxy/src/main/java/net/md_5/bungee/tab/ServerUnique.java
@@ -82,9 +82,11 @@ public class ServerUnique extends TabList
{
PlayerListItem p2 = new PlayerListItem();
p2.setAction( packet.getAction() );
- PlayerListItem.Item[] it = new PlayerListItem.Item[ 1 ];
- it[0] = item;
- p2.setItems( it );
+
+ p2.setItems( new PlayerListItem.Item[]
+ {
+ item
+ } );
player.unsafe().sendPacket( p2 );
}
}