Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 12:30:06 +01:00
Don't special case 'invalid' usernames for UUIDs.
Dieser Commit ist enthalten in:
Ursprung
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 :(
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren