From 61e11e8a7bbeba1a690853ce7be849f180f0c20e Mon Sep 17 00:00:00 2001 From: Cosine-A <100404990+Cosine-A@users.noreply.github.com> Date: Thu, 21 Mar 2024 19:05:33 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20Double=EC=9D=B4=20=EC=95=84=EB=8B=90=20?= =?UTF-8?q?=EB=95=8C=20ArgumentFeedback=EC=9D=84=20throw=ED=95=98=EC=A7=80?= =?UTF-8?q?=20=EC=95=8A=EB=8A=94=20=EB=AC=B8=EC=A0=9C=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../command/argument/provider/DoubleCommandArgumentProvider.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/bukkit-command/src/main/kotlin/kr/hqservice/framework/command/argument/provider/DoubleCommandArgumentProvider.kt b/modules/bukkit-command/src/main/kotlin/kr/hqservice/framework/command/argument/provider/DoubleCommandArgumentProvider.kt index 09e0040a..1eb456cc 100644 --- a/modules/bukkit-command/src/main/kotlin/kr/hqservice/framework/command/argument/provider/DoubleCommandArgumentProvider.kt +++ b/modules/bukkit-command/src/main/kotlin/kr/hqservice/framework/command/argument/provider/DoubleCommandArgumentProvider.kt @@ -10,7 +10,7 @@ import org.bukkit.Location class DoubleCommandArgumentProvider : CommandArgumentProvider { override suspend fun cast(context: CommandContext, argument: String?): Double { argument ?: throw ArgumentFeedback.RequireArgument - return argument.toDouble() + return argument.toDoubleOrNull() ?: throw ArgumentFeedback.NotNumber } override suspend fun getTabComplete(context: CommandContext, location: Location?): List {