Open DarkEyeDragon opened 4 years ago
So I think the issue here, is that you have two optional args. The wiki says you can July have 1 (the last arg).
What I would do to get around this is to instead use @Default
with some crazy string no one would type in. The write a custom resolver to handle World.class and if what was passed to the resolver was that string in @Default
(aka the player left it blank), then handle that, other wise, look for a world with that name.
From the wiki:
Can only be used (currently) at end of the command for non Player arguments. Makes it so that if nothing is entered to resolve this context, it will simply return null.
What I got from this line is that it only works for the last argument (unless other optionals are from the type Player). Unless it actually means when the player is the command sender? In that case the current issue would make sense.
It seems to work fine when the player executes the command but the console doesn't allow it.
Which is weird behavior imo and should be adressed either way.