-From c99bbab386d19267a2b6b23d9d380006845b9745 Mon Sep 17 00:00:00 2001
+From 21ac4d87d54a63506f190bc9f7e49b6d6595534a Mon Sep 17 00:00:00 2001
 From: Shane Freeder <theboyetronic@gmail.com>
 Date: Sat, 21 Jul 2018 17:14:39 +0100
 Subject: [PATCH] 1.13 protocol support

             "1.8.x",
             "1.9.x",
diff --git a/protocol/src/main/java/net/md_5/bungee/protocol/packet/ScoreboardObjective.java b/protocol/src/main/java/net/md_5/bungee/protocol/packet/ScoreboardObjective.java
index 6279d9f3..b0dcf0ac 100644
--- a/protocol/src/main/java/net/md_5/bungee/protocol/packet/ScoreboardObjective.java
+++ b/protocol/src/main/java/net/md_5/bungee/protocol/packet/ScoreboardObjective.java
@@ -1,5 +1,8 @@

 import net.md_5.bungee.protocol.DefinedPacket;
 import io.netty.buffer.ByteBuf;
 import java.util.Locale;
@@ -32,12 +35,16 @@ public class ScoreboardObjective extends DefinedPacket
         action = buf.readByte();
         if ( action == 0 || action == 2 )
         {
-            value = readString( buf );
             if ( protocolVersion >= ProtocolConstants.MINECRAFT_1_13 )
             {
+                // Waterfall start - 1.13
+                String jsonName = readString(buf);
+                name = TextComponent.toLegacyText(ComponentSerializer.parse(jsonName));
                 type = HealthDisplay.values()[readVarInt( buf )];
             } else
             {
+                value = readString(buf);
+                // Waterfall end
                 type = HealthDisplay.fromString( readString( buf ) );
             }
         }
@@ -50,12 +57,16 @@ public class ScoreboardObjective extends DefinedPacket
         buf.writeByte( action );
         if ( action == 0 || action == 2 )
         {
-            writeString( value, buf );
             if ( protocolVersion >= ProtocolConstants.MINECRAFT_1_13 )
             {
+                // Waterfall start - 1.13
+                String valueJson = ComponentSerializer.toString(TextComponent.fromLegacyText(value));
+                writeString(valueJson, buf);
                 writeVarInt( type.ordinal(), buf );
             } else
             {
+                writeString(value, buf);
+                // Waterfall end
                 writeString( type.toString(), buf );
             }
         }
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 f93508d9..19d0d2d9 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
@@ -1,5 +1,7 @@
 package net.md_5.bungee.protocol.packet;
 
+import net.md_5.bungee.api.chat.TextComponent; // Waterfall
+import net.md_5.bungee.chat.ComponentSerializer; // Waterfall
 import net.md_5.bungee.protocol.DefinedPacket;
 import io.netty.buffer.ByteBuf;
 import lombok.AllArgsConstructor;
