From 3c5284dae90754acc45aba930c01f32593a3fed4 Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Sat, 1 Jan 2022 11:50:44 -0800 Subject: [PATCH] Allow . in usernames --- patches/server/0842-Validate-usernames.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/patches/server/0842-Validate-usernames.patch b/patches/server/0842-Validate-usernames.patch index f175b4e10..7575cc1a0 100644 --- a/patches/server/0842-Validate-usernames.patch +++ b/patches/server/0842-Validate-usernames.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Validate usernames diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -index 33a29890435d6065a2cc4f8e8bf8209c01d5d114..0df723378b49aecacc15400db4b5f56c87a965b3 100644 +index 33a29890435d6065a2cc4f8e8bf8209c01d5d114..96593919db8b140e55fe1a120c2835b679771e92 100644 --- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java @@ -230,10 +230,38 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener @@ -21,7 +21,7 @@ index 33a29890435d6065a2cc4f8e8bf8209c01d5d114..0df723378b49aecacc15400db4b5f56c + for (int i = 0, len = in.length(); i < len; ++i) { + char c = in.charAt(i); + -+ if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || (c == '_')) { ++ if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || (c == '_' || c == '.')) { + continue; + } +