mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-05 10:20:53 +01:00
Don't special case 'invalid' usernames for UUIDs.
This commit is contained in:
parent
c15d869440
commit
6e0b0a1b55
@ -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 New Issue
Block a user