From 86fbda9c78c4445dd4fd2365011d0ce1367e2cf4 Mon Sep 17 00:00:00 2001 From: Auxilor Date: Mon, 21 Nov 2022 20:31:12 +0000 Subject: [PATCH] Fixed /ecobits pay --- .../src/main/kotlin/com/willfp/ecobits/EcoBitsPlugin.kt | 1 - .../src/main/kotlin/com/willfp/ecobits/commands/CommandPay.kt | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobits/EcoBitsPlugin.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobits/EcoBitsPlugin.kt index 00933c3..213c5fe 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobits/EcoBitsPlugin.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobits/EcoBitsPlugin.kt @@ -1,6 +1,5 @@ package com.willfp.ecobits -import com.sun.tools.javac.jvm.ByteCodes.ret import com.willfp.eco.core.EcoPlugin import com.willfp.eco.core.command.impl.PluginCommand import com.willfp.eco.core.integrations.IntegrationLoader diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobits/commands/CommandPay.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobits/commands/CommandPay.kt index 7f8c3dc..cc44486 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobits/commands/CommandPay.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobits/commands/CommandPay.kt @@ -32,7 +32,7 @@ class CommandPay( @Suppress("DEPRECATION") val recipient = Bukkit.getOfflinePlayer(args[0]) - if (!recipient.hasPlayedBefore() && !recipient.isOnline) { + if ((!recipient.hasPlayedBefore() && !recipient.isOnline) || (recipient.uniqueId == player.uniqueId)) { player.sendMessage(plugin.langYml.getMessage("invalid-player")) return }