This adds the ability to teleport to an arbitrary plot by its x,z "id"
This change also adds a new completion parser, "Greedy", which
corresponds to brigadier:string with flags indicating that it accepts
anything from the argument to the end of the line. This is necessary
because the plot id doesn't seem to be anything Minecraft can parse by
itself, and is you use brigadier:string in "one word" mode, the parser
believes the argument ends at the comma and shows an error for valid
input.
I use the "x,z" format to match plotsquared's command API, but if people
don't like that it's easy enough to swap out for separate arguments.
I mostly wanted to move parse_id out into a separate function because
without access to ? parsing that was starting to get ugly.
This adds the ability to teleport to an arbitrary plot by its x,z "id"
This change also adds a new completion parser, "Greedy", which corresponds to
brigadier:string
with flags indicating that it accepts anything from the argument to the end of the line. This is necessary because the plot id doesn't seem to be anything Minecraft can parse by itself, and is you usebrigadier:string
in "one word" mode, the parser believes the argument ends at the comma and shows an error for valid input.I use the "x,z" format to match plotsquared's command API, but if people don't like that it's easy enough to swap out for separate arguments.
I mostly wanted to move
parse_id
out into a separate function because without access to?
parsing that was starting to get ugly.