1
0
Fork 0
mirror of https://github.com/PaperMC/Paper.git synced 2025-02-16 18:31:53 +01:00

Fix hex colours not being allowed in MOTD ()

This commit is contained in:
Callum 2020-07-02 08:19:43 +01:00
parent eaeac03650
commit 85408c2f74

View file

@ -71,11 +71,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+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..00000000000000000000000000000000
+ ServerPing ping = new ServerPing();
+
+ // Description
+ ping.setMOTD(new ChatComponentText(event.getMotd()));
+ ping.setMOTD(CraftChatMessage.fromString(event.getMotd())[0]);
+
+ // Players
+ if (!event.shouldHidePlayers()) {