Fixed new players not being parsed by the give command

This commit is contained in:
_OfTeN_
2022-11-15 20:09:11 +03:00
parent 10ebcb5978
commit 52d5d1bde9

View File

@@ -27,7 +27,7 @@ class CommandGive(plugin: EcoPlugin) : Subcommand(
@Suppress("DEPRECATION")
val player = Bukkit.getOfflinePlayer(args[0])
if (!player.hasPlayedBefore()) {
if (!player.hasPlayedBefore() && !player.isOnline) {
sender.sendMessage(plugin.langYml.getMessage("invalid-player"))
return
}