Skip to content

Commit

Permalink
Fixed UltraEconomy
Browse files Browse the repository at this point in the history
  • Loading branch information
WillFP committed Jul 31, 2023
1 parent bba0900 commit 4ae4af6
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 9 deletions.
3 changes: 0 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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/")

Expand Down
1 change: 0 additions & 1 deletion eco-core/core-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Binary file added lib/UltraEconomyAPI-2.6.4-all.jar
Binary file not shown.

0 comments on commit 4ae4af6

Please sign in to comment.