mirror of
https://github.com/PlaceholderAPI/PlaceholderAPI.git
synced 2025-01-16 05:11:40 +01:00
Fix resolvePlayer method
This commit is contained in:
parent
e8b5660eda
commit
8fa0f73a46
@ -214,10 +214,13 @@ public final class CommandParse extends PlaceholderCommand {
|
|||||||
OfflinePlayer target = Bukkit.getPlayer(name);
|
OfflinePlayer target = Bukkit.getPlayer(name);
|
||||||
|
|
||||||
if (target == null) {
|
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