(
parser: &mut CommandParser<'_>,
arg: &Self::ParseArg,
)
| 86 | |
| 87 | type ParseArg = CommandCoordinateTransform; |
| 88 | fn try_parse( |
| 89 | parser: &mut CommandParser<'_>, |
| 90 | arg: &Self::ParseArg, |
| 91 | ) -> Result<Option<Self>, CommandParseError> { |
| 92 | if parser.consume_literal("goto").is_err() { |
| 93 | return Ok(None); |
| 94 | } |
| 95 | Ok(Some(Self { |
| 96 | position: parser |
| 97 | .consume::<CommandParsableCoordinate>()? |
| 98 | .to_coordinates(arg), |
| 99 | dimension: if parser.consume_until_space_or_end(false)? == "in" { |
| 100 | Some(parser.consume_until_space_or_end(true)?.to_owned()) |
| 101 | } else { |
| 102 | None |
| 103 | }, |
| 104 | })) |
| 105 | } |
| 106 | } |
| 107 | |
| 108 | impl PlayerExecutableCommand for CommandGoto { |
nothing calls this directly
no test coverage detected