mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-04 23:47:59 +01:00
fix number conversion
This commit is contained in:
parent
a6b4b17279
commit
732f565489
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user