static @NotNull Pos fromString(final @NotNull String input) throws IllegalArgumentException {
      final Matcher localMatch = BlockNBTComponentImpl.Tokens.LOCAL_PATTERN.matcher(input);
      if (localMatch.matches()) {
        return BlockNBTComponent.LocalPos.localPos(
          Double.parseDouble(localMatch.group(1)),
          Double.parseDouble(localMatch.group(3)),
          Double.parseDouble(localMatch.group(5))
        );
      }

      final Matcher worldMatch = BlockNBTComponentImpl.Tokens.WORLD_PATTERN.matcher(input);
      if (worldMatch.matches()) {
        return BlockNBTComponent.WorldPos.worldPos(
          BlockNBTComponentImpl.Tokens.deserializeCoordinate(worldMatch.group(1), worldMatch.group(2)),
          BlockNBTComponentImpl.Tokens.deserializeCoordinate(worldMatch.group(3), worldMatch.group(4)),
          BlockNBTComponentImpl.Tokens.deserializeCoordinate(worldMatch.group(5), worldMatch.group(6))
        );
      }

      throw new IllegalArgumentException("Cannot convert position specification '" + input + "' into a position");
    }
Attempt to parse a position from the input string.

<p>The input string must refer to a local position (with 3 {@code ^}-prefixed digits),
or a world position (with 3 digits that are global if unprefixed, or relative to the
current position if {@code ~}-prefixed).</p>

@param input input
@return a new pos
@throws IllegalArgumentException if the position was in an invalid format
@since 4.0.0
api/src/main/java/net/kyori/adventure/text/BlockNBTComponent.java