From 52d5d1bde91d80b1ae53359193ec0e5976c00e10 Mon Sep 17 00:00:00 2001 From: _OfTeN_ Date: Tue, 15 Nov 2022 20:09:11 +0300 Subject: [PATCH] Fixed new players not being parsed by the give command --- .../main/kotlin/com/willfp/ecocrates/commands/CommandGive.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecocrates/commands/CommandGive.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecocrates/commands/CommandGive.kt index 06beb71..a2e1825 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecocrates/commands/CommandGive.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecocrates/commands/CommandGive.kt @@ -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 }