From 9ca1707df388c928cadb80300e21386363914d47 Mon Sep 17 00:00:00 2001 From: Mark Vainomaa Date: Mon, 6 Aug 2018 19:01:05 +0300 Subject: [PATCH] Fix unregisterConnection using non-lowercase username Fixes #18 --- .../src/main/java/com/velocitypowered/proxy/VelocityServer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proxy/src/main/java/com/velocitypowered/proxy/VelocityServer.java b/proxy/src/main/java/com/velocitypowered/proxy/VelocityServer.java index 630ad4ef8..4a5385e50 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/VelocityServer.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/VelocityServer.java @@ -128,7 +128,7 @@ public class VelocityServer implements ProxyServer { } public void unregisterConnection(ConnectedPlayer connection) { - connectionsByName.remove(connection.getUsername(), connection); + connectionsByName.remove(connection.getUsername().toLowerCase(Locale.US), connection); connectionsByUuid.remove(connection.getUniqueId(), connection); }