aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-01-06 10:38:42 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-01-06 10:38:42 +0100
commit98118ff20394311a8ad0f5259f13251ec726b5ed (patch)
tree2e5a9ceba1b69bb527010650441721a577719d76 /src/main/java/at
parentc55ad5e0a58c8e7e26c1156401a65a4b47fefd3f (diff)
downloadskyhanni-98118ff20394311a8ad0f5259f13251ec726b5ed.tar.gz
skyhanni-98118ff20394311a8ad0f5259f13251ec726b5ed.tar.bz2
skyhanni-98118ff20394311a8ad0f5259f13251ec726b5ed.zip
Allow numbers bigger than max int.
Diffstat (limited to 'src/main/java/at')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/GardenCropTimeCommand.kt4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenCropTimeCommand.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenCropTimeCommand.kt
index e6d970b24..9739ece50 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenCropTimeCommand.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenCropTimeCommand.kt
@@ -27,7 +27,7 @@ object GardenCropTimeCommand {
val rawAmount = args[0]
val amount = try {
- rawAmount.formatNumber().toInt()
+ rawAmount.formatNumber()
} catch (e: NumberFormatException) {
LorenzUtils.userError("Not a valid number: '$rawAmount'")
return
@@ -45,7 +45,7 @@ object GardenCropTimeCommand {
val baseName = baseId.getItemName()
val crop = CropType.getByName(baseName.removeColor())
- val fullAmount = baseAmount.toLong() * amount.toLong()
+ val fullAmount = baseAmount.toLong() * amount
val text = if (baseAmount == 1) {
"§e${amount.addSeparators()}x $itemName"
} else {