From 732f5654896a7a5c6887ad8bcfd0cfa408779e37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?N=C3=A9meth=20Noel?= Date: Fri, 9 Jul 2021 02:56:34 +0200 Subject: [PATCH] fix number conversion --- .../java/net/minestom/server/utils/location/RelativeVec.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/minestom/server/utils/location/RelativeVec.java b/src/main/java/net/minestom/server/utils/location/RelativeVec.java index 911602501..002cb545a 100644 --- a/src/main/java/net/minestom/server/utils/location/RelativeVec.java +++ b/src/main/java/net/minestom/server/utils/location/RelativeVec.java @@ -125,10 +125,10 @@ public final class RelativeVec { if (element.length() != RELATIVE_CHAR.length()) { final String potentialNumber = element.substring(1); - coordinates[i] = (Double) numberParser.apply(potentialNumber); + coordinates[i] = numberParser.apply(potentialNumber).doubleValue(); } } else { - coordinates[i] = (Double) numberParser.apply(element); + coordinates[i] = numberParser.apply(element).doubleValue(); } } catch (NumberFormatException e) { throw new ArgumentSyntaxException("Invalid number", String.join(StringUtils.SPACE, input), INVALID_NUMBER_ERROR);