mirror of
https://hub.spigotmc.org/stash/scm/spigot/craftbukkit.git
synced 2025-08-21 05:44:33 +00:00
Check in getOfflinePlayer is OK
This commit is contained in:
parent
0cd47ae827
commit
b10ea735ca
1 changed files with 1 additions and 0 deletions
|
@ -1639,6 +1639,7 @@ public final class CraftServer implements Server {
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public OfflinePlayer getOfflinePlayer(String name) {
|
public OfflinePlayer getOfflinePlayer(String name) {
|
||||||
Preconditions.checkArgument(name != null, "name cannot be null");
|
Preconditions.checkArgument(name != null, "name cannot be null");
|
||||||
|
Preconditions.checkArgument(!name.isBlank(), "name cannot be empty");
|
||||||
|
|
||||||
OfflinePlayer result = getPlayerExact(name);
|
OfflinePlayer result = getPlayerExact(name);
|
||||||
if (result == null) {
|
if (result == null) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue