From 19e98ffc71289a6dea420a6841ecd9dcb5f7f2ee Mon Sep 17 00:00:00 2001 From: Tahg Date: Mon, 17 Jan 2011 16:55:48 -0500 Subject: [PATCH] fixed exact name matching --- src/main/java/org/bukkit/craftbukkit/CraftServer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java index 0401934779..f53d0866ef 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/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;