Check in getOfflinePlayer is OK

This commit is contained in:
md_5 2023-06-12 20:42:20 +10:00
parent 0cd47ae827
commit b10ea735ca
No known key found for this signature in database
GPG Key ID: E8E901AC7C617C11

View File

@ -1639,6 +1639,7 @@ public final class CraftServer implements Server {
@Deprecated
public OfflinePlayer getOfflinePlayer(String name) {
Preconditions.checkArgument(name != null, "name cannot be null");
Preconditions.checkArgument(!name.isBlank(), "name cannot be empty");
OfflinePlayer result = getPlayerExact(name);
if (result == null) {