mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-09 19:49:35 +01:00
Don't special case 'invalid' usernames for UUIDs.
By: md_5 <git@md-5.net>
This commit is contained in:
parent
2a6be42be0
commit
82913cc71b
1 changed files with 0 additions and 7 deletions
|
@ -170,8 +170,6 @@ public final class CraftServer implements Server {
|
|||
private CraftIconCache icon;
|
||||
private boolean overrideAllCommandBlockCommands = false;
|
||||
private boolean unrestrictedAdvancements;
|
||||
private final Pattern validUserPattern = Pattern.compile("^[a-zA-Z0-9_]{2,16}$");
|
||||
private final UUID invalidUserUUID = UUID.nameUUIDFromBytes("InvalidUsername".getBytes(Charsets.UTF_8));
|
||||
private final List<CraftPlayer> playerView;
|
||||
public int reloadCount;
|
||||
|
||||
|
@ -1246,11 +1244,6 @@ public final class CraftServer implements Server {
|
|||
public OfflinePlayer getOfflinePlayer(String name) {
|
||||
Validate.notNull(name, "Name cannot be null");
|
||||
|
||||
// If the name given cannot ever be a valid username give a dummy return, for scoreboard plugins
|
||||
if (!validUserPattern.matcher(name).matches()) {
|
||||
return new CraftOfflinePlayer(this, new GameProfile(invalidUserUUID, name));
|
||||
}
|
||||
|
||||
OfflinePlayer result = getPlayerExact(name);
|
||||
if (result == null) {
|
||||
// This is potentially blocking :(
|
||||
|
|
Loading…
Reference in a new issue