summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2014-04-20 18:58:00 +1000
committermd_5 <git@md-5.net>2017-11-18 10:12:27 +1100
commit6e0b0a1b55a9c10f26ec46966bd5431eaa2a12b9 (patch)
treed3df5eef95779719f8b4865e62135d2fac8f6c13
parentc15d8694401f4982c69c5762852210255ee9703a (diff)
downloadcraftbukkit-6e0b0a1b55a9c10f26ec46966bd5431eaa2a12b9.tar
craftbukkit-6e0b0a1b55a9c10f26ec46966bd5431eaa2a12b9.tar.gz
craftbukkit-6e0b0a1b55a9c10f26ec46966bd5431eaa2a12b9.tar.lz
craftbukkit-6e0b0a1b55a9c10f26ec46966bd5431eaa2a12b9.tar.xz
craftbukkit-6e0b0a1b55a9c10f26ec46966bd5431eaa2a12b9.zip
Don't special case 'invalid' usernames for UUIDs.
-rw-r--r--src/main/java/org/bukkit/craftbukkit/CraftServer.java7
1 files changed, 0 insertions, 7 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 9f404c1a..c0ebdf1a 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -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 :(