Fix resolvePlayer method

This commit is contained in:
Andre601 2020-12-31 18:20:11 +01:00
parent e8b5660eda
commit 8fa0f73a46

@ -214,10 +214,13 @@ public final class CommandParse extends PlaceholderCommand {
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;
}