Check in getOfflinePlayer is OK

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot 2023-06-12 20:42:20 +10:00
parent cfdd51c0cd
commit b00fd47b85

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) {