From 74fcf98fa21a01926734fcaf01ab0907b0ce2b96 Mon Sep 17 00:00:00 2001 From: werogg Date: Fri, 26 May 2023 20:58:13 +0200 Subject: [PATCH] Add comma support to pay command --- .../main/java/com/earth2me/essentials/commands/Commandpay.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Essentials/src/main/java/com/earth2me/essentials/commands/Commandpay.java b/Essentials/src/main/java/com/earth2me/essentials/commands/Commandpay.java index ecc6a4207f6..1588d767427 100644 --- a/Essentials/src/main/java/com/earth2me/essentials/commands/Commandpay.java +++ b/Essentials/src/main/java/com/earth2me/essentials/commands/Commandpay.java @@ -32,7 +32,7 @@ public void run(final Server server, final User user, final String commandLabel, throw new Exception(tl("payMustBePositive")); } - final String stringAmount = args[1].replaceAll("[^0-9\\.]", ""); + final String stringAmount = args[1].replaceAll("[^0-9.,]", "").replace(",", "."); if (stringAmount.length() < 1) { throw new NotEnoughArgumentsException();