mirror of
https://github.com/PlaceholderAPI/PlaceholderAPI
synced 2024-11-18 00:46:55 +01:00
Fix resolvePlayer method
This commit is contained in:
parent
e8b5660eda
commit
8fa0f73a46
@ -212,12 +212,15 @@ public final class CommandParse extends PlaceholderCommand {
|
||||
@Nullable
|
||||
private OfflinePlayer resolvePlayer(@NotNull final String name) {
|
||||
OfflinePlayer target = Bukkit.getPlayer(name);
|
||||
|
||||
|
||||
if (target == null) {
|
||||
target = Bukkit.getOfflinePlayer(name); // this is probably not a great idea.
|
||||
// Not the best option, but Spigot doesn't offer a good replacement (as usual)
|
||||
target = Bukkit.getOfflinePlayer(name);
|
||||
|
||||
return target.hasPlayedBefore() ? target : null;
|
||||
}
|
||||
|
||||
return target.hasPlayedBefore() ? target : null;
|
||||
return target;
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user