From f69c8d2c8a35a85dfeae3d6cd76fce5bf5652c56 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Mon, 17 Jan 2011 16:55:48 -0500 Subject: [PATCH] fixed exact name matching By: Tahg --- .../src/main/java/org/bukkit/craftbukkit/CraftServer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftServer.java index 0401934779..f53d0866ef 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -83,11 +83,11 @@ public final class CraftServer implements Server for (Player player : players) { if (player.getName().toLowerCase().startsWith(lowerName)) { int curDelta = player.getName().length() - lowerName.length(); - if(curDelta == 0) break; if (curDelta < delta) { found = player; delta = curDelta; } + if(curDelta == 0) break; } } return found;