Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 04:20:08 +01:00
fixed exact name matching
Dieser Commit ist enthalten in:
Ursprung
1b7279b7c6
Commit
19e98ffc71
@ -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;
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren