Fixed UltraEconomy
This commit is contained in:
@@ -81,9 +81,6 @@ allprojects {
|
|||||||
// LibsDisguises
|
// LibsDisguises
|
||||||
maven("https://repo.md-5.net/content/groups/public/")
|
maven("https://repo.md-5.net/content/groups/public/")
|
||||||
|
|
||||||
// UltraEconomy
|
|
||||||
maven("https://repo.techscode.com/repository/maven-releases/")
|
|
||||||
|
|
||||||
// PlayerPoints
|
// PlayerPoints
|
||||||
maven("https://repo.rosewooddev.io/repository/public/")
|
maven("https://repo.rosewooddev.io/repository/public/")
|
||||||
|
|
||||||
|
|||||||
@@ -51,7 +51,6 @@ dependencies {
|
|||||||
compileOnly("com.github.Gypopo:EconomyShopGUI-API:1.4.6")
|
compileOnly("com.github.Gypopo:EconomyShopGUI-API:1.4.6")
|
||||||
compileOnly("com.github.N0RSKA:ScytherAPI:55a")
|
compileOnly("com.github.N0RSKA:ScytherAPI:55a")
|
||||||
compileOnly("com.ticxo.modelengine:api:R3.0.1")
|
compileOnly("com.ticxo.modelengine:api:R3.0.1")
|
||||||
compileOnly("me.TechsCode:UltraEconomyAPI:2.6.4")
|
|
||||||
compileOnly("org.black_ixx:playerpoints:3.2.5")
|
compileOnly("org.black_ixx:playerpoints:3.2.5")
|
||||||
compileOnly("com.github.Ssomar-Developement:SCore:3.4.7")
|
compileOnly("com.github.Ssomar-Developement:SCore:3.4.7")
|
||||||
compileOnly("io.lumine:Mythic:5.3.5")
|
compileOnly("io.lumine:Mythic:5.3.5")
|
||||||
|
|||||||
@@ -48,8 +48,8 @@ import com.willfp.eco.internal.items.ArgParserFlag
|
|||||||
import com.willfp.eco.internal.items.ArgParserHead
|
import com.willfp.eco.internal.items.ArgParserHead
|
||||||
import com.willfp.eco.internal.items.ArgParserName
|
import com.willfp.eco.internal.items.ArgParserName
|
||||||
import com.willfp.eco.internal.items.ArgParserTexture
|
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.ArgParserTrim
|
||||||
|
import com.willfp.eco.internal.items.ArgParserUnbreakable
|
||||||
import com.willfp.eco.internal.lookup.SegmentParserGroup
|
import com.willfp.eco.internal.lookup.SegmentParserGroup
|
||||||
import com.willfp.eco.internal.lookup.SegmentParserUseIfPresent
|
import com.willfp.eco.internal.lookup.SegmentParserUseIfPresent
|
||||||
import com.willfp.eco.internal.particle.ParticleFactoryRGB
|
import com.willfp.eco.internal.particle.ParticleFactoryRGB
|
||||||
@@ -389,7 +389,7 @@ abstract class EcoSpigotPlugin : EcoPlugin() {
|
|||||||
override fun loadListeners(): List<Listener> {
|
override fun loadListeners(): List<Listener> {
|
||||||
val listeners = mutableListOf(
|
val listeners = mutableListOf(
|
||||||
ArmorListener(),
|
ArmorListener(),
|
||||||
EntityDeathByEntityListeners,
|
EntityDeathByEntityListeners(this),
|
||||||
CraftingRecipeListener(this),
|
CraftingRecipeListener(this),
|
||||||
StackedRecipeListener(this),
|
StackedRecipeListener(this),
|
||||||
GUIListener(this),
|
GUIListener(this),
|
||||||
|
|||||||
@@ -32,15 +32,15 @@ class PriceFactoryUltraEconomy(private val currency: Currency) : PriceFactory {
|
|||||||
get() = api.accounts.uuid(this.uniqueId).orElse(null)
|
get() = api.accounts.uuid(this.uniqueId).orElse(null)
|
||||||
|
|
||||||
override fun canAfford(player: Player, multiplier: Double): Boolean {
|
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) {
|
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) {
|
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 {
|
override fun getValue(player: Player, multiplier: Double): Double {
|
||||||
|
|||||||
BIN
lib/UltraEconomyAPI-2.6.4-all.jar
Normal file
BIN
lib/UltraEconomyAPI-2.6.4-all.jar
Normal file
Binary file not shown.
Reference in New Issue
Block a user