From a520e5b05458f324b89285a5f054521430617c1c Mon Sep 17 00:00:00 2001 From: MrPibbly <109881084+MrPibbly@users.noreply.github.com> Date: Wed, 29 Nov 2023 02:16:25 -0600 Subject: [PATCH] Update Currency.kt Added an integer placeholder. I needed a placeholder that would strip the decimals and just use the integer value. Figured I'd share in case you're interested. --- .../kotlin/com/willfp/ecobits/currencies/Currency.kt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobits/currencies/Currency.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobits/currencies/Currency.kt index f4aaea9..4af83e1 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobits/currencies/Currency.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobits/currencies/Currency.kt @@ -139,6 +139,15 @@ class Currency( } ) + PlaceholderManager.registerPlaceholder( + PlayerPlaceholder( + plugin, + "${id}_integer" + ) { + it.getBalance(this).toInt().toString() + } + ) + PlaceholderManager.registerPlaceholder( PlayerlessPlaceholder( plugin,