diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/EcoSkillsPlayer.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/EcoSkillsPlayer.kt index d88006f..2572484 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/EcoSkillsPlayer.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/EcoSkillsPlayer.kt @@ -13,7 +13,8 @@ import org.bukkit.OfflinePlayer import org.bukkit.entity.Entity import org.bukkit.entity.Player import org.bukkit.entity.Projectile -import java.util.UUID +import org.bukkit.entity.Tameable +import java.util.* import kotlin.math.abs private val expMultiplierCache = mutableMapOf() @@ -180,6 +181,7 @@ fun Entity.tryAsPlayer(): Player? { return when (this) { is Projectile -> this.shooter as? Player is Player -> this + is Tameable -> this.owner as? Player else -> null } } \ No newline at end of file