Fix hex colours not being allowed in MOTD (#3755)

This commit is contained in:
Callum 2020-07-02 08:19:43 +01:00 committed by GitHub
parent f32d7fb2d2
commit 4b5b20d4cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -60,7 +60,7 @@ index 0000000000000000000000000000000000000000..a2a409e635dde08f7c53e67164b967a0
+}
diff --git a/src/main/java/com/destroystokyo/paper/network/StandardPaperServerListPingEventImpl.java b/src/main/java/com/destroystokyo/paper/network/StandardPaperServerListPingEventImpl.java
new file mode 100644
index 0000000000000000000000000000000000000000..a85466bc7e0a8aa54b9eff14077fe6c992ae2902
index 0000000000000000000000000000000000000000..d2a1e54de64896c74404e79ad721d044a9d52794
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/network/StandardPaperServerListPingEventImpl.java
@@ -0,0 +1,112 @@
@ -71,11 +71,11 @@ index 0000000000000000000000000000000000000000..a85466bc7e0a8aa54b9eff14077fe6c9
+import com.google.common.base.MoreObjects;
+import com.google.common.base.Strings;
+import com.mojang.authlib.GameProfile;
+import net.minecraft.server.ChatComponentText;
+import net.minecraft.server.MinecraftServer;
+import net.minecraft.server.NetworkManager;
+import net.minecraft.server.PacketStatusOutServerInfo;
+import net.minecraft.server.ServerPing;
+import org.bukkit.craftbukkit.util.CraftChatMessage;
+
+import java.util.List;
+import java.util.UUID;
@ -155,7 +155,7 @@ index 0000000000000000000000000000000000000000..a85466bc7e0a8aa54b9eff14077fe6c9
+ ServerPing ping = new ServerPing();
+
+ // Description
+ ping.setMOTD(new ChatComponentText(event.getMotd()));
+ ping.setMOTD(CraftChatMessage.fromString(event.getMotd())[0]);
+
+ // Players
+ if (!event.shouldHidePlayers()) {