mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-08 17:37:42 +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()) {
|
if (element.length() != RELATIVE_CHAR.length()) {
|
||||||
final String potentialNumber = element.substring(1);
|
final String potentialNumber = element.substring(1);
|
||||||
coordinates[i] = (Double) numberParser.apply(potentialNumber);
|
coordinates[i] = numberParser.apply(potentialNumber).doubleValue();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
coordinates[i] = (Double) numberParser.apply(element);
|
coordinates[i] = numberParser.apply(element).doubleValue();
|
||||||
}
|
}
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
throw new ArgumentSyntaxException("Invalid number", String.join(StringUtils.SPACE, input), INVALID_NUMBER_ERROR);
|
throw new ArgumentSyntaxException("Invalid number", String.join(StringUtils.SPACE, input), INVALID_NUMBER_ERROR);
|
||||||
|
Loading…
Reference in New Issue
Block a user