From 98118ff20394311a8ad0f5259f13251ec726b5ed Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sat, 6 Jan 2024 10:38:42 +0100 Subject: Allow numbers bigger than max int. --- .../at/hannibal2/skyhanni/features/garden/GardenCropTimeCommand.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java') 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 { -- cgit