Fixed UltraEconomy

This commit is contained in:
Auxilor
2023-07-31 16:10:32 +02:00
parent bba0900183
commit 4ae4af6f1d
5 changed files with 5 additions and 9 deletions

View File

@@ -81,9 +81,6 @@ allprojects {
// LibsDisguises
maven("https://repo.md-5.net/content/groups/public/")
// UltraEconomy
maven("https://repo.techscode.com/repository/maven-releases/")
// PlayerPoints
maven("https://repo.rosewooddev.io/repository/public/")

View File

@@ -51,7 +51,6 @@ dependencies {
compileOnly("com.github.Gypopo:EconomyShopGUI-API:1.4.6")
compileOnly("com.github.N0RSKA:ScytherAPI:55a")
compileOnly("com.ticxo.modelengine:api:R3.0.1")
compileOnly("me.TechsCode:UltraEconomyAPI:2.6.4")
compileOnly("org.black_ixx:playerpoints:3.2.5")
compileOnly("com.github.Ssomar-Developement:SCore:3.4.7")
compileOnly("io.lumine:Mythic:5.3.5")

View File

@@ -48,8 +48,8 @@ import com.willfp.eco.internal.items.ArgParserFlag
import com.willfp.eco.internal.items.ArgParserHead
import com.willfp.eco.internal.items.ArgParserName
import com.willfp.eco.internal.items.ArgParserTexture
import com.willfp.eco.internal.items.ArgParserUnbreakable
import com.willfp.eco.internal.items.ArgParserTrim
import com.willfp.eco.internal.items.ArgParserUnbreakable
import com.willfp.eco.internal.lookup.SegmentParserGroup
import com.willfp.eco.internal.lookup.SegmentParserUseIfPresent
import com.willfp.eco.internal.particle.ParticleFactoryRGB
@@ -389,7 +389,7 @@ abstract class EcoSpigotPlugin : EcoPlugin() {
override fun loadListeners(): List<Listener> {
val listeners = mutableListOf(
ArmorListener(),
EntityDeathByEntityListeners,
EntityDeathByEntityListeners(this),
CraftingRecipeListener(this),
StackedRecipeListener(this),
GUIListener(this),

View File

@@ -32,15 +32,15 @@ class PriceFactoryUltraEconomy(private val currency: Currency) : PriceFactory {
get() = api.accounts.uuid(this.uniqueId).orElse(null)
override fun canAfford(player: Player, multiplier: Double): Boolean {
return (player.account?.getBalance(currency)?.onHand ?: 0f) >= getValue(player, multiplier)
return (player.account?.getBalance(currency)?.onHand ?: 0.0) >= getValue(player, multiplier)
}
override fun pay(player: Player, multiplier: Double) {
player.account?.getBalance(currency)?.removeHand(getValue(player, multiplier).toFloat())
player.account?.getBalance(currency)?.removeHand(getValue(player, multiplier))
}
override fun giveTo(player: Player, multiplier: Double) {
player.account?.getBalance(currency)?.addHand(getValue(player, multiplier).toFloat())
player.account?.getBalance(currency)?.addHand(getValue(player, multiplier))
}
override fun getValue(player: Player, multiplier: Double): Double {

Binary file not shown.